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>
This commit is contained in:
parent
e5039a92f1
commit
23c486d19a
|
@ -1336,13 +1336,13 @@ static int __maybe_unused pm8001_pci_resume(struct device *dev)
|
||||||
struct pm8001_hba_info *pm8001_ha;
|
struct pm8001_hba_info *pm8001_ha;
|
||||||
int rc;
|
int rc;
|
||||||
u8 i = 0, j;
|
u8 i = 0, j;
|
||||||
u32 device_state;
|
|
||||||
DECLARE_COMPLETION_ONSTACK(completion);
|
DECLARE_COMPLETION_ONSTACK(completion);
|
||||||
pm8001_ha = sha->lldd_ha;
|
|
||||||
device_state = pdev->current_state;
|
|
||||||
|
|
||||||
pm8001_info(pm8001_ha, "pdev=0x%p, slot=%s, resuming from previous operating state [D%d]\n",
|
pm8001_ha = sha->lldd_ha;
|
||||||
pdev, pm8001_ha->name, device_state);
|
|
||||||
|
pm8001_info(pm8001_ha,
|
||||||
|
"pdev=0x%p, slot=%s, resuming from previous operating state [D%d]\n",
|
||||||
|
pdev, pm8001_ha->name, pdev->current_state);
|
||||||
|
|
||||||
rc = pci_go_44(pdev);
|
rc = pci_go_44(pdev);
|
||||||
if (rc)
|
if (rc)
|
||||||
|
|
Loading…
Reference in New Issue