Commit 3e924164 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] i2o_config build fix

Stomp a C99ism.
parent b332ad9d
......@@ -891,12 +891,14 @@ static int ioctl_passthru(unsigned long arg)
memset(sg_list,0, sizeof(sg_list[0])*SG_TABLESIZE);
if(sg_offset) {
struct sg_simple_element *sg;
if(sg_offset * 4 >= size) {
rcode = -EFAULT;
goto cleanup;
}
// TODO 64bit fix
struct sg_simple_element *sg = (struct sg_simple_element*) (msg+sg_offset);
sg = (struct sg_simple_element*) (msg+sg_offset);
sg_count = (size - sg_offset*4) / sizeof(struct sg_simple_element);
if (sg_count > SG_TABLESIZE) {
printk(KERN_DEBUG"%s:IOCTL SG List too large (%u)\n", c->name,sg_count);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment