From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: "Woodhouse,
David" <david.woodhouse-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Linux I2C <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] i2c-i801: Don't depend on other kernel driver config options
Date: Sun, 15 May 2011 13:12:28 +0200 [thread overview]
Message-ID: <20110515131228.59e14178@endymion.delvare> (raw)
In-Reply-To: <1305282187.30435.343.camel-W2I5cNIroUsVm/YvaOjsyQ@public.gmane.org>
Hi David,
On Fri, 13 May 2011 11:23:06 +0100, Woodhouse, David wrote:
> On Fri, 2011-05-13 at 11:01 +0100, Jean Delvare wrote:
> > Don't let other driver config options influence us, as it makes the
> > code more complex and fragile for a small benefit. There's nothing
> > wrong with instantiating I2C devices even if they don't have a driver.
> > And we're talking about 835 extra bytes in the binary on x86-64,
> > that's hardly worth arguing about.
>
> Looks sane to me; thanks. Should it be CONFIG_DMI instead of (or in
> addition to) CONFIG_X86?
Instead of, no. IA64 has DMI but doesn't want this code.
In addition to, yes, that would make sense. I expected the extra code to
transparently vanish when CONFIG_DMI isn't set, but gcc is apparently
not smart enough for this, so it could use some help.
BTW, it may be desirable to make the apanel part depend on DMI, even if
DMI is technically not needed to find the slave address. Scanning the
BIOS memory for an arbitrary string is costly (a minimum of 4096 calls
to check_signature(), which in turn calls readb() at least once, in the
negative case.) Checking for the DMI vendor first should be way less
costly for the negative case.
I'll submit a new patch set later today, thanks for the suggestions.
--
Jean Delvare
prev parent reply other threads:[~2011-05-15 11:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-13 10:01 [PATCH] i2c-i801: Don't depend on other kernel driver config options Jean Delvare
[not found] ` <20110513120100.4d47410a-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-05-13 10:23 ` Woodhouse, David
[not found] ` <1305282187.30435.343.camel-W2I5cNIroUsVm/YvaOjsyQ@public.gmane.org>
2011-05-15 11:12 ` Jean Delvare [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=20110515131228.59e14178@endymion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=david.woodhouse-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox