Re: [PATCH 1/2] Conversions from kmalloc+memset to k(z|c)alloc

From: Rolf Eike Beer
Date: Wed Jul 19 2006 - 02:20:47 EST


Added linux-scsi to CC as it touches drivers/scsi/

> /* stuff a sense request in front of our current request */
> - pc = kmalloc (sizeof (idescsi_pc_t), GFP_ATOMIC);
> + pc = kzalloc (sizeof (idescsi_pc_t), GFP_ATOMIC);

Please remove the space before the arguments.

> rq = kmalloc (sizeof (struct request), GFP_ATOMIC);

This and the one before should be "rq = kzalloc(sizeof(*rq),...);" This way
you will always get the correct buffer size even if the type of rq changes.

Eike
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/