]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: smartpqi: Fix unused variable pqi_pm_ops for clang
authorDon Brace <don.brace@microchip.com>
Thu, 10 Feb 2022 20:11:51 +0000 (14:11 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 11 Feb 2022 22:06:12 +0000 (17:06 -0500)
commit415859c59570d80ce94a6c88c04f685e83443038
tree143c4d4efa08fbe0242d8578f45be62358b30ae3
parentef8b511bcf1a8a14270304e58a0ff0859c6949dc
scsi: smartpqi: Fix unused variable pqi_pm_ops for clang

Driver added a new dev_pm_ops structure used only if CONFIG_PM is set.  The
CONFIG_PM MACRO needed to be moved up in the code to avoid the compiler
warnings. The hunk to move the location was missing from the above patch.

Found by kernel test robot by building driver with CONFIG_PM disabled.

Link: https://lore.kernel.org/all/202202090657.bstNLuce-lkp@intel.com/
Link: https://lore.kernel.org/r/20220210201151.236170-1-don.brace@microchip.com
Fixes: da7c3d115fad ("scsi: smartpqi: Fix hibernate and suspend")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Scott Teel <scott.teel@microchip.com>
Reviewed-by: Scott Benesh <scott.benesh@microchip.com>
Reviewed-by: Mike Mcgowen <mike.mcgowen@microchip.com>
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com>
Signed-off-by: Don Brace <don.brace@microchip.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/smartpqi/smartpqi_init.c