Re: [PATCH 1/2] scsi: lpfc: avoid harmless comparison warning

From: Martin K. Petersen
Date: Wed Jul 13 2016 - 23:15:40 EST


>>>>> "Arnd" == Arnd Bergmann <arnd@xxxxxxxx> writes:

Arnd> When building with -Wextra, we get a lot of warnings for the lpfc
Arnd> driver concerning expressions that are always true, starting with:

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

James, Dick: Please review!

--
Martin K. Petersen Oracle Linux Engineering