Skip to contentSkip to conversation

st: remove unused st_buffer.in_use

PATCH In review Martin Habets 2 participants 2 messages Jun 28, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 st: remove unused st_buffer.in_use

Hi,

I noticed that in_use in st_buffer is not used. The patch below against 2.6.17-rc3 removes it, assuming there is no future use for it. It was tested in a sparc SS20 with a DLT4000.

Please CC me as I'm not subscribed to the list.

Thanks,
Martin

---

drivers/scsi/st.h renamed from drivers/scsi/st.h.orig +0 -1
@@ -31,7 +31,6 @@
 
 /* The tape buffer descriptor. */
 struct st_buffer {
-	unsigned char in_use;
 	unsigned char dma;	/* DMA-able buffer */
 	unsigned char do_dio;   /* direct i/o set up? */
 	int buffer_size;
drivers/scsi/st.c renamed from drivers/scsi/st.c.orig +0 -1
@@ -3599,7 +3599,6 @@
 	tb->use_sg = max_sg;
 	tb->frp = (struct st_buf_fragment *)(&(tb->sg[0]) + max_sg);
 
-	tb->in_use = 1;
 	tb->dma = need_dma;
 	tb->buffer_size = got;
 
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Martin Habets

Hi,

I noticed that in_use in st_buffer is not used. The patch below against 2.6.17-rc3 removes it, assuming there is no future use for it. It was tested in a sparc SS20 with a DLT4000.

This is a remainder from the times when the buffers were shared if the number of drives was large. Thanks for noticing this dead code.

Quoted 7 lines

Please CC me as I'm not subscribed to the list.

Thanks,
Martin

Quoted 22 lines

---

drivers/scsi/st.h renamed from drivers/scsi/st.h.orig +0 -1
@@ -31,7 +31,6 @@
 
 /* The tape buffer descriptor. */
 struct st_buffer {
-	unsigned char in_use;
 	unsigned char dma;	/* DMA-able buffer */
 	unsigned char do_dio;   /* direct i/o set up? */
 	int buffer_size;
drivers/scsi/st.c renamed from drivers/scsi/st.c.orig +0 -1
@@ -3599,7 +3599,6 @@
 	tb->use_sg = max_sg;
 	tb->frp = (struct st_buf_fragment *)(&(tb->sg[0]) + max_sg);
 
-	tb->in_use = 1;
 	tb->dma = need_dma;
 	tb->buffer_size = got;