diff options
author | Christoph Hellwig <hch@lst.de> | 2014-04-15 06:26:54 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-07-17 16:07:45 -0400 |
commit | f1bea55d5afa371c311b61946c58b2cd4e78fb2d (patch) | |
tree | 3f20d56cdea463b810254e47f96364e651cf4c36 | |
parent | aa3fc09078da889d5ffc7ed2745760ce04bf7384 (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.c | 10 | ||||
-rw-r--r-- | drivers/scsi/scsi_lib.c | 6 | ||||
-rw-r--r-- | include/scsi/scsi_cmnd.h | 3 | ||||
-rw-r--r-- | include/scsi/scsi_host.h | 2 |
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 | */ |
238 | struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *shost, gfp_t gfp_mask) | 238 | static 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 | } |
268 | EXPORT_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 | } |
294 | EXPORT_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 | */ |
301 | void __scsi_put_command(struct Scsi_Host *shost, struct scsi_cmnd *cmd) | 300 | static 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 | } |
317 | EXPORT_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 | } |
341 | EXPORT_SYMBOL(scsi_put_command); | ||
342 | 339 | ||
343 | static struct scsi_host_cmd_pool * | 340 | static struct scsi_host_cmd_pool * |
344 | scsi_find_host_cmd_pool(struct Scsi_Host *shost) | 341 | scsi_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 | } |
804 | EXPORT_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 | */ |
582 | void scsi_release_buffers(struct scsi_cmnd *cmd) | 582 | static 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 | } |
592 | EXPORT_SYMBOL(scsi_release_buffers); | ||
593 | 592 | ||
594 | static void scsi_release_bidi_buffers(struct scsi_cmnd *cmd) | 593 | static 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 | ||
1612 | u64 scsi_calculate_bounce_limit(struct Scsi_Host *shost) | 1611 | static 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 | } |
1632 | EXPORT_SYMBOL(scsi_calculate_bounce_limit); | ||
1633 | 1631 | ||
1634 | struct request_queue *__scsi_alloc_queue(struct Scsi_Host *shost, | 1632 | struct 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 | ||
152 | extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t); | 152 | extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t); |
153 | extern struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *, gfp_t); | ||
154 | extern void scsi_put_command(struct scsi_cmnd *); | 153 | extern void scsi_put_command(struct scsi_cmnd *); |
155 | extern void __scsi_put_command(struct Scsi_Host *, struct scsi_cmnd *); | ||
156 | extern void scsi_finish_command(struct scsi_cmnd *cmd); | 154 | extern void scsi_finish_command(struct scsi_cmnd *cmd); |
157 | 155 | ||
158 | extern void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count, | 156 | extern 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, | |||
160 | extern void scsi_kunmap_atomic_sg(void *virt); | 158 | extern void scsi_kunmap_atomic_sg(void *virt); |
161 | 159 | ||
162 | extern int scsi_init_io(struct scsi_cmnd *cmd, gfp_t gfp_mask); | 160 | extern int scsi_init_io(struct scsi_cmnd *cmd, gfp_t gfp_mask); |
163 | extern void scsi_release_buffers(struct scsi_cmnd *cmd); | ||
164 | 161 | ||
165 | extern int scsi_dma_map(struct scsi_cmnd *cmd); | 162 | extern int scsi_dma_map(struct scsi_cmnd *cmd); |
166 | extern void scsi_dma_unmap(struct scsi_cmnd *cmd); | 163 | extern 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); | |||
795 | extern const char *scsi_host_state_name(enum scsi_host_state); | 795 | extern const char *scsi_host_state_name(enum scsi_host_state); |
796 | extern void scsi_cmd_get_serial(struct Scsi_Host *, struct scsi_cmnd *); | 796 | extern void scsi_cmd_get_serial(struct Scsi_Host *, struct scsi_cmnd *); |
797 | 797 | ||
798 | extern u64 scsi_calculate_bounce_limit(struct Scsi_Host *); | ||
799 | |||
800 | static inline int __must_check scsi_add_host(struct Scsi_Host *host, | 798 | static inline int __must_check scsi_add_host(struct Scsi_Host *host, |
801 | struct device *dev) | 799 | struct device *dev) |
802 | { | 800 | { |