linux_dsm_epyc7002/drivers/scsi/lpfc
Arnd Bergmann de8c36bba3 scsi: lpfc: avoid harmless comparison warning
When building with -Wextra, we get a lot of warnings for the lpfc driver
concerning expressions that are always true, starting with:

drivers/scsi/lpfc/lpfc_attr.c: In function 'lpfc_enable_npiv_init':
drivers/scsi/lpfc/lpfc_attr.c:2786:77: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
drivers/scsi/lpfc/lpfc_attr.c: In function 'lpfc_enable_rrq_init':
drivers/scsi/lpfc/lpfc_attr.c:2802:76: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
drivers/scsi/lpfc/lpfc_attr.c: In function 'lpfc_suppress_link_up_init':
drivers/scsi/lpfc/lpfc_attr.c:2812:2050: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]
drivers/scsi/lpfc/lpfc_attr.c: In function 'lpfc_log_verbose_init':
drivers/scsi/lpfc/lpfc_attr.c:3064:1930: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits]

The code works as intended, but it would be nice to shut up the warning
so we don't clutter up build logs with this. Using a separate inline
function for it makes it clear to the compiler that the comparison is
necessary in the caller but still lets it do the constant-folding.

[mkp: fix typo]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2016-07-20 19:53:07 -04:00
..
lpfc_attr.c scsi: lpfc: avoid harmless comparison warning 2016-07-20 19:53:07 -04:00
lpfc_attr.h lpfc: Re-organize source for easier driver attribute management 2016-07-15 15:25:06 -04:00
lpfc_bsg.c lpfc: remove set but not used variables 2015-10-27 10:06:00 +09:00
lpfc_bsg.h lpfc: Update copyright to 2015 2015-04-10 07:50:42 -07:00
lpfc_compat.h [SCSI] lpfc 8.3.28: Critical Miscellaneous fixes 2011-12-15 10:57:45 +04:00
lpfc_crtn.h lpfc: Copyright updates 2016-07-15 15:25:06 -04:00
lpfc_ct.c lpfc: Disable FDMI probing if not connected to a fabric 2016-07-15 15:25:06 -04:00
lpfc_debugfs.c lpfc: fix missing zero termination in debugfs 2016-02-23 21:27:02 -05:00
lpfc_debugfs.h [SCSI] lpfc 8.3.33: Tie parallel I/O queues into separate MSIX vectors 2012-09-14 14:41:19 +01:00
lpfc_disc.h lpfc: Fix rport leak. 2015-06-05 22:40:19 -07:00
lpfc_els.c lpfc: Remove global lpfc_delay_discovery attribute in leiu of per-hba lpfc_delay_discovery 2016-07-15 15:25:06 -04:00
lpfc_hbadisc.c lpfc: Update modified file copyrights 2016-04-11 16:57:09 -04:00
lpfc_hw4.h lpfc: Add MDS Diagnostics Support 2016-07-15 15:25:06 -04:00
lpfc_hw.h lpfc: Correct RDP response Revision location 2016-07-15 15:25:06 -04:00
lpfc_ids.h lpfc: Re-organize source for easier device-id management 2016-07-15 15:25:06 -04:00
lpfc_init.c lpfc: Remove global lpfc_enable_npiv attribute in leiu of per-hba lpfc_enable_npiv 2016-07-15 15:25:06 -04:00
lpfc_logmsg.h [SCSI] lpfc 8.3.39: Fixed BlockGuard error reporting 2013-05-02 12:38:02 -07:00
lpfc_mbox.c lpfc: Update modified file copyrights 2016-04-11 16:57:09 -04:00
lpfc_mem.c Revert "lpfc: Delete unnecessary checks before the function call mempool_destroy" 2016-05-11 13:02:43 -07:00
lpfc_nl.h Fix common misspellings 2011-03-31 11:26:23 -03:00
lpfc_nportdisc.c lpfc: Update modified file copyrights 2016-04-11 16:57:09 -04:00
lpfc_scsi.c lpfc: Copyright updates 2016-07-15 15:25:06 -04:00
lpfc_scsi.h lpfc: Copyright updates 2016-07-15 15:25:06 -04:00
lpfc_sli4.h lpfc: Copyright updates 2016-07-15 15:25:06 -04:00
lpfc_sli.c lpfc: call lpfc_sli_validate_fcp_iocb() with the hbalock held 2016-07-20 19:45:35 -04:00
lpfc_sli.h lpfc: Copyright updates 2016-07-15 15:25:06 -04:00
lpfc_version.h lpfc: Update lpfc version to 11.2.0.0 2016-07-15 15:25:06 -04:00
lpfc_vport.c lpfc: Update modified file copyrights 2016-04-11 16:57:09 -04:00
lpfc_vport.h [SCSI] lpfc 8.3.39: Fixed VPI allocation issues after firmware dump is performed 2013-05-02 12:37:45 -07:00
lpfc.h lpfc: Correct issue with ioremap() call on 32bit kernel 2016-07-15 15:25:06 -04:00
Makefile [SCSI] lpfc: fix problems with -Werror 2012-07-20 08:58:54 +01:00