Skip to contentSkip to conversation

drivers/scsi/scsi_transport_fc.c: #0 unused code

PATCH In review Adrian Bunk 2 participants 2 messages Feb 28, 2005 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/scsi/scsi_transport_fc.c: #0 unused code

This patch #if 0's the following EXPORT_SYMBOL'ed but unused functions:
- fc_target_block
- fc_target_unblock
- fc_host_block
- fc_host_unblock

---

If the inclusion of code using these functions into the kernel is pending, please ignore my patch.

 drivers/scsi/scsi_transport_fc.c |   10 ++++++++++
 include/scsi/scsi_transport_fc.h |    4 ----
 2 files changed, 10 insertions(+), 4 deletions(-)
include/scsi/scsi_transport_fc.h renamed from include/scsi/scsi_transport_fc.h.old +0 -4
@@ -316,9 +316,5 @@
 
 struct scsi_transport_template *fc_attach_transport(struct fc_function_template *);
 void fc_release_transport(struct scsi_transport_template *);
-int fc_target_block(struct scsi_target *starget);
-void fc_target_unblock(struct scsi_target *starget);
-int fc_host_block(struct Scsi_Host *shost);
-void fc_host_unblock(struct Scsi_Host *shost);
 
 #endif /* SCSI_TRANSPORT_FC_H */
drivers/scsi/scsi_transport_fc.c renamed from drivers/scsi/scsi_transport_fc.c.old +10 -0
@@ -845,10 +845,12 @@
  * @dev:	scsi device
  * @data:	unused
  **/
+#if 0
 static void fc_device_block(struct scsi_device *sdev, void *data)
 {
 	scsi_internal_device_block(sdev);
 }
+#endif  /*  0  */
 
 /**
  * fc_device_unblock - called by target functions to unblock a scsi device
@@ -880,6 +882,8 @@
 	starget_for_each_device(starget, NULL, fc_device_unblock);
 }
 
+#if 0
+
 /**
  * fc_target_block - block a target by temporarily putting all its scsi devices
  *		into the SDEV_BLOCK state.
@@ -940,6 +944,8 @@
 }
 EXPORT_SYMBOL(fc_target_unblock);
 
+#endif  /*  0  */
+
 /**
  * fc_timeout_blocked_host - Timeout handler for blocked scsi hosts
  *			 that fail to recover in the alloted time.
@@ -964,6 +970,8 @@
 	}
 }
 
+#if 0
+
 /**
  * fc_host_block - block all scsi devices managed by the calling host temporarily 
  *		by putting each device in the SDEV_BLOCK state.
@@ -1031,6 +1039,8 @@
 }
 EXPORT_SYMBOL(fc_host_unblock);
 
+#endif  /*  0  */
+
 MODULE_AUTHOR("Martin Hicks");
 MODULE_DESCRIPTION("FC Transport Attributes");
 MODULE_LICENSE("GPL");
#1 lore raw
Quoted 5 lines · Adrian Bunk

This patch #if 0's the following EXPORT_SYMBOL'ed but unused functions:
- fc_target_block
- fc_target_unblock
- fc_host_block
- fc_host_unblock

A driver using them is scheduled to be merged soon, and at least one other will be updated to use this.