diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2008-12-18 14:49:48 +0900 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-01-02 12:02:01 -0600 |
commit | 1ac63cf5c05f956f52ab418a07f77d12328f3b5f (patch) | |
tree | 4bcdf0a4f13e0cb6b54b13b612b024be9340d2b6 /drivers/scsi/st.c | |
parent | f409d6cc688d4e87b0ebf577b6554695e1931705 (diff) | |
download | linux-3.10-1ac63cf5c05f956f52ab418a07f77d12328f3b5f.tar.gz linux-3.10-1ac63cf5c05f956f52ab418a07f77d12328f3b5f.tar.bz2 linux-3.10-1ac63cf5c05f956f52ab418a07f77d12328f3b5f.zip |
[SCSI] st: remove unused orig_frp_segs
orig_frp_segs in struct st_buffer is always zero. We don't need it.
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/st.c')
-rw-r--r-- | drivers/scsi/st.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 22ddca891e1..50dbe14db37 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -3749,7 +3749,7 @@ static struct st_buffer *new_tape_buffer(int need_dma, int max_sg) printk(KERN_NOTICE "st: Can't allocate new tape buffer.\n"); return NULL; } - tb->frp_segs = tb->orig_frp_segs = 0; + tb->frp_segs = 0; tb->use_sg = max_sg; tb->dma = need_dma; tb->buffer_size = 0; @@ -3839,11 +3839,11 @@ static void normalize_buffer(struct st_buffer * STbuffer) { int i, order = STbuffer->map_data.page_order; - for (i = STbuffer->orig_frp_segs; i < STbuffer->frp_segs; i++) { + for (i = 0; i < STbuffer->frp_segs; i++) { __free_pages(STbuffer->reserved_pages[i], order); STbuffer->buffer_size -= (PAGE_SIZE << order); } - STbuffer->frp_segs = STbuffer->orig_frp_segs; + STbuffer->frp_segs = 0; STbuffer->frp_sg_current = 0; STbuffer->sg_segs = 0; STbuffer->map_data.page_order = 0; @@ -4304,7 +4304,6 @@ static void scsi_tape_release(struct kref *kref) tpnt->device = NULL; if (tpnt->buffer) { - tpnt->buffer->orig_frp_segs = 0; normalize_buffer(tpnt->buffer); kfree(tpnt->buffer->reserved_pages); kfree(tpnt->buffer); |