[lm-sensors] [PATCH] hwmon: (abituguru3) Support multiple DMI strings per chip ID (#2)

Jean Delvare khali at linux-fr.org
Sun Sep 6 16:06:55 CEST 2009


On Sun, 6 Sep 2009 14:55:08 +0100, Alistair John Strachan wrote:
> Hi Jean,
> 
> On Sunday 06 September 2009 13:03:51 Jean Delvare wrote:
> > On Sun,  6 Sep 2009 10:15:53 +0100, Alistair John Strachan wrote:
> > >  #ifdef CONFIG_DMI
> > > -	if (!abituguru3_motherboards[i].dmi_name) {
> > > +	if (!abituguru3_motherboards[i].dmi_name[0]) {
> > >  		printk(KERN_WARNING ABIT_UGURU3_NAME ": this motherboard was "
> > >  			"not detected using DMI. Please send the output of "
> > >  			"\"dmidecode\" to the abituguru3 maintainer "
> > 
> > This test is no longer as perfect as it used to be. Now that you admit
> > that each ID can correspond to more than one board model, it is
> > possible that the board was _not_ detected using DMI but this message
> > will not show (because another board with this ID is already known.)
> > While this is not a blocker, I still think it would be worth improving.
> 
> You're right. I think the message should go in abituguru3_init() after 
> abituguru3_detect() (legacy probing) succeeds. Because..
> 
> > Maybe I am missing something obvious, but why isn't this message
> > printed in abituguru3_dmi_detect() directly? This would be more
> > efficient and more elegant too IMHO.
> 
> I don't think it would be correct though. I assume we don't want to print 
> anything out if somebody loads the driver on truly unsupported hardware. In 
> this case abituguru3_dmi_detect() will fail (rightfully) and then the legacy 
> probe method will also fail (hopefully) and modprobe will fail. Nothing would 
> be printed.

You are perfectly correct :) I knew I was overlooking something!

Can you please either update your patch, or send a second, incremental
one fixing the problem?

> There's the unfortunate case where DMI match can fail (due to incomplete 
> cataloguing of strings) and the legacy probe can also fail (due to it being 
> rubbish) and this can also result in no messages being printed for supported 
> hardware. However, I don't think there's much we can do about that.

That's right. But that should be rare enough that it doesn't matter,
especially when hopefully the affected user would report the lack of
functionality so we finally know about the problem.

-- 
Jean Delvare




More information about the lm-sensors mailing list