Skip to content

Commit 61997c1

Browse files
Gerd Bayerhcahca
authored andcommitted
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: 17e89e1 ("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>
1 parent bc7f911 commit 61997c1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

arch/s390/include/asm/facility.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,26 +88,26 @@ static __always_inline bool test_facility(unsigned long nr)
8888
return __test_facility(nr, &stfle_fac_list);
8989
}
9090

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)
9292
{
9393
unsigned long reg0 = size - 1;
9494

9595
asm volatile(
9696
" lgr 0,%[reg0]\n"
9797
" .insn s,0xb2b00000,%[list]\n" /* stfle */
9898
" lgr %[reg0],0\n"
99-
: [reg0] "+&d" (reg0), [list] "+Q" (*stfle_fac_list)
99+
: [reg0] "+&d" (reg0), [list] "+Q" (*fac_list)
100100
:
101101
: "memory", "cc", "0");
102102
return reg0;
103103
}
104104

105105
/**
106106
* 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
108108
* @size: size of passed in array in double words
109109
*/
110-
static inline void __stfle(u64 *stfle_fac_list, int size)
110+
static inline void __stfle(u64 *fac_list, int size)
111111
{
112112
unsigned long nr;
113113
u32 stfl_fac_list;
@@ -116,20 +116,20 @@ static inline void __stfle(u64 *stfle_fac_list, int size)
116116
" stfl 0(0)\n"
117117
: "=m" (get_lowcore()->stfl_fac_list));
118118
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);
120120
nr = 4; /* bytes stored by stfl */
121121
if (stfl_fac_list & 0x01000000) {
122122
/* More facility bits available with stfle */
123-
nr = __stfle_asm(stfle_fac_list, size);
123+
nr = __stfle_asm(fac_list, size);
124124
nr = min_t(unsigned long, (nr + 1) * 8, size * 8);
125125
}
126-
memset((char *) stfle_fac_list + nr, 0, size * 8 - nr);
126+
memset((char *)fac_list + nr, 0, size * 8 - nr);
127127
}
128128

129-
static inline void stfle(u64 *stfle_fac_list, int size)
129+
static inline void stfle(u64 *fac_list, int size)
130130
{
131131
preempt_disable();
132-
__stfle(stfle_fac_list, size);
132+
__stfle(fac_list, size);
133133
preempt_enable();
134134
}
135135

0 commit comments

Comments
 (0)