All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [RFC PATCH] hwmon sysfs class, again
@ 2005-06-28  6:14 Mark M. Hoffman
  2005-06-28  9:29 ` [lm-sensors] " Greg KH
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Mark M. Hoffman @ 2005-06-28  6:14 UTC (permalink / raw)
  To: lm-sensors

Hi all:

Here are the "new and improved" hwmon sysfs class patches:

http://members.dca.net/mhoffman/sensors/temp/20050627/

Jean Delvare's recent patches[1] must be applied first.  I plan to submit
the hwmon/sysfs patches for inclusion into -mm shortly after Jean's are
submitted.

[1] http://lists.lm-sensors.org/pipermail/lm-sensors/2005-June/012850.html

Regards,

-- 
Mark M. Hoffman
mhoffman@lightlink.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [lm-sensors] Re: [RFC PATCH] hwmon sysfs class, again
  2005-06-28  6:14 [lm-sensors] [RFC PATCH] hwmon sysfs class, again Mark M. Hoffman
@ 2005-06-28  9:29 ` Greg KH
  2005-06-28 12:49 ` Jean Delvare
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2005-06-28  9:29 UTC (permalink / raw)
  To: lm-sensors

On Tue, Jun 28, 2005 at 12:14:14AM -0400, Mark M. Hoffman wrote:
> Hi all:
> 
> Here are the "new and improved" hwmon sysfs class patches:
> 
> http://members.dca.net/mhoffman/sensors/temp/20050627/
> 
> Jean Delvare's recent patches[1] must be applied first.  I plan to submit
> the hwmon/sysfs patches for inclusion into -mm shortly after Jean's are
> submitted.
> 
> [1] http://lists.lm-sensors.org/pipermail/lm-sensors/2005-June/012850.html

Looks good to me.

thanks,

greg k-h


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [lm-sensors] Re: [RFC PATCH] hwmon sysfs class, again
  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
  2005-07-06 17:40 ` Mark M. Hoffman
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Jean Delvare @ 2005-06-28 12:49 UTC (permalink / raw)
  To: lm-sensors


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [lm-sensors] Re: [RFC PATCH] hwmon sysfs class, again
  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
@ 2005-07-06 17:40 ` Mark M. Hoffman
  2005-07-06 21:40 ` Jean Delvare
  2005-07-15  8:38 ` Jean Delvare
  4 siblings, 0 replies; 6+ messages in thread
From: Mark M. Hoffman @ 2005-07-06 17:40 UTC (permalink / raw)
  To: lm-sensors

Hi Jean:

Thanks for the review.

* Jean Delvare <khali@linux-fr.org> [2005-06-28 12:44:07 +0200]:
> 
> 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.

right - fixed all of that

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

oops - fixed

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

Actually, there were two of those already in the file (probably by me though).
I prefer 'if (p)' myself, but the day job code style is stamped on my brain,
heh.  Anyway, they're fixed.

New patches here:

http://members.dca.net/mhoffman/sensors/temp/20050703/

Regards,

-- 
Mark M. Hoffman
mhoffman@lightlink.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [lm-sensors] Re: [RFC PATCH] hwmon sysfs class, again
  2005-06-28  6:14 [lm-sensors] [RFC PATCH] hwmon sysfs class, again Mark M. Hoffman
                   ` (2 preceding siblings ...)
  2005-07-06 17:40 ` Mark M. Hoffman
@ 2005-07-06 21:40 ` Jean Delvare
  2005-07-15  8:38 ` Jean Delvare
  4 siblings, 0 replies; 6+ messages in thread
From: Jean Delvare @ 2005-07-06 21:40 UTC (permalink / raw)
  To: lm-sensors

Hi Mark,

> New patches here:
> 
> http://members.dca.net/mhoffman/sensors/temp/20050703/

Works all OK for me :)

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [lm-sensors] Re: [RFC PATCH] hwmon sysfs class, again
  2005-06-28  6:14 [lm-sensors] [RFC PATCH] hwmon sysfs class, again Mark M. Hoffman
                   ` (3 preceding siblings ...)
  2005-07-06 21:40 ` Jean Delvare
@ 2005-07-15  8:38 ` Jean Delvare
  4 siblings, 0 replies; 6+ messages in thread
From: Jean Delvare @ 2005-07-15  8:38 UTC (permalink / raw)
  To: lm-sensors

Hi Mark,

> New patches here:
> 
> http://members.dca.net/mhoffman/sensors/temp/20050703/

Now that my patches moving all the drivers to the new place have been
accepted, could you please post these three patches here so that Greg
can pick them up?

(You can mark them as signed-off by me if you wish.)

Thanks,
-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-07-15  8:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2005-07-06 17:40 ` Mark M. Hoffman
2005-07-06 21:40 ` Jean Delvare
2005-07-15  8:38 ` Jean Delvare

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.