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

    > Signed-off-by: Deepak Saxena <>
    > 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

    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.

    Jean Delvare
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-10-01 22:48    [W:0.021 / U:131.320 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site