]> Git Repo - linux.git/commitdiff
ARM: vexpress: Cleanup cppcheck shifting warning
authorPhong Tran <[email protected]>
Tue, 25 Jun 2019 04:03:53 +0000 (11:03 +0700)
committerSudeep Holla <[email protected]>
Wed, 31 Jul 2019 15:36:58 +0000 (16:36 +0100)
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]>
arch/arm/mach-vexpress/spc.c

index 0f5381d1349418c5de2723be59811be30a402f8e..354e0e7025aec5c1da2145ae4037f7e805868970 100644 (file)
@@ -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)
 
@@ -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;
This page took 0.05983 seconds and 4 git commands to generate.