scsi: mvsas: Move 'core_nr' inside #ifdef and remove unused variable 'res_flag'
authorLee Jones <lee.jones@linaro.org>
Tue, 21 Jul 2020 16:41:47 +0000 (17:41 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 25 Jul 2020 02:36:46 +0000 (22:36 -0400)
commit6eaa862747eadbec42600031c93e6e52a2d1edda
treed7dbaba459e5a2dfb3d793022d7bd077d9a7e087
parente3903d31826fc1732bc5745fb9a8686bfa49444f
scsi: mvsas: Move 'core_nr' inside #ifdef and remove unused variable 'res_flag'

Only declare 'core_nr' if its conditions for use are met.

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/mvsas/mv_init.c: In function ‘mvs_interrupt’:
 drivers/scsi/mvsas/mv_init.c:180:6: warning: variable ‘core_nr’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/mvsas/mv_init.c: In function ‘mvs_ioremap’:
 drivers/scsi/mvsas/mv_init.c:302:36: warning: variable ‘res_flag’ set but not used [-Wunused-but-set-variable]

[mkp: applied follow-up fixup patch]

Link: https://lore.kernel.org/r/20200721164148.2617584-40-lee.jones@linaro.org
Cc: Jason Yan <yanaijie@huawei.com>
Cc: Marvell <kewei@marvell.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mvsas/mv_init.c