[PATCH] scsi_device_put unused variable module without CONFIG_MODULE_UNLOAD

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

 



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@xxxxxxxxxxxx>
---
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)
-
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