diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2008-12-18 14:49:44 +0900 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-01-02 12:00:27 -0600 |
commit | b3376b4aaab4c348dfd2e0b7595dc12f64c9fac9 (patch) | |
tree | 07c2a3ba73e5f03d00bdea29fdc78aaf66a1096b /drivers/scsi | |
parent | 6620742f72d2fcf311e3fc8aa2476daa91fa3f31 (diff) | |
download | op-kernel-dev-b3376b4aaab4c348dfd2e0b7595dc12f64c9fac9.zip op-kernel-dev-b3376b4aaab4c348dfd2e0b7595dc12f64c9fac9.tar.gz |
[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 fec5568c7..ce1fd3a 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -189,7 +189,6 @@ static void normalize_buffer(struct st_buffer *); static int append_to_buffer(const char __user *, struct st_buffer *, int); static int from_buffer(struct st_buffer *, char __user *, int); static void move_buffer_data(struct st_buffer *, int); -static void buf_to_sg(struct st_buffer *, unsigned int); static int sgl_map_user_pages(struct st_buffer *, const unsigned int, unsigned long, size_t, int); @@ -554,8 +553,6 @@ st_do_scsi(struct st_request * SRpnt, struct scsi_tape * STp, unsigned char *cmd mdata->nr_entries = STp->buffer->sg_segs; mdata->pages = STp->buffer->mapped_pages; } else { - buf_to_sg(STp->buffer, bytes); - mdata->nr_entries = DIV_ROUND_UP(bytes, PAGE_SIZE << mdata->page_order); 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) } } - -/* Fill the s/g list up to the length required for this transfer */ -static void buf_to_sg(struct st_buffer *STbp, unsigned int length) -{ - int i; - unsigned int count; - struct scatterlist *sg; - struct st_buf_fragment *frp; - - if (length == STbp->frp_sg_current) - return; /* work already done */ - - sg = &(STbp->sg[0]); - frp = STbp->frp; - for (i=count=0; count < length; i++) { - if (length - count > frp[i].length) - sg_set_page(&sg[i], frp[i].page, frp[i].length, 0); - else - sg_set_page(&sg[i], frp[i].page, length - count, 0); - count += sg[i].length; - } - STbp->sg_segs = i; - STbp->frp_sg_current = length; -} - - /* Validate the options from command line or module parameters */ static void validate_options(void) { |