]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
s390/facilities: Fix warning about shadow of global variable
authorGerd Bayer <gbayer@linux.ibm.com>
Thu, 26 Sep 2024 15:37:06 +0000 (17:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 12:52:43 +0000 (13:52 +0100)
[ Upstream commit 61997c1e947dbf8bc625ef86ceee00fdf2a5dba1 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/include/asm/facility.h

index 65ebf86506cdea11519fd33cc5251925b0760bbf..48791a02cab1e636a79f988b69d504cc9aa24425 100644 (file)
@@ -67,7 +67,7 @@ static inline int test_facility(unsigned long nr)
        return __test_facility(nr, &stfle_fac_list);
 }
 
-static inline unsigned long __stfle_asm(u64 *stfle_fac_list, int size)
+static inline unsigned long __stfle_asm(u64 *fac_list, int size)
 {
        unsigned long reg0 = size - 1;
 
@@ -75,7 +75,7 @@ static inline unsigned long __stfle_asm(u64 *stfle_fac_list, int size)
                "       lgr     0,%[reg0]\n"
                "       .insn   s,0xb2b00000,%[list]\n" /* stfle */
                "       lgr     %[reg0],0\n"
-               : [reg0] "+&d" (reg0), [list] "+Q" (*stfle_fac_list)
+               : [reg0] "+&d" (reg0), [list] "+Q" (*fac_list)
                :
                : "memory", "cc", "0");
        return reg0;
@@ -83,10 +83,10 @@ static inline unsigned long __stfle_asm(u64 *stfle_fac_list, int size)
 
 /**
  * stfle - Store facility list extended
- * @stfle_fac_list: array where facility list can be stored
+ * @fac_list: array where facility list can be stored
  * @size: size of passed in array in double words
  */
-static inline void __stfle(u64 *stfle_fac_list, int size)
+static inline void __stfle(u64 *fac_list, int size)
 {
        unsigned long nr;
        u32 stfl_fac_list;
@@ -95,20 +95,20 @@ static inline void __stfle(u64 *stfle_fac_list, int size)
                "       stfl    0(0)\n"
                : "=m" (get_lowcore()->stfl_fac_list));
        stfl_fac_list = get_lowcore()->stfl_fac_list;
-       memcpy(stfle_fac_list, &stfl_fac_list, 4);
+       memcpy(fac_list, &stfl_fac_list, 4);
        nr = 4; /* bytes stored by stfl */
        if (stfl_fac_list & 0x01000000) {
                /* More facility bits available with stfle */
-               nr = __stfle_asm(stfle_fac_list, size);
+               nr = __stfle_asm(fac_list, size);
                nr = min_t(unsigned long, (nr + 1) * 8, size * 8);
        }
-       memset((char *) stfle_fac_list + nr, 0, size * 8 - nr);
+       memset((char *)fac_list + nr, 0, size * 8 - nr);
 }
 
-static inline void stfle(u64 *stfle_fac_list, int size)
+static inline void stfle(u64 *fac_list, int size)
 {
        preempt_disable();
-       __stfle(stfle_fac_list, size);
+       __stfle(fac_list, size);
        preempt_enable();
 }