[PATCH] I2O: Optimizing
- make i2o_iop_free() static inline (from Adrian Bunk) - changed kmalloc() + memset(0) into kzalloc() Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

szülő
2e1973a3cd
commit
f6ed39a6e1
@@ -583,13 +583,12 @@ static int i2o_cfg_passthru32(struct file *file, unsigned cmnd,
|
||||
reply_size >>= 16;
|
||||
reply_size <<= 2;
|
||||
|
||||
reply = kmalloc(reply_size, GFP_KERNEL);
|
||||
reply = kzalloc(reply_size, GFP_KERNEL);
|
||||
if (!reply) {
|
||||
printk(KERN_WARNING "%s: Could not allocate reply buffer\n",
|
||||
c->name);
|
||||
return -ENOMEM;
|
||||
}
|
||||
memset(reply, 0, reply_size);
|
||||
|
||||
sg_offset = (msg->u.head[0] >> 4) & 0x0f;
|
||||
|
||||
@@ -817,13 +816,12 @@ static int i2o_cfg_passthru(unsigned long arg)
|
||||
reply_size >>= 16;
|
||||
reply_size <<= 2;
|
||||
|
||||
reply = kmalloc(reply_size, GFP_KERNEL);
|
||||
reply = kzalloc(reply_size, GFP_KERNEL);
|
||||
if (!reply) {
|
||||
printk(KERN_WARNING "%s: Could not allocate reply buffer\n",
|
||||
c->name);
|
||||
return -ENOMEM;
|
||||
}
|
||||
memset(reply, 0, reply_size);
|
||||
|
||||
sg_offset = (msg->u.head[0] >> 4) & 0x0f;
|
||||
|
||||
|
Reference in New Issue
Block a user