arm64: include: asm: initialize a few ret(-s)
authorYaroslav Furman <yaro330@gmail.com>
Fri, 22 Jun 2018 17:41:38 +0000 (20:41 +0300)
committerivanmeler <i_ivan@windowslive.com>
Wed, 13 Apr 2022 21:13:32 +0000 (21:13 +0000)
Fixes -Wsometimes-uninitialized that just
fill up build log.
Signed-off-by: Yaroslav Furman <yaro330@gmail.com>
arch/arm64/include/asm/arch_timer.h
arch/arm64/include/asm/percpu.h

index d5747d8737108e453f5a9920ac652f91254a38be..b2fcadb1cd8da8321a03ac40949dec0568a4a939 100644 (file)
@@ -61,7 +61,7 @@ void arch_timer_reg_write_cp15(int access, enum arch_timer_reg reg, u32 val)
 static __always_inline
 u32 arch_timer_reg_read_cp15(int access, enum arch_timer_reg reg)
 {
-       u32 val;
+       u32 val = 0;
 
        if (access == ARCH_TIMER_PHYS_ACCESS) {
                switch (reg) {
index 2ce1a0262a5974ba54a48320177081f52f810fae..b873d172d0bd451fca4acf3c8d0026a3afb8a2b7 100644 (file)
@@ -42,7 +42,7 @@ static inline unsigned long __my_cpu_offset(void)
 static inline unsigned long __percpu_##op(void *ptr,                   \
                        unsigned long val, int size)                    \
 {                                                                      \
-       unsigned long loop, ret;                                        \
+       unsigned long loop, ret = 0;                                    \
                                                                        \
        switch (size) {                                                 \
        case 1:                                                         \
@@ -99,7 +99,7 @@ PERCPU_OP(or, orr)
 
 static inline unsigned long __percpu_read(void *ptr, int size)
 {
-       unsigned long ret;
+       unsigned long ret = 0;
 
        switch (size) {
        case 1:
@@ -144,7 +144,7 @@ static inline void __percpu_write(void *ptr, unsigned long val, int size)
 static inline unsigned long __percpu_xchg(void *ptr, unsigned long val,
                                                int size)
 {
-       unsigned long ret, loop;
+       unsigned long ret = 0, loop;
 
        switch (size) {
        case 1: