mirror of
https://github.com/torvalds/linux.git
synced 2024-10-26 15:02:39 +00:00
drivers: CCI: Correct use of ! and &
In commit ae91d60ba8
, a bug was fixed that
involved converting !x & y to !(x & y). The code below shows the same
pattern, and thus should perhaps be fixed in the same way.
The Coccinelle semantic patch that makes this change is as follows:
// <smpl>
@@ expression E1,E2; @@
(
!E1 & !E2
|
- !E1 & E2
+ !(E1 & E2)
)
// </smpl>
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Acked-by: Punit Agrawal <punit.agrawal@arm.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
parent
fd9f5edf6e
commit
fc5130de83
|
@ -397,7 +397,8 @@ static irqreturn_t pmu_handle_irq(int irq_num, void *dev)
|
||||||
hw_counter = &event->hw;
|
hw_counter = &event->hw;
|
||||||
|
|
||||||
/* Did this counter overflow? */
|
/* Did this counter overflow? */
|
||||||
if (!pmu_read_register(idx, CCI_PMU_OVRFLW) & CCI_PMU_OVRFLW_FLAG)
|
if (!(pmu_read_register(idx, CCI_PMU_OVRFLW) &
|
||||||
|
CCI_PMU_OVRFLW_FLAG))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
pmu_write_register(CCI_PMU_OVRFLW_FLAG, idx, CCI_PMU_OVRFLW);
|
pmu_write_register(CCI_PMU_OVRFLW_FLAG, idx, CCI_PMU_OVRFLW);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user