lkml.org 
[lkml]   [2005]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] [HWMON] kmalloc + memset -> kzalloc conversion
Hi Deepak,

> Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
>
> diff --git a/drivers/hwmon/adm1021.c b/drivers/hwmon/adm1021.c
> --- a/drivers/hwmon/adm1021.c
> +++ b/drivers/hwmon/adm1021.c
> @@ -204,11 +204,10 @@ static int adm1021_detect(struct i2c_ada
> client structure, even though we cannot fill it completely yet.
> But it allows us to access adm1021_{read,write}_value. */
>
> - if (!(data = kmalloc(sizeof(struct adm1021_data), GFP_KERNEL))) {
> + if (!(data = kzalloc(sizeof(struct adm1021_data), GFP_KERNEL))) {
> err = -ENOMEM;
> goto error0;
> }
> - memset(data, 0, sizeof(struct adm1021_data));
> (...)

OK, I'll pick that patch. Three comments however:

1* Please exclude adm9240, it is already updated in my tree.

2* Please add some comment before your Signed-off-line, explaining what
the patch is all about. It doesn't need to be long, but it needs to
exist.

3* Please include diffstat output in the patch header.

Care to respin your patch?

As a side note, I don't think it was worth sending this to Linus,
Andrew and two mailing lists. There's nothing ground breaking here.
Send this kind of patches to me as the subsystem maintainer, CC LKML
for comments if you want, and that should be sufficient.

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

\
 
 \ /
  Last update: 2005-10-01 22:48    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site