* [lm-sensors] [PATCH] hwmon: (tmp401) Fix off-by-one error in chip
@ 2009-06-02 8:18 Andre Prendel
2009-06-02 8:26 ` [lm-sensors] [PATCH] hwmon: (tmp401) Fix off-by-one error in Hans de Goede
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Andre Prendel @ 2009-06-02 8:18 UTC (permalink / raw)
To: lm-sensors
This patch fixes an off-by-one error in chip detection output.
I2C kind starts with 1, so this cannot be used directly as the array index.
Signed-off-by: Andre Prendel <andre.prendel@gmx.de>
---
--- linux-2.6.orig/drivers/hwmon/tmp401.c 2009-05-29 23:09:58.000000000 +0200
+++ linux-2.6/drivers/hwmon/tmp401.c 2009-05-29 23:10:29.000000000 +0200
@@ -576,7 +576,7 @@
goto exit_remove;
}
dev_info(&client->dev, "Detected TI %s chip\n",
- names[data->kind]);
+ names[data->kind - 1]);
return 0;
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [lm-sensors] [PATCH] hwmon: (tmp401) Fix off-by-one error in
2009-06-02 8:18 [lm-sensors] [PATCH] hwmon: (tmp401) Fix off-by-one error in chip Andre Prendel
@ 2009-06-02 8:26 ` Hans de Goede
2009-06-02 9:14 ` [lm-sensors] [PATCH] hwmon: (tmp401) Fix off-by-one error Andre Prendel
2009-06-02 9:55 ` [lm-sensors] [PATCH] hwmon: (tmp401) Fix off-by-one error in Jean Delvare
2 siblings, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2009-06-02 8:26 UTC (permalink / raw)
To: lm-sensors
Good catch!
Acked-by: Hans de Goede <hdegoede@redhat.com>
On 06/02/2009 10:18 AM, Andre Prendel wrote:
> This patch fixes an off-by-one error in chip detection output.
>
> I2C kind starts with 1, so this cannot be used directly as the array index.
>
> Signed-off-by: Andre Prendel<andre.prendel@gmx.de>
> ---
> --- linux-2.6.orig/drivers/hwmon/tmp401.c 2009-05-29 23:09:58.000000000 +0200
> +++ linux-2.6/drivers/hwmon/tmp401.c 2009-05-29 23:10:29.000000000 +0200
> @@ -576,7 +576,7 @@
> goto exit_remove;
> }
> dev_info(&client->dev, "Detected TI %s chip\n",
> - names[data->kind]);
> + names[data->kind - 1]);
>
> return 0;
>
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [lm-sensors] [PATCH] hwmon: (tmp401) Fix off-by-one error
2009-06-02 8:18 [lm-sensors] [PATCH] hwmon: (tmp401) Fix off-by-one error in chip Andre Prendel
2009-06-02 8:26 ` [lm-sensors] [PATCH] hwmon: (tmp401) Fix off-by-one error in Hans de Goede
@ 2009-06-02 9:14 ` Andre Prendel
2009-06-02 9:55 ` [lm-sensors] [PATCH] hwmon: (tmp401) Fix off-by-one error in Jean Delvare
2 siblings, 0 replies; 4+ messages in thread
From: Andre Prendel @ 2009-06-02 9:14 UTC (permalink / raw)
To: lm-sensors
On Tue, Jun 02, 2009 at 10:26:28AM +0200, Hans de Goede wrote:
> Good catch!
Unfortunately this bug was introduced by myself :(
I didn't read your code from fschmd carefully enough.
Andre
> Acked-by: Hans de Goede <hdegoede@redhat.com>
>
> On 06/02/2009 10:18 AM, Andre Prendel wrote:
> > This patch fixes an off-by-one error in chip detection output.
> >
> > I2C kind starts with 1, so this cannot be used directly as the array index.
> >
> > Signed-off-by: Andre Prendel<andre.prendel@gmx.de>
> > ---
> > --- linux-2.6.orig/drivers/hwmon/tmp401.c 2009-05-29 23:09:58.000000000 +0200
> > +++ linux-2.6/drivers/hwmon/tmp401.c 2009-05-29 23:10:29.000000000 +0200
> > @@ -576,7 +576,7 @@
> > goto exit_remove;
> > }
> > dev_info(&client->dev, "Detected TI %s chip\n",
> > - names[data->kind]);
> > + names[data->kind - 1]);
> >
> > return 0;
> >
>
> _______________________________________________
> lm-sensors mailing list
> lm-sensors@lm-sensors.org
> http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [lm-sensors] [PATCH] hwmon: (tmp401) Fix off-by-one error in
2009-06-02 8:18 [lm-sensors] [PATCH] hwmon: (tmp401) Fix off-by-one error in chip Andre Prendel
2009-06-02 8:26 ` [lm-sensors] [PATCH] hwmon: (tmp401) Fix off-by-one error in Hans de Goede
2009-06-02 9:14 ` [lm-sensors] [PATCH] hwmon: (tmp401) Fix off-by-one error Andre Prendel
@ 2009-06-02 9:55 ` Jean Delvare
2 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2009-06-02 9:55 UTC (permalink / raw)
To: lm-sensors
On Tue, 2 Jun 2009 11:14:15 +0200, Andre Prendel wrote:
> On Tue, Jun 02, 2009 at 10:26:28AM +0200, Hans de Goede wrote:
> > Good catch!
>
> Unfortunately this bug was introduced by myself :(
> I didn't read your code from fschmd carefully enough.
The patch which introduces the bug isn't merged yet, so I will simply
fold the fix into that patch. Thanks!
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-02 9:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-02 8:18 [lm-sensors] [PATCH] hwmon: (tmp401) Fix off-by-one error in chip Andre Prendel
2009-06-02 8:26 ` [lm-sensors] [PATCH] hwmon: (tmp401) Fix off-by-one error in Hans de Goede
2009-06-02 9:14 ` [lm-sensors] [PATCH] hwmon: (tmp401) Fix off-by-one error Andre Prendel
2009-06-02 9:55 ` [lm-sensors] [PATCH] hwmon: (tmp401) Fix off-by-one error in 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.