scsi: csiostor: Mark known unused variable as __always_unused
authorLee Jones <lee.jones@linaro.org>
Thu, 23 Jul 2020 12:24:27 +0000 (13:24 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 25 Jul 2020 02:32:05 +0000 (22:32 -0400)
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/csiostor/csio_hw.c: In function ‘csio_hw_get_vpd_params’:
 drivers/scsi/csiostor/csio_hw.c:309:8: warning: variable ‘s’ set but not used [-Wunused-but-set-variable]

Link: https://lore.kernel.org/r/20200723122446.1329773-22-lee.jones@linaro.org
Cc: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/csiostor/csio_hw.c

index 950f9cdf0577f1632e58f41f0c48a30fc1dab087..98d4d39aaa572473896ec17c895a7f4254c1a6bc 100644 (file)
@@ -306,7 +306,7 @@ csio_hw_get_vpd_params(struct csio_hw *hw, struct csio_vpd *p)
        uint8_t *vpd, csum;
        const struct t4_vpd_hdr *v;
        /* To get around compilation warning from strstrip */
-       char *s;
+       char __always_unused *s;
 
        if (csio_is_valid_vpd(hw))
                return 0;