Re: [PATCH 2/3] preferred form for passing a size to memoryallocation routines

From: Harry Wei
Date: Sun May 15 2011 - 05:37:29 EST


On Sat, May 14, 2011 at 11:25:04PM +0530, anish wrote:
> The preferred form for passing a size of a struct is the following:
> p = kmalloc(sizeof(*p), ...);
> Please refer Documentation/Codingstyle chapter 14
> Signed-off-by: anish kumar<anish198519851985@xxxxxxxxx>
> - sfb = kzalloc(sizeof(struct smtcfb_info), GFP_KERNEL);
> + sfb = kzalloc(sizeof(*sfb), GFP_KERNEL);
Hi anish,
Good catch ;)
Acked-by: Harry Wei <harryxiyou@xxxxxxxxx>
--
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/