From: Guo Chao <yan@linux.vnet.ibm.com>
To: JBottomley@parallels.com
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH 3/3] scsi: sd: remove unnecessary initialization in sd_probe()
Date: Fri, 23 Nov 2012 11:06:47 +0800 [thread overview]
Message-ID: <1353640007-12834-3-git-send-email-yan@linux.vnet.ibm.com> (raw)
In-Reply-To: <1353640007-12834-1-git-send-email-yan@linux.vnet.ibm.com>
We use kzalloc() to allocate scsi_disk, no need to reset ->openers.
Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com>
---
drivers/scsi/sd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index e934ffc..d3b66a2 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2897,7 +2897,6 @@ static int sd_probe(struct device *dev)
sdkp->driver = &sd_template;
sdkp->disk = gd;
sdkp->index = index;
- atomic_set(&sdkp->openers, 0);
atomic_set(&sdkp->device->ioerr_cnt, 0);
if (!sdp->request_queue->rq_timeout) {
--
1.7.9.5
prev parent reply other threads:[~2012-11-23 3:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-23 3:06 [PATCH 1/3] scsi: sd: set valid return value in init_sd() Guo Chao
2012-11-23 3:06 ` [PATCH 2/3] scsi: sd: no need to set gendisk->minors in sd_probe_async() Guo Chao
2012-11-23 3:06 ` Guo Chao [this message]
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=1353640007-12834-3-git-send-email-yan@linux.vnet.ibm.com \
--to=yan@linux.vnet.ibm.com \
--cc=JBottomley@parallels.com \
--cc=linux-scsi@vger.kernel.org \
/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).