All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH v2] lm-sensors: Fix error seen with
@ 2010-10-19 18:19 Guenter Roeck
  2010-10-19 18:40 ` Jean Delvare
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Guenter Roeck @ 2010-10-19 18:19 UTC (permalink / raw)
  To: lm-sensors

The following patch fixes an error seen in sensors-detect if i2c bus numbering
is not sequential. Problem is that in this case, $i2c_adapters[] does not exist
for all index values, causing an error message whenever one of the non-existing
objects is accessed.

The error message is:
        Use of uninitialized value in string eq at ./sensors-detect line 5941.

v2: Keep foreach loop. Check if loop object is defined in each iteration.

--
Index: prog/detect/sensors-detect
=================================--- prog/detect/sensors-detect	(revision 5868)
+++ prog/detect/sensors-detect	(working copy)
@@ -5937,6 +5937,7 @@
 	# the adapter drivers so that the numbers will be the same. If not, then
 	# we only load the adapter drivers which are useful.
 	foreach $adap (@i2c_adapters) {
+		next unless defined $adap;
 		next if $adap->{autoload};
 		next if $adap->{driver} eq 'UNKNOWN';
 		next if not defined $configfile and not $adap->{used};

_______________________________________________
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 v2] lm-sensors: Fix error seen with
  2010-10-19 18:19 [lm-sensors] [PATCH v2] lm-sensors: Fix error seen with Guenter Roeck
@ 2010-10-19 18:40 ` Jean Delvare
  2010-10-19 20:06 ` Guenter Roeck
  2010-10-19 20:09 ` Guenter Roeck
  2 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2010-10-19 18:40 UTC (permalink / raw)
  To: lm-sensors

On Tue, 19 Oct 2010 11:19:44 -0700, Guenter Roeck wrote:
> The following patch fixes an error seen in sensors-detect if i2c bus numbering
> is not sequential. Problem is that in this case, $i2c_adapters[] does not exist
> for all index values, causing an error message whenever one of the non-existing
> objects is accessed.
> 
> The error message is:
>         Use of uninitialized value in string eq at ./sensors-detect line 5941.
> 
> v2: Keep foreach loop. Check if loop object is defined in each iteration.
> 
> --
> Index: prog/detect/sensors-detect
> =================================> --- prog/detect/sensors-detect	(revision 5868)
> +++ prog/detect/sensors-detect	(working copy)
> @@ -5937,6 +5937,7 @@
>  	# the adapter drivers so that the numbers will be the same. If not, then
>  	# we only load the adapter drivers which are useful.
>  	foreach $adap (@i2c_adapters) {
> +		next unless defined $adap;
>  		next if $adap->{autoload};
>  		next if $adap->{driver} eq 'UNKNOWN';
>  		next if not defined $configfile and not $adap->{used};
> 

Looks good, please commit and add to the list of recommended patches.

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

* Re: [lm-sensors] [PATCH v2] lm-sensors: Fix error seen with
  2010-10-19 18:19 [lm-sensors] [PATCH v2] lm-sensors: Fix error seen with Guenter Roeck
  2010-10-19 18:40 ` Jean Delvare
@ 2010-10-19 20:06 ` Guenter Roeck
  2010-10-19 20:09 ` Guenter Roeck
  2 siblings, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2010-10-19 20:06 UTC (permalink / raw)
  To: lm-sensors

On Tue, 2010-10-19 at 14:40 -0400, Jean Delvare wrote:
> On Tue, 19 Oct 2010 11:19:44 -0700, Guenter Roeck wrote:
> > The following patch fixes an error seen in sensors-detect if i2c bus numbering
> > is not sequential. Problem is that in this case, $i2c_adapters[] does not exist
> > for all index values, causing an error message whenever one of the non-existing
> > objects is accessed.
> > 
> > The error message is:
> >         Use of uninitialized value in string eq at ./sensors-detect line 5941.
> > 
> > v2: Keep foreach loop. Check if loop object is defined in each iteration.
> > 
> > --
> > Index: prog/detect/sensors-detect
> > =================================> > --- prog/detect/sensors-detect	(revision 5868)
> > +++ prog/detect/sensors-detect	(working copy)
> > @@ -5937,6 +5937,7 @@
> >  	# the adapter drivers so that the numbers will be the same. If not, then
> >  	# we only load the adapter drivers which are useful.
> >  	foreach $adap (@i2c_adapters) {
> > +		next unless defined $adap;
> >  		next if $adap->{autoload};
> >  		next if $adap->{driver} eq 'UNKNOWN';
> >  		next if not defined $configfile and not $adap->{used};
> > 
> 
> Looks good, please commit and add to the list of recommended patches.
> 
The list of recommended patches on lm-sensors.org currently points to
r5768. Should that be r5868 ?

Guenter



_______________________________________________
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 v2] lm-sensors: Fix error seen with
  2010-10-19 18:19 [lm-sensors] [PATCH v2] lm-sensors: Fix error seen with Guenter Roeck
  2010-10-19 18:40 ` Jean Delvare
  2010-10-19 20:06 ` Guenter Roeck
@ 2010-10-19 20:09 ` Guenter Roeck
  2 siblings, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2010-10-19 20:09 UTC (permalink / raw)
  To: lm-sensors

On Tue, 2010-10-19 at 16:06 -0400, Guenter Roeck wrote:
> On Tue, 2010-10-19 at 14:40 -0400, Jean Delvare wrote:
> > On Tue, 19 Oct 2010 11:19:44 -0700, Guenter Roeck wrote:
> > > The following patch fixes an error seen in sensors-detect if i2c bus numbering
> > > is not sequential. Problem is that in this case, $i2c_adapters[] does not exist
> > > for all index values, causing an error message whenever one of the non-existing
> > > objects is accessed.
> > > 
> > > The error message is:
> > >         Use of uninitialized value in string eq at ./sensors-detect line 5941.
> > > 
> > > v2: Keep foreach loop. Check if loop object is defined in each iteration.
> > > 
> > > --
> > > Index: prog/detect/sensors-detect
> > > =================================> > > --- prog/detect/sensors-detect	(revision 5868)
> > > +++ prog/detect/sensors-detect	(working copy)
> > > @@ -5937,6 +5937,7 @@
> > >  	# the adapter drivers so that the numbers will be the same. If not, then
> > >  	# we only load the adapter drivers which are useful.
> > >  	foreach $adap (@i2c_adapters) {
> > > +		next unless defined $adap;
> > >  		next if $adap->{autoload};
> > >  		next if $adap->{driver} eq 'UNKNOWN';
> > >  		next if not defined $configfile and not $adap->{used};
> > > 
> > 
> > Looks good, please commit and add to the list of recommended patches.
> > 
> The list of recommended patches on lm-sensors.org currently points to
> r5768. Should that be r5868 ?

Ignore this. That was for an older version of libsensors.

Guenter



_______________________________________________
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:[~2010-10-19 20:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-19 18:19 [lm-sensors] [PATCH v2] lm-sensors: Fix error seen with Guenter Roeck
2010-10-19 18:40 ` Jean Delvare
2010-10-19 20:06 ` Guenter Roeck
2010-10-19 20:09 ` Guenter Roeck

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.