summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fnic
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-06-15 22:42:17 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2016-07-20 19:53:07 -0400
commitde8c36bba33380fcc8564e69c039a4b84166e66d (patch)
tree60c6ff48578edf4dbd816d9c94b6780a5cc63585 /drivers/scsi/fnic
parent9a6cf881df0293cc1c06d31bcbeda6c23b95dcac (diff)
downloadlinux-stable-de8c36bba33380fcc8564e69c039a4b84166e66d.tar.gz
linux-stable-de8c36bba33380fcc8564e69c039a4b84166e66d.tar.bz2
linux-stable-de8c36bba33380fcc8564e69c039a4b84166e66d.zip
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>
Diffstat (limited to 'drivers/scsi/fnic')
0 files changed, 0 insertions, 0 deletions