]> git.ipfire.org Git - thirdparty/kernel/linux.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)
committerHeiko Carstens <hca@linux.ibm.com>
Thu, 10 Oct 2024 13:32:43 +0000 (15:32 +0200)
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>
arch/s390/include/asm/facility.h

index 715bcf8fb69a518490477d8506c3a2e4ada49b08..5f5b1aa6c23312dc21f27290e5708af38c133f5d 100644 (file)
@@ -88,7 +88,7 @@ static __always_inline bool 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;
 
@@ -96,7 +96,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;
@@ -104,10 +104,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;
@@ -116,20 +116,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();
 }