From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>,
<sameo@linux.intel.com>, <patches@opensource.wolfsonmicro.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/6 RESEND] mfd: arizona: Remove use of codec build config #ifdefs
Date: Fri, 2 Oct 2015 10:23:12 +0100 [thread overview]
Message-ID: <20151002092312.GM5432@ck-lbox> (raw)
In-Reply-To: <20151001114452.GP3214@x1>
On Thu, Oct 01, 2015 at 12:44:52PM +0100, Lee Jones wrote:
> On Mon, 28 Sep 2015, Richard Fitzgerald wrote:
>
> > Remove the use of #ifdefs around each case statement of the chip ID
> > and type validation switches.
> >
> > We must ensure that the contained code still compiles to nothing if
> > support for that codec was not built into the kernel, to prevent
> > creation of link references to missing functions. So the ifdefs are
> > replaced with a use of the IS_ENABLED() macro.
> >
> > Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
> > ---
> > drivers/mfd/arizona-core.c | 29 +++++++++++++++++++++--------
> > drivers/mfd/arizona-i2c.c | 28 +++++++++++++++-------------
> > drivers/mfd/arizona-spi.c | 18 +++++++++++-------
> > 3 files changed, 47 insertions(+), 28 deletions(-)
> >
> > diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
> > index 2512192..cc2117e 100644
> > --- a/drivers/mfd/arizona-core.c
> > +++ b/drivers/mfd/arizona-core.c
> > @@ -1130,22 +1130,26 @@ int arizona_dev_init(struct arizona *arizona)
> > arizona->rev &= ARIZONA_DEVICE_REVISION_MASK;
> >
> > switch (reg) {
> > -#ifdef CONFIG_MFD_WM5102
> > case 0x5102:
> > + if (!IS_ENABLED(CONFIG_MFD_WM5102))
> > + break;
> > +
>
> Are you sure this statement effects the code below?
>
> I'm not sure it will. How have you tested it?
Yeah looking at that again I am not sure that is going to cause
that code to be elimated either. Richard is on holiday this week
and next. I will try to find time to have a look at this today.
Thanks,
Charles
next prev parent reply other threads:[~2015-10-02 9:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-28 12:46 [PATCH 0/6 RESEND] mfd: arizona: Various improvements and refactoring Richard Fitzgerald
2015-09-28 12:46 ` [PATCH 1/6 RESEND] mfd: arizona: factor out DCVDD isolation control Richard Fitzgerald
2015-09-28 12:46 ` [PATCH 2/6 RESEND] mfd: arizona: factor out checking of jack detection state Richard Fitzgerald
2015-09-28 12:46 ` [PATCH 3/6 RESEND] mfd: arizona: Downgrade type mismatch messages to dev_warn Richard Fitzgerald
2015-10-01 11:17 ` Lee Jones
2015-09-28 12:46 ` [PATCH 4/6 RESEND] mfd: arizona: Simplify adding subdevices Richard Fitzgerald
2015-10-01 11:41 ` Lee Jones
2015-09-28 12:46 ` [PATCH 5/6 RESEND] mfd: arizona: Remove use of codec build config #ifdefs Richard Fitzgerald
2015-10-01 11:44 ` Lee Jones
2015-10-02 9:23 ` Charles Keepax [this message]
2015-09-28 12:46 ` [PATCH 6/6 RESEND] mfd: arizona: use correct type ID for device tree config Richard Fitzgerald
2015-10-01 11:46 ` Lee Jones
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=20151002092312.GM5432@ck-lbox \
--to=ckeepax@opensource.wolfsonmicro.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.wolfsonmicro.com \
--cc=rf@opensource.wolfsonmicro.com \
--cc=sameo@linux.intel.com \
/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