Re: [PATCH] [HWMON] kmalloc + memset -> kzalloc conversion

From: Alexey Dobriyan
Date: Sat Oct 01 2005 - 17:33:17 EST


On Sun, Oct 02, 2005 at 07:45:36AM +1000, Grant Coady wrote:
> On Sat, 1 Oct 2005 22:46:04 +0200, Jean Delvare <khali@xxxxxxxxxxxx> wrote:
> >> - if (!(data = kmalloc(sizeof(struct adm1021_data), GFP_KERNEL))) {
> >> + if (!(data = kzalloc(sizeof(struct adm1021_data), GFP_KERNEL))) {
>
> if (!(data = kzalloc(sizeof(*data), GFP_KERNEL))) {
>
> instead?

One thing at a time. And leave sizeof(*p) vs sizeof(struct foo) to
maintainer, OK?

-
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/