aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-04-15 06:26:54 -0400
committerChristoph Hellwig <hch@lst.de>2014-07-17 16:07:45 -0400
commitf1bea55d5afa371c311b61946c58b2cd4e78fb2d (patch)
tree3f20d56cdea463b810254e47f96364e651cf4c36
parentaa3fc09078da889d5ffc7ed2745760ce04bf7384 (diff)
scsi: remove various exports that were only used by scsi_tgt
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.de>
-rw-r--r--drivers/scsi/scsi.c10
-rw-r--r--drivers/scsi/scsi_lib.c6
-rw-r--r--include/scsi/scsi_cmnd.h3
-rw-r--r--include/scsi/scsi_host.h2
4 files changed, 5 insertions, 16 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index ce5b4e5e7a5a..a76d76df4209 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -235,7 +235,8 @@ fail:
235 * Description: allocate a struct scsi_cmd from host's slab, recycling from the 235 * Description: allocate a struct scsi_cmd from host's slab, recycling from the
236 * host's free_list if necessary. 236 * host's free_list if necessary.
237 */ 237 */
238struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *shost, gfp_t gfp_mask) 238static struct scsi_cmnd *
239__scsi_get_command(struct Scsi_Host *shost, gfp_t gfp_mask)
239{ 240{
240 struct scsi_cmnd *cmd = scsi_host_alloc_command(shost, gfp_mask); 241 struct scsi_cmnd *cmd = scsi_host_alloc_command(shost, gfp_mask);
241 242
@@ -265,7 +266,6 @@ struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *shost, gfp_t gfp_mask)
265 266
266 return cmd; 267 return cmd;
267} 268}
268EXPORT_SYMBOL_GPL(__scsi_get_command);
269 269
270/** 270/**
271 * scsi_get_command - Allocate and setup a scsi command block 271 * scsi_get_command - Allocate and setup a scsi command block
@@ -291,14 +291,13 @@ struct scsi_cmnd *scsi_get_command(struct scsi_device *dev, gfp_t gfp_mask)
291 cmd->jiffies_at_alloc = jiffies; 291 cmd->jiffies_at_alloc = jiffies;
292 return cmd; 292 return cmd;
293} 293}
294EXPORT_SYMBOL(scsi_get_command);
295 294
296/** 295/**
297 * __scsi_put_command - Free a struct scsi_cmnd 296 * __scsi_put_command - Free a struct scsi_cmnd
298 * @shost: dev->host 297 * @shost: dev->host
299 * @cmd: Command to free 298 * @cmd: Command to free
300 */ 299 */
301void __scsi_put_command(struct Scsi_Host *shost, struct scsi_cmnd *cmd) 300static void __scsi_put_command(struct Scsi_Host *shost, struct scsi_cmnd *cmd)
302{ 301{
303 unsigned long flags; 302 unsigned long flags;
304 303
@@ -314,7 +313,6 @@ void __scsi_put_command(struct Scsi_Host *shost, struct scsi_cmnd *cmd)
314 if (likely(cmd != NULL)) 313 if (likely(cmd != NULL))
315 scsi_host_free_command(shost, cmd); 314 scsi_host_free_command(shost, cmd);
316} 315}
317EXPORT_SYMBOL(__scsi_put_command);
318 316
319/** 317/**
320 * scsi_put_command - Free a scsi command block 318 * scsi_put_command - Free a scsi command block
@@ -338,7 +336,6 @@ void scsi_put_command(struct scsi_cmnd *cmd)
338 336
339 __scsi_put_command(cmd->device->host, cmd); 337 __scsi_put_command(cmd->device->host, cmd);
340} 338}
341EXPORT_SYMBOL(scsi_put_command);
342 339
343static struct scsi_host_cmd_pool * 340static struct scsi_host_cmd_pool *
344scsi_find_host_cmd_pool(struct Scsi_Host *shost) 341scsi_find_host_cmd_pool(struct Scsi_Host *shost)
@@ -801,7 +798,6 @@ void scsi_finish_command(struct scsi_cmnd *cmd)
801 } 798 }
802 scsi_io_completion(cmd, good_bytes); 799 scsi_io_completion(cmd, good_bytes);
803} 800}
804EXPORT_SYMBOL(scsi_finish_command);
805 801
806/** 802/**
807 * scsi_adjust_queue_depth - Let low level drivers change a device's queue depth 803 * scsi_adjust_queue_depth - Let low level drivers change a device's queue depth
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 093e63207dc6..db7b7f2c14b8 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -579,7 +579,7 @@ static void scsi_free_sgtable(struct scsi_data_buffer *sdb)
579 * the __init_io() function. Primarily this would involve 579 * the __init_io() function. Primarily this would involve
580 * the scatter-gather table. 580 * the scatter-gather table.
581 */ 581 */
582void scsi_release_buffers(struct scsi_cmnd *cmd) 582static void scsi_release_buffers(struct scsi_cmnd *cmd)
583{ 583{
584 if (cmd->sdb.table.nents) 584 if (cmd->sdb.table.nents)
585 scsi_free_sgtable(&cmd->sdb); 585 scsi_free_sgtable(&cmd->sdb);
@@ -589,7 +589,6 @@ void scsi_release_buffers(struct scsi_cmnd *cmd)
589 if (scsi_prot_sg_count(cmd)) 589 if (scsi_prot_sg_count(cmd))
590 scsi_free_sgtable(cmd->prot_sdb); 590 scsi_free_sgtable(cmd->prot_sdb);
591} 591}
592EXPORT_SYMBOL(scsi_release_buffers);
593 592
594static void scsi_release_bidi_buffers(struct scsi_cmnd *cmd) 593static void scsi_release_bidi_buffers(struct scsi_cmnd *cmd)
595{ 594{
@@ -1609,7 +1608,7 @@ out_delay:
1609 blk_delay_queue(q, SCSI_QUEUE_DELAY); 1608 blk_delay_queue(q, SCSI_QUEUE_DELAY);
1610} 1609}
1611 1610
1612u64 scsi_calculate_bounce_limit(struct Scsi_Host *shost) 1611static u64 scsi_calculate_bounce_limit(struct Scsi_Host *shost)
1613{ 1612{
1614 struct device *host_dev; 1613 struct device *host_dev;
1615 u64 bounce_limit = 0xffffffff; 1614 u64 bounce_limit = 0xffffffff;
@@ -1629,7 +1628,6 @@ u64 scsi_calculate_bounce_limit(struct Scsi_Host *shost)
1629 1628
1630 return bounce_limit; 1629 return bounce_limit;
1631} 1630}
1632EXPORT_SYMBOL(scsi_calculate_bounce_limit);
1633 1631
1634struct request_queue *__scsi_alloc_queue(struct Scsi_Host *shost, 1632struct request_queue *__scsi_alloc_queue(struct Scsi_Host *shost,
1635 request_fn_proc *request_fn) 1633 request_fn_proc *request_fn)
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index e0ae71098144..73f349044941 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -150,9 +150,7 @@ static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd)
150} 150}
151 151
152extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t); 152extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t);
153extern struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *, gfp_t);
154extern void scsi_put_command(struct scsi_cmnd *); 153extern void scsi_put_command(struct scsi_cmnd *);
155extern void __scsi_put_command(struct Scsi_Host *, struct scsi_cmnd *);
156extern void scsi_finish_command(struct scsi_cmnd *cmd); 154extern void scsi_finish_command(struct scsi_cmnd *cmd);
157 155
158extern void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count, 156extern void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count,
@@ -160,7 +158,6 @@ extern void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count,
160extern void scsi_kunmap_atomic_sg(void *virt); 158extern void scsi_kunmap_atomic_sg(void *virt);
161 159
162extern int scsi_init_io(struct scsi_cmnd *cmd, gfp_t gfp_mask); 160extern int scsi_init_io(struct scsi_cmnd *cmd, gfp_t gfp_mask);
163extern void scsi_release_buffers(struct scsi_cmnd *cmd);
164 161
165extern int scsi_dma_map(struct scsi_cmnd *cmd); 162extern int scsi_dma_map(struct scsi_cmnd *cmd);
166extern void scsi_dma_unmap(struct scsi_cmnd *cmd); 163extern void scsi_dma_unmap(struct scsi_cmnd *cmd);
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index f7adfe0a6dc8..b2bc5198b7fb 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -795,8 +795,6 @@ extern struct Scsi_Host *scsi_host_lookup(unsigned short);
795extern const char *scsi_host_state_name(enum scsi_host_state); 795extern const char *scsi_host_state_name(enum scsi_host_state);
796extern void scsi_cmd_get_serial(struct Scsi_Host *, struct scsi_cmnd *); 796extern void scsi_cmd_get_serial(struct Scsi_Host *, struct scsi_cmnd *);
797 797
798extern u64 scsi_calculate_bounce_limit(struct Scsi_Host *);
799
800static inline int __must_check scsi_add_host(struct Scsi_Host *host, 798static inline int __must_check scsi_add_host(struct Scsi_Host *host,
801 struct device *dev) 799 struct device *dev)
802{ 800{