[PATCH 2/2] add a warning when wait_for_mode_change_ack timeouts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



and remove a redundant call to pci_get_drvdata in hpsa_remove_one

Signed-off-by: Tomas Henzl <thenzl@xxxxxxxxxx>
---
 drivers/scsi/hpsa.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index f60ce7e5bb..59ea37d175 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -6416,6 +6416,8 @@ static void hpsa_wait_for_mode_change_ack(struct ctlr_info *h)
 		if (h->remove_in_progress)
 			return;
 	}
+	if (MAX_CONFIG_WAIT == i)
+		dev_warn(&h->pdev->dev, "waiting for mode change timed out\n");
 }
 
 static int hpsa_enter_simple_mode(struct ctlr_info *h)
@@ -7210,14 +7212,12 @@ static void hpsa_free_device_info(struct ctlr_info *h)
 
 static void hpsa_remove_one(struct pci_dev *pdev)
 {
-	struct ctlr_info *h;
+	struct ctlr_info *h = pci_get_drvdata(pdev);
 
-	if (pci_get_drvdata(pdev) == NULL) {
+	if (!h) {
 		dev_err(&pdev->dev, "unable to remove device\n");
 		return;
 	}
-	h = pci_get_drvdata(pdev);
-
 	/* Get rid of any controller monitoring work items */
 	h->remove_in_progress = 1;
 	cancel_delayed_work_sync(&h->monitor_ctlr_work);
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux