mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scsi: hisi_sas: fix a warning reported by sparse
@ 2017-12-19  1:15 chenxiang
  2017-12-19  3:41 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: chenxiang @ 2017-12-19  1:15 UTC (permalink / raw)
  To: jejb, martin.petersen
  Cc: linuxarm, linux-scsi, linux-kernel, john.garry, chenxiang

The type of function pci_choose_state's return value is pci_power_t while we
define it as a u32. A warning will be reported by sparse. So change u32 
into pci_power_t.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
---
 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
index 6a408d2..05fb291 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
@@ -2309,7 +2309,8 @@ static int hisi_sas_v3_suspend(struct pci_dev *pdev, pm_message_t state)
 	struct hisi_hba *hisi_hba = sha->lldd_ha;
 	struct device *dev = hisi_hba->dev;
 	struct Scsi_Host *shost = hisi_hba->shost;
-	u32 device_state, status;
+	u32 status;
+	pci_power_t device_state;
 	int rc;
 	u32 reg_val;
 	unsigned long flags;
@@ -2371,7 +2372,7 @@ static int hisi_sas_v3_resume(struct pci_dev *pdev)
 	struct Scsi_Host *shost = hisi_hba->shost;
 	struct device *dev = hisi_hba->dev;
 	unsigned int rc;
-	u32 device_state = pdev->current_state;
+	pci_power_t device_state = pdev->current_state;
 
 	dev_warn(dev, "resuming from operating state [D%d]\n",
 			device_state);
-- 
1.9.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi: hisi_sas: fix a warning reported by sparse
  2017-12-19  1:15 [PATCH] scsi: hisi_sas: fix a warning reported by sparse chenxiang
@ 2017-12-19  3:41 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2017-12-19  3:41 UTC (permalink / raw)
  To: chenxiang
  Cc: jejb, martin.petersen, linuxarm, linux-scsi, linux-kernel, john.garry


chenxiang,

> The type of function pci_choose_state's return value is pci_power_t
> while we define it as a u32. A warning will be reported by sparse. So
> change u32 into pci_power_t.

Applied to 4.16/scsi-queue. Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-19  3:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-19  1:15 [PATCH] scsi: hisi_sas: fix a warning reported by sparse chenxiang
2017-12-19  3:41 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome