]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: pm8001: Remove local variable in pm8001_pci_resume()
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Sun, 20 Feb 2022 03:17:52 +0000 (12:17 +0900)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 23 Feb 2022 02:31:18 +0000 (21:31 -0500)
commit7c742cab96d87aba617f2f23c977ce76142f2872
tree3ba0d2dff107fe65ab0ed612d86e73037b9ba58e
parent3a95fa7022e0d75ca105f6fcd1fa5598b0f0c6b7
scsi: pm8001: Remove local variable in pm8001_pci_resume()

In pm8001_pci_resume(), the use of the u32 type for the local variable
device_state causes a sparse warning:

warning: incorrect type in assignment (different base types)
    expected unsigned int [usertype] device_state
    got restricted pci_power_t [usertype] current_state

Since this variable is used only once in the function, remove it and use
pdev->current_state directly. While at it, also add a blank line after the
last local variable declaration.

Link: https://lore.kernel.org/r/20220220031810.738362-14-damien.lemoal@opensource.wdc.com
Reviewed-by: John Garry <john.garry@huawei.com>
Reviewed-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/pm8001/pm8001_init.c