linux_dsm_epyc7002/drivers/scsi/lpfc
Arnd Bergmann 5fe5a6c9ac scsi: lpfc: avoid false-positive gcc-8 warning
This is an interesting regression with gcc-8, showing a harmless warning
for correct code:

In file included from include/linux/kernel.h:13:0,
                 ...
                 from drivers/scsi/lpfc/lpfc_debugfs.c:23:
include/linux/printk.h:301:2: error: 'eq' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
  ^~~~~~
In file included from drivers/scsi/lpfc/lpfc_debugfs.c:58:0:
drivers/scsi/lpfc/lpfc_debugfs.h:451:31: note: 'eq' was declared here

I managed to reduce the warning into a small test case for gcc-8 that I
reported in the gcc bugzilla[1].

As a workaround, this changes the logic to move the two assignments of
'eq' out of the conditions and instead make the index conditional.  This
works for all configurations I tried and avoids adding a bogus
initialization.

Acked-by: James Smart <james.smart@broadcom.com>
Link: [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81958
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-08-25 18:26:52 -04:00
..
lpfc_attr.c scsi: lpfc: Add Buffer to Buffer credit recovery support 2017-08-24 22:29:43 -04:00
lpfc_attr.h scsi: lpfc: Add Buffer to Buffer credit recovery support 2017-08-24 22:29:43 -04:00
lpfc_bsg.c scsi: lpfc: remove useless code in lpfc_sli4_bsg_link_diag_test 2017-08-24 22:29:09 -04:00
lpfc_bsg.h scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_compat.h scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_crtn.h scsi: lpfc: Fix MRQ > 1 context list handling 2017-08-24 22:29:41 -04:00
lpfc_ct.c scsi: lpfc: convert info messages to standard messages 2017-08-24 22:29:36 -04:00
lpfc_debugfs.c scsi: lpfc: Fix MRQ > 1 context list handling 2017-08-24 22:29:41 -04:00
lpfc_debugfs.h scsi: lpfc: avoid false-positive gcc-8 warning 2017-08-25 18:26:52 -04:00
lpfc_disc.h scsi: lpfc: Fix handling of FCP and NVME FC4 types in Pt2Pt topology 2017-08-24 22:29:37 -04:00
lpfc_els.c scsi: lpfc: Add Buffer to Buffer credit recovery support 2017-08-24 22:29:43 -04:00
lpfc_hbadisc.c scsi: lpfc: Add Buffer to Buffer credit recovery support 2017-08-24 22:29:43 -04:00
lpfc_hw4.h scsi: lpfc: Add Buffer to Buffer credit recovery support 2017-08-24 22:29:43 -04:00
lpfc_hw.h scsi: lpfc: Add Buffer to Buffer credit recovery support 2017-08-24 22:29:43 -04:00
lpfc_ids.h scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_init.c scsi: lpfc: fix "integer constant too large" error on 32bit archs 2017-08-24 22:29:44 -04:00
lpfc_logmsg.h scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_mbox.c scsi: lpfc: Add Buffer to Buffer credit recovery support 2017-08-24 22:29:43 -04:00
lpfc_mem.c scsi: lpfc: Replace PCI pool old API 2017-08-07 14:04:01 -04:00
lpfc_nl.h scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_nportdisc.c scsi: lpfc: Fix handling of FCP and NVME FC4 types in Pt2Pt topology 2017-08-24 22:29:37 -04:00
lpfc_nvme.c scsi: lpfc: remove console log clutter 2017-08-24 22:29:43 -04:00
lpfc_nvme.h scsi: lpfc: Fix transition nvme-i rport handling to nport only. 2017-06-12 21:37:30 -04:00
lpfc_nvmet.c scsi: lpfc: avoid an unused function warning 2017-08-25 18:26:28 -04:00
lpfc_nvmet.h scsi: lpfc: Fix MRQ > 1 context list handling 2017-08-24 22:29:41 -04:00
lpfc_scsi.c scsi: lpfc: Replace PCI pool old API 2017-08-07 14:04:01 -04:00
lpfc_scsi.h scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_sli4.h scsi: lpfc: Add Buffer to Buffer credit recovery support 2017-08-24 22:29:43 -04:00
lpfc_sli.c scsi: lpfc: Fix MRQ > 1 context list handling 2017-08-24 22:29:41 -04:00
lpfc_sli.h scsi: lpfc: Add auto EQ delay logic 2017-06-12 21:37:31 -04:00
lpfc_version.h scsi: lpfc: lpfc version bump 11.4.0.3 2017-08-24 22:29:44 -04:00
lpfc_vport.c Fix crash after issuing lip reset 2017-04-24 09:25:49 +02:00
lpfc_vport.h scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc.h scsi: lpfc: Add Buffer to Buffer credit recovery support 2017-08-24 22:29:43 -04:00
Makefile scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00