Skip to content

Commit

Permalink
ARM: vexpress: Cleanup cppcheck shifting warning
Browse files Browse the repository at this point in the history
Fix below warning from cppcheck tool using BIT() macro:
"Shifting signed 32-bit value by 31 bits is undefined behaviour errors"

Signed-off-by: Phong Tran <[email protected]>
Signed-off-by: Sudeep Holla <[email protected]>
  • Loading branch information
phongt authored and sudeep-holla committed Jul 31, 2019
1 parent 5f9e832 commit ace4682
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-vexpress/spc.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
#define A7_PERFVAL_BASE 0xC30

/* Config interface control bits */
#define SYSCFG_START (1 << 31)
#define SYSCFG_START BIT(31)
#define SYSCFG_SCC (6 << 20)
#define SYSCFG_STAT (14 << 20)

Expand Down Expand Up @@ -162,7 +162,7 @@ void ve_spc_cpu_wakeup_irq(u32 cluster, u32 cpu, bool set)
if (cluster >= MAX_CLUSTERS)
return;

mask = 1 << cpu;
mask = BIT(cpu);

if (!cluster_is_a15(cluster))
mask <<= 4;
Expand Down

0 comments on commit ace4682

Please sign in to comment.