Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/facilities: Fix warning about shadow of global variable

Compiling the kernel with clang W=2 produces a warning that the
parameter declarations in some routines would shadow the definition of
the global variable stfle_fac_list. Address this warning by renaming the
parameters to fac_list.

Fixes: 17e89e1340a3 ("s390/facilities: move stfl information from lowcore to global data")
Signed-off-by: Gerd Bayer <gbayer@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>

authored by

Gerd Bayer and committed by
Heiko Carstens
61997c1e bc7f911b

+9 -9
+9 -9
arch/s390/include/asm/facility.h
··· 88 88 return __test_facility(nr, &stfle_fac_list); 89 89 } 90 90 91 - static inline unsigned long __stfle_asm(u64 *stfle_fac_list, int size) 91 + static inline unsigned long __stfle_asm(u64 *fac_list, int size) 92 92 { 93 93 unsigned long reg0 = size - 1; 94 94 ··· 96 96 " lgr 0,%[reg0]\n" 97 97 " .insn s,0xb2b00000,%[list]\n" /* stfle */ 98 98 " lgr %[reg0],0\n" 99 - : [reg0] "+&d" (reg0), [list] "+Q" (*stfle_fac_list) 99 + : [reg0] "+&d" (reg0), [list] "+Q" (*fac_list) 100 100 : 101 101 : "memory", "cc", "0"); 102 102 return reg0; ··· 104 104 105 105 /** 106 106 * stfle - Store facility list extended 107 - * @stfle_fac_list: array where facility list can be stored 107 + * @fac_list: array where facility list can be stored 108 108 * @size: size of passed in array in double words 109 109 */ 110 - static inline void __stfle(u64 *stfle_fac_list, int size) 110 + static inline void __stfle(u64 *fac_list, int size) 111 111 { 112 112 unsigned long nr; 113 113 u32 stfl_fac_list; ··· 116 116 " stfl 0(0)\n" 117 117 : "=m" (get_lowcore()->stfl_fac_list)); 118 118 stfl_fac_list = get_lowcore()->stfl_fac_list; 119 - memcpy(stfle_fac_list, &stfl_fac_list, 4); 119 + memcpy(fac_list, &stfl_fac_list, 4); 120 120 nr = 4; /* bytes stored by stfl */ 121 121 if (stfl_fac_list & 0x01000000) { 122 122 /* More facility bits available with stfle */ 123 - nr = __stfle_asm(stfle_fac_list, size); 123 + nr = __stfle_asm(fac_list, size); 124 124 nr = min_t(unsigned long, (nr + 1) * 8, size * 8); 125 125 } 126 - memset((char *) stfle_fac_list + nr, 0, size * 8 - nr); 126 + memset((char *)fac_list + nr, 0, size * 8 - nr); 127 127 } 128 128 129 - static inline void stfle(u64 *stfle_fac_list, int size) 129 + static inline void stfle(u64 *fac_list, int size) 130 130 { 131 131 preempt_disable(); 132 - __stfle(stfle_fac_list, size); 132 + __stfle(fac_list, size); 133 133 preempt_enable(); 134 134 } 135 135