• Arnd Bergmann's avatar
    scsi: qla2xxx: avoid unused-function warning · bcda771b
    Arnd Bergmann authored
    When NVMe support is disabled, we get a couple of harmless warnings:
    
    drivers/scsi/qla2xxx/qla_nvme.c:667:13: error: 'qla_nvme_unregister_remote_port' defined but not used [-Werror=unused-function]
    drivers/scsi/qla2xxx/qla_nvme.c:634:13: error: 'qla_nvme_abort_all' defined but not used [-Werror=unused-function]
    drivers/scsi/qla2xxx/qla_nvme.c:604:12: error: 'qla_nvme_wait_on_rport_del' defined but not used [-Werror=unused-function]
    
    This replaces the preprocessor checks in the code with equivalent
    compiler conditionals, which lets gcc drop the unused functions without
    warning, and is nicer to read.
    
    Fixes: e84067d7 ("scsi: qla2xxx: Add FC-NVMe F/W initialization and transport registration")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Acked-by: default avatarHimanshu Madhani <himanshu.madhani@cavium.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    bcda771b
qla_nvme.c 19.6 KB