]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: raid_attrs: fix unused variable warning
authorArnd Bergmann <arnd@arndb.de>
Mon, 13 Aug 2018 22:27:10 +0000 (00:27 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 30 Aug 2018 11:21:04 +0000 (07:21 -0400)
commit61075e1fa23e4f80efcce9df3690311273f0bac8
tree8eebdcb0733dea4328cd1e789af8d9ebe590189d
parent0ff97265403d59a684be8666710156706ccfd8fa
scsi: raid_attrs: fix unused variable warning

I ran into a new warning on randconfig kernels:

drivers/scsi/raid_class.c: In function 'raid_match':
drivers/scsi/raid_class.c:64:24: error: unused variable 'i' [-Werror=unused-variable]

This looks like a very old problem that for some reason was very hard to
run into, but it is very easy to fix, by replacing the incorrect #ifdef
with a simpler IS_ENABLED() check.

Fixes: 5fc7b761b263 ("[SCSI] raid_attrs: fix dependency problems")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/raid_class.c