From: Alistair John Strachan <alistair@devzero.co.uk>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH 3/3] hwmon: (abituguru3) match partial DMI
Date: Tue, 21 Oct 2008 20:15:13 +0000 [thread overview]
Message-ID: <200810212115.13256.alistair@devzero.co.uk> (raw)
In-Reply-To: <1224608373-27352-4-git-send-email-alistair@devzero.co.uk>
Hi Jean,
On Tuesday 21 October 2008 20:53:00 Jean Delvare wrote:
[snip]
> So I don't think that the implementation above is safe, unless the
> entries in abituguru3_dmi_detect are sorted specifically to make the
> short string comparison always correct. But that's easy to screw this
> up later.
>
> An alternative would be to make a slightly more customized comparison
> function: instead of passing strlen(dmi_name) as the length parameter
> of strncmp(), you would compute the length by looking for the last
> non-space character before the opening parenthesis in board_name. This
> would require some more code, but would be more robust. Whether it's
> worth it, I'll leave up to you: either do that or leave the code as it
> is now.
Or drop the patch. Dropping patch 3/3 also works (at least on the boards it
was tested on) and the patch only plugs a theoretical problem, and ultimately
might pose more problems than it solves, as you outlined.
I don't think it's worth adding code which massages the length any further.
For example, there's nothing stopping Abit from putting out a future board
which uses parens in the model name too.
I'd currently vote to drop the patch, and, if it is discovered that the
problem we identified is more than theoretical, we can apply this patch as-is,
or rework it.
--
Cheers,
Alistair.
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2008-10-21 20:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-21 16:59 [lm-sensors] [PATCH 3/3] hwmon: (abituguru3) match partial DMI Alistair John Strachan
2008-10-21 17:19 ` Hans de Goede
2008-10-21 19:53 ` Jean Delvare
2008-10-21 20:15 ` Alistair John Strachan [this message]
2008-10-21 20:19 ` Jean Delvare
2008-10-22 7:36 ` Hans de Goede
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=200810212115.13256.alistair@devzero.co.uk \
--to=alistair@devzero.co.uk \
--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.