From: Jingoo Han <jg1.han@samsung.com>
To: 'James Bottomley' <JBottomley@Parallels.com>
Cc: linux-scsi@vger.kernel.org, 'Jingoo Han' <jg1.han@samsung.com>,
'Neela Syam Kolli' <megaraidlinux@lsi.com>
Subject: [PATCH 09/20] [SCSI] megaraid: remove unnecessary pci_set_drvdata()
Date: Mon, 23 Sep 2013 10:03:55 +0900 [thread overview]
Message-ID: <000d01ceb7f8$c6cc4010$5464c030$%han@samsung.com> (raw)
In-Reply-To: <000401ceb7f7$6af17fe0$40d47fa0$%han@samsung.com>
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/scsi/megaraid/megaraid_mbox.c | 6 ------
drivers/scsi/megaraid/megaraid_sas_base.c | 5 -----
2 files changed, 11 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index 515c962..d1a4b82 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -534,7 +534,6 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
return 0;
out_cmm_unreg:
- pci_set_drvdata(pdev, NULL);
megaraid_cmm_unregister(adapter);
out_fini_mbox:
megaraid_fini_mbox(adapter);
@@ -594,11 +593,6 @@ megaraid_detach_one(struct pci_dev *pdev)
// detach from the IO sub-system
megaraid_io_detach(adapter);
- // reset the device state in the PCI structure. We check this
- // condition when we enter here. If the device state is NULL,
- // that would mean the device has already been removed
- pci_set_drvdata(pdev, NULL);
-
// Unregister from common management module
//
// FIXME: this must return success or failure for conditions if there
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 3020921..a6efc1e 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -4449,7 +4449,6 @@ retry_irq_register:
megasas_mgmt_info.instance[megasas_mgmt_info.max_index] = NULL;
megasas_mgmt_info.max_index--;
- pci_set_drvdata(pdev, NULL);
instance->instancet->disable_intr(instance);
if (instance->msix_vectors)
for (i = 0 ; i < instance->msix_vectors; i++)
@@ -4805,8 +4804,6 @@ static void megasas_detach_one(struct pci_dev *pdev)
}
}
- pci_set_drvdata(instance->pdev, NULL);
-
instance->instancet->disable_intr(instance);
if (instance->msix_vectors)
@@ -4848,8 +4845,6 @@ static void megasas_detach_one(struct pci_dev *pdev)
instance->evt_detail, instance->evt_detail_h);
scsi_host_put(host);
- pci_set_drvdata(pdev, NULL);
-
pci_disable_device(pdev);
return;
--
1.7.10.4
next prev parent reply other threads:[~2013-09-23 1:03 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-23 0:54 [PATCH 00/20] [SCSI] remove unnecessary pci_set_drvdata() Jingoo Han
2013-09-23 0:55 ` [PATCH 01/20] [SCSI] lpfc 8.3.42: " Jingoo Han
2013-09-23 0:57 ` [PATCH 02/20] [SCSI] arcmsr: " Jingoo Han
2013-09-23 0:58 ` [PATCH 03/20] [SCSI] atp870u: " Jingoo Han
2013-09-23 0:59 ` [PATCH 04/20] [SCSI] bfa: " Jingoo Han
2013-09-23 1:00 ` [PATCH 05/20] [SCSI] csiostor: " Jingoo Han
2013-09-23 1:01 ` [PATCH 06/20] [SCSI] fnic: " Jingoo Han
2013-09-23 1:02 ` [PATCH 07/20] [SCSI] gdth: " Jingoo Han
2013-09-23 1:03 ` [PATCH 08/20] [SCSI] hpsa: " Jingoo Han
2013-09-23 1:03 ` Jingoo Han [this message]
2013-09-23 1:05 ` [PATCH 10/20] [SCSI] mvumi: " Jingoo Han
2013-09-23 1:06 ` [PATCH 11/20] [SCSI] mvsas: " Jingoo Han
2013-09-23 1:08 ` [PATCH 12/20] [SCSI] pm80xx: " Jingoo Han
2013-09-23 1:09 ` [PATCH 13/20] [SCSI] pmcraid: " Jingoo Han
2013-09-23 1:10 ` [PATCH 14/20] [SCSI] qla2xxx: " Jingoo Han
2013-09-23 1:11 ` [PATCH 15/20] [SCSI] qla4xxx: " Jingoo Han
2013-09-23 1:12 ` [PATCH 16/20] [SCSI] stex: " Jingoo Han
2013-09-23 1:12 ` [PATCH 17/20] [SCSI] ufs: " Jingoo Han
2013-09-23 1:13 ` [PATCH 18/20] [SCSI] vmw_pvscsi: " Jingoo Han
2013-09-23 1:15 ` [PATCH 19/20] [SCSI] dc395x: " Jingoo Han
2013-09-23 1:16 ` [PATCH 20/20] [SCSI] tmscsim: " Jingoo Han
2013-09-23 6:29 ` Guennadi Liakhovetski
2013-09-23 18:55 ` [PATCH 00/20] [SCSI] " James Bottomley
2013-09-24 1:19 ` Jingoo Han
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000d01ceb7f8$c6cc4010$5464c030$%han@samsung.com' \
--to=jg1.han@samsung.com \
--cc=JBottomley@Parallels.com \
--cc=linux-scsi@vger.kernel.org \
--cc=megaraidlinux@lsi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).