* [PATCH] scsi_device_put unused variable module without CONFIG_MODULE_UNLOAD
@ 2006-11-22 14:39 Andy Whitcroft
2006-11-22 15:15 ` James Bottomley
0 siblings, 1 reply; 2+ messages in thread
From: Andy Whitcroft @ 2006-11-22 14:39 UTC (permalink / raw)
To: James.Bottomley, linux-scsi; +Cc: Andrew Morton, apw
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)
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] scsi_device_put unused variable module without CONFIG_MODULE_UNLOAD
2006-11-22 14:39 [PATCH] scsi_device_put unused variable module without CONFIG_MODULE_UNLOAD Andy Whitcroft
@ 2006-11-22 15:15 ` James Bottomley
0 siblings, 0 replies; 2+ messages in thread
From: James Bottomley @ 2006-11-22 15:15 UTC (permalink / raw)
To: Andy Whitcroft; +Cc: linux-scsi, Andrew Morton
On Wed, 2006-11-22 at 14:39 +0000, Andy Whitcroft wrote:
> 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'
Actually, the fix for this is already in scsi-misc, so it should be
making its way into -mm.
James
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-11-22 15:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-22 14:39 [PATCH] scsi_device_put unused variable module without CONFIG_MODULE_UNLOAD Andy Whitcroft
2006-11-22 15:15 ` James Bottomley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox