diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2008-12-18 00:49:44 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-01-02 13:00:27 -0500 |
commit | b3376b4aaab4c348dfd2e0b7595dc12f64c9fac9 (patch) | |
tree | 07c2a3ba73e5f03d00bdea29fdc78aaf66a1096b /drivers/scsi | |
parent | 6620742f72d2fcf311e3fc8aa2476daa91fa3f31 (diff) |
[SCSI] st: remove buf_to_sg
This removes unused buf_to_sg() that the non-dio path used.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Kai Makisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/st.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index fec5568c711a..ce1fd3ab243b 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -189,7 +189,6 @@ static void normalize_buffer(struct st_buffer *); | |||
189 | static int append_to_buffer(const char __user *, struct st_buffer *, int); | 189 | static int append_to_buffer(const char __user *, struct st_buffer *, int); |
190 | static int from_buffer(struct st_buffer *, char __user *, int); | 190 | static int from_buffer(struct st_buffer *, char __user *, int); |
191 | static void move_buffer_data(struct st_buffer *, int); | 191 | static void move_buffer_data(struct st_buffer *, int); |
192 | static void buf_to_sg(struct st_buffer *, unsigned int); | ||
193 | 192 | ||
194 | static int sgl_map_user_pages(struct st_buffer *, const unsigned int, | 193 | static int sgl_map_user_pages(struct st_buffer *, const unsigned int, |
195 | unsigned long, size_t, int); | 194 | unsigned long, size_t, int); |
@@ -554,8 +553,6 @@ st_do_scsi(struct st_request * SRpnt, struct scsi_tape * STp, unsigned char *cmd | |||
554 | mdata->nr_entries = STp->buffer->sg_segs; | 553 | mdata->nr_entries = STp->buffer->sg_segs; |
555 | mdata->pages = STp->buffer->mapped_pages; | 554 | mdata->pages = STp->buffer->mapped_pages; |
556 | } else { | 555 | } else { |
557 | buf_to_sg(STp->buffer, bytes); | ||
558 | |||
559 | mdata->nr_entries = | 556 | mdata->nr_entries = |
560 | DIV_ROUND_UP(bytes, PAGE_SIZE << mdata->page_order); | 557 | DIV_ROUND_UP(bytes, PAGE_SIZE << mdata->page_order); |
561 | STp->buffer->map_data.pages = STp->buffer->reserved_pages; | 558 | STp->buffer->map_data.pages = STp->buffer->reserved_pages; |
@@ -3964,32 +3961,6 @@ static void move_buffer_data(struct st_buffer * st_bp, int offset) | |||
3964 | } | 3961 | } |
3965 | } | 3962 | } |
3966 | 3963 | ||
3967 | |||
3968 | /* Fill the s/g list up to the length required for this transfer */ | ||
3969 | static void buf_to_sg(struct st_buffer *STbp, unsigned int length) | ||
3970 | { | ||
3971 | int i; | ||
3972 | unsigned int count; | ||
3973 | struct scatterlist *sg; | ||
3974 | struct st_buf_fragment *frp; | ||
3975 | |||
3976 | if (length == STbp->frp_sg_current) | ||
3977 | return; /* work already done */ | ||
3978 | |||
3979 | sg = &(STbp->sg[0]); | ||
3980 | frp = STbp->frp; | ||
3981 | for (i=count=0; count < length; i++) { | ||
3982 | if (length - count > frp[i].length) | ||
3983 | sg_set_page(&sg[i], frp[i].page, frp[i].length, 0); | ||
3984 | else | ||
3985 | sg_set_page(&sg[i], frp[i].page, length - count, 0); | ||
3986 | count += sg[i].length; | ||
3987 | } | ||
3988 | STbp->sg_segs = i; | ||
3989 | STbp->frp_sg_current = length; | ||
3990 | } | ||
3991 | |||
3992 | |||
3993 | /* Validate the options from command line or module parameters */ | 3964 | /* Validate the options from command line or module parameters */ |
3994 | static void validate_options(void) | 3965 | static void validate_options(void) |
3995 | { | 3966 | { |