All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH 3/4] libsensors4: Fix corner case bug in
Date: Fri, 17 Aug 2007 19:46:27 +0000	[thread overview]
Message-ID: <46C5FB13.9070002@hhs.nl> (raw)
In-Reply-To: <20070817172123.3823d3d8@hyperion.delvare>

Jean Delvare wrote:
> Contrary to what the comment says, sensors_proc_bus_count may be a
> perfectly valid bus number. We need to use a different value for
> chip configuration entries we want to ignore.
> 

Looks good to me, can you commit these to svn before the end of the weekend, 
monday I'll be back at work and there I have several machines to test with, so 
if you can get all your changes into svn before monday then I can give svn a 
good testing with various setups @ work.

Regards,

Hans


> ---
>  lib/data.c    |    8 ++++----
>  lib/sensors.h |    1 +
>  2 files changed, 5 insertions(+), 4 deletions(-)
> 
> --- lm-sensors-3.orig/lib/data.c	2007-08-17 10:53:33.000000000 +0200
> +++ lm-sensors-3/lib/data.c	2007-08-17 10:57:46.000000000 +0200
> @@ -192,7 +192,7 @@ int sensors_substitute_chip(sensors_chip
>  
>  	if (i = sensors_config_busses_count) {
>  		sensors_parse_error("Undeclared bus id referenced", lineno);
> -		name->bus.nr = sensors_proc_bus_count;
> +		name->bus.nr = SENSORS_BUS_NR_IGNORE;
>  		return -SENSORS_ERR_BUS_NAME;
>  	}
>  
> @@ -205,9 +205,9 @@ int sensors_substitute_chip(sensors_chip
>  		}
>  	}
>  
> -	/* We did not find anything. sensors_proc_bus_count is not
> -	   a valid bus number, so it will never be matched. Good. */
> -	name->bus.nr = sensors_proc_bus_count;
> +	/* We did not find a matching bus name, simply ignore this chip
> +	   config entry. */
> +	name->bus.nr = SENSORS_BUS_NR_IGNORE;
>  	return 0;
>  }
>  
> --- lm-sensors-3.orig/lib/sensors.h	2007-08-17 09:24:35.000000000 +0200
> +++ lm-sensors-3/lib/sensors.h	2007-08-17 10:57:46.000000000 +0200
> @@ -34,6 +34,7 @@
>  #define SENSORS_BUS_TYPE_ISA	1
>  #define SENSORS_BUS_TYPE_PCI	2
>  #define SENSORS_BUS_NR_ANY	(-1)
> +#define SENSORS_BUS_NR_IGNORE	(-2)
>  
>  #ifdef __cplusplus
>  extern "C" {
> 
> 


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

      reply	other threads:[~2007-08-17 19:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-17 15:21 [lm-sensors] [PATCH 3/4] libsensors4: Fix corner case bug in Jean Delvare
2007-08-17 19:46 ` Hans de Goede [this message]

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=46C5FB13.9070002@hhs.nl \
    --to=j.w.r.degoede@hhs.nl \
    --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.