All of lore.kernel.org
 help / color / mirror / Atom feed
From: khali@linux-fr.org (Jean Delvare)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] Re: [RFC PATCH] hwmon sysfs class, again
Date: Tue, 28 Jun 2005 12:49:45 +0000	[thread overview]
Message-ID: <QhWrqi62.1119955447.2910230.khali@localhost> (raw)
In-Reply-To: <20050628041414.GA32087@jupiter.solarsys.private>


Hi Mark,

> Here are the "new and improved" hwmon sysfs class patches:
>
> http://members.dca.net/mhoffman/sensors/temp/20050627/

Looks all OK to me, except for:

> --- linux-2.6.12-git5.orig/drivers/hwmon/adm1026.c
> +++ linux-2.6.12-git5/drivers/hwmon/adm1026.c
> (...)
> @@ -1690,8 +1701,10 @@ int adm1026_detect(struct i2c_adapter *a
> (...)
>  exitfree:
> -	kfree(new_client);
> +	kfree(data);

Although this fix is correct, it would belong to
hwmon-chips-kfree-fix.patch, not hwmon-class-chips.patch.

Also, it looks to me like adm9240, smsc47m1 and smsc47b397 need the same
fix.

> --- linux-2.6.12-git5.orig/drivers/hwmon/asb100.c
> +++ linux-2.6.12-git5/drivers/hwmon/asb100.c
> (..)
> +        data->class_dev = hwmon_device_register(&new_client->dev);
> +        if (IS_ERR(data->class_dev)) {
> +                err = PTR_ERR(data->class_dev);
> +                goto ERROR3;
> +        }

Beware you are using spaces instead of tabulations here.

> --- linux-2.6.12-git5.orig/drivers/hwmon/w83781d.c
> +++ linux-2.6.12-git5/drivers/hwmon/w83781d.c
> (...)
> +ERROR4:
> +	if (NULL != data->lm75[1]) {
> +		i2c_detach_client(data->lm75[1]);
> +		kfree(data->lm75[1]);
> +	}
> +	if (NULL != data->lm75[0]) {
> +		i2c_detach_client(data->lm75[0]);
> +		kfree(data->lm75[0]);
> +	}

Please express the comparisons the other way around. I can guess why you
did it this way, but the usual style in the kernel is different and gcc
would warn you anyway.

Thanks,
--
Jean Delvare

  parent reply	other threads:[~2005-06-28 12:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-28  6:14 [lm-sensors] [RFC PATCH] hwmon sysfs class, again Mark M. Hoffman
2005-06-28  9:29 ` [lm-sensors] " Greg KH
2005-06-28 12:49 ` Jean Delvare [this message]
2005-07-06 17:40 ` Mark M. Hoffman
2005-07-06 21:40 ` Jean Delvare
2005-07-15  8:38 ` Jean Delvare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=QhWrqi62.1119955447.2910230.khali@localhost \
    --to=khali@linux-fr.org \
    --cc=lm-sensors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.