From: Jean Delvare <jdelvare@suse.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Wolfram Sang <wsa@the-dreams.de>,
linux-i2c@vger.kernel.org, Biwen Li <biwen.li@nxp.com>
Subject: Re: [PATCH] i2c: avoid ifdeffery in I2C drivers with optional slave support
Date: Fri, 17 Apr 2020 16:00:14 +0200 [thread overview]
Message-ID: <20200417160014.5604a16a@endymion> (raw)
In-Reply-To: <20200415051619.GP27288@pengutronix.de>
One last thing I meant to mention but forgot...
On Wed, 15 Apr 2020 07:16:19 +0200, Sascha Hauer wrote:
> static int i2c_imx_reg_slave(struct i2c_client *client)
> {
> if (!IS_ENABLED(CONFIG_I2C_SLAVE))
> return -ESOMETHING;
> ...
> }
>
> The code is gone without CONFIG_I2C_SLAVE enabled, yet the compile coverage
> is there.
Compile coverage is nice but it comes at a cost. With the approach
above, the code will be built, then discarded. When the code is
#ifdef'd out, it isn't built at all. This means that your approach,
although it has advantages, increases the build time.
And don't tell me "you only build once", we live at the time of
continuous integration so we keep building kernels. As a support
engineer, I build kernels daily, and even though I have access to a
powerful build farm for that purpose, it still takes 30 to 60 minutes
to get my kernel built each time. Obviously most of that time isn't
spent on the i2c-imx driver ;-) but if every piece of code does the
same, build time will inevitably increase.
--
Jean Delvare
SUSE L3 Support
next prev parent reply other threads:[~2020-04-17 14:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20191204095348.9192-1-s.hauer@pengutronix.de>
2020-04-09 13:40 ` [PATCH] i2c: avoid ifdeffery in I2C drivers with optional slave support Wolfram Sang
2020-04-10 9:29 ` Jean Delvare
2020-04-14 11:56 ` Sascha Hauer
2020-04-14 14:40 ` Jean Delvare
2020-04-15 5:16 ` Sascha Hauer
2020-04-15 9:51 ` Jean Delvare
2020-04-17 14:00 ` Jean Delvare [this message]
2020-04-20 6:12 ` Sascha Hauer
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=20200417160014.5604a16a@endymion \
--to=jdelvare@suse.de \
--cc=biwen.li@nxp.com \
--cc=linux-i2c@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=wsa@the-dreams.de \
/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;
as well as URLs for NNTP newsgroup(s).