From: Andy Whitcroft <apw@shadowen.org>
To: James.Bottomley@SteelEye.com, linux-scsi@vger.kernel.org
Cc: Andrew Morton <akpm@osdl.org>, apw@shadowen.org
Subject: [PATCH] scsi_device_put unused variable module without CONFIG_MODULE_UNLOAD
Date: Wed, 22 Nov 2006 14:39:06 +0000 [thread overview]
Message-ID: <5b8c107f6d06b70065ca44309be0dcbf@pinky> (raw)
scsi_device_put: unused variable module without CONFIG_MODULE_UNLOAD
When CONFIG_MODULE_UNLOAD is not defined then the module variable
in scsi_device_put() becomes unused resulting in the warnings below.
Move this inside the existing #ifdef.
.../drivers/scsi/scsi.c:883: warning: unused variable 'module'
Against 2.6.19-rc5-mm2.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 680d72e..fafc00d 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -880,9 +880,9 @@ EXPORT_SYMBOL(scsi_device_get);
*/
void scsi_device_put(struct scsi_device *sdev)
{
+#ifdef CONFIG_MODULE_UNLOAD
struct module *module = sdev->host->hostt->module;
-#ifdef CONFIG_MODULE_UNLOAD
/* The module refcount will be zero if scsi_device_get()
* was called from a module removal routine */
if (module && module_refcount(module) != 0)
next reply other threads:[~2006-11-22 14:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-22 14:39 Andy Whitcroft [this message]
2006-11-22 15:15 ` [PATCH] scsi_device_put unused variable module without CONFIG_MODULE_UNLOAD James Bottomley
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=5b8c107f6d06b70065ca44309be0dcbf@pinky \
--to=apw@shadowen.org \
--cc=James.Bottomley@SteelEye.com \
--cc=akpm@osdl.org \
--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