Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127889
b: refs/heads/master
c: b3d5911
h: refs/heads/master
i:
  127887: b9b8c95
v: v3
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Jan 2, 2009
1 parent d712a87 commit b2556c8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 08c95832427b449ecfb357696f7b8e239b79a72c
refs/heads/master: b3d59115ba2b2550d70eafd929f1fa607fe588dc
8 changes: 2 additions & 6 deletions trunk/drivers/scsi/st.c
Original file line number Diff line number Diff line change
Expand Up @@ -3744,7 +3744,7 @@ static long st_compat_ioctl(struct file *file, unsigned int cmd, unsigned long a
static struct st_buffer *
new_tape_buffer(int from_initialization, int need_dma, int max_sg)
{
int i, got = 0;
int got = 0;
gfp_t priority;
struct st_buffer *tb;

Expand All @@ -3753,10 +3753,7 @@ static struct st_buffer *
else
priority = GFP_KERNEL;

i = sizeof(struct st_buffer) +
(max_sg - 1) * sizeof(struct scatterlist);

tb = kzalloc(i, priority);
tb = kzalloc(sizeof(struct st_buffer), priority);
if (!tb) {
printk(KERN_NOTICE "st: Can't allocate new tape buffer.\n");
return NULL;
Expand All @@ -3766,7 +3763,6 @@ static struct st_buffer *

tb->dma = need_dma;
tb->buffer_size = got;
sg_init_table(tb->sg, max_sg);

tb->reserved_pages = kzalloc(max_sg * sizeof(struct page *), priority);
if (!tb->reserved_pages) {
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/scsi/st.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ struct st_buffer {
unsigned short orig_frp_segs; /* number of segments allocated at first try */
unsigned short frp_segs; /* number of buffer segments */
unsigned int frp_sg_current; /* driver buffer length currently in s/g list */
struct scatterlist sg[1]; /* MUST BE last item */
};

/* The tape mode definition */
Expand Down

0 comments on commit b2556c8

Please sign in to comment.