Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1238073
| From | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 5/6 RESEND] mfd: arizona: Remove use of codec build config #ifdefs |
| Date | 2015-10-02 11:50 +0200 |
| Message-ID | <qf58u-83i-25@gated-at.bofh.it> (permalink) |
| References | <qdG2u-5Zh-7@gated-at.bofh.it> <qdG2v-5Zh-35@gated-at.bofh.it> <qeKx4-2WG-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/6 RESEND] mfd: arizona: Various improvements and refactoring Richard Fitzgerald <rf@opensource.wolfsonmicro.com> - 2015-09-28 14:50 +0200
[PATCH 5/6 RESEND] mfd: arizona: Remove use of codec build config #ifdefs Richard Fitzgerald <rf@opensource.wolfsonmicro.com> - 2015-09-28 14:50 +0200
Re: [PATCH 5/6 RESEND] mfd: arizona: Remove use of codec build config #ifdefs Lee Jones <lee.jones@linaro.org> - 2015-10-01 13:50 +0200
Re: [PATCH 5/6 RESEND] mfd: arizona: Remove use of codec build config #ifdefs Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2015-10-02 11:50 +0200
[PATCH 1/6 RESEND] mfd: arizona: factor out DCVDD isolation control Richard Fitzgerald <rf@opensource.wolfsonmicro.com> - 2015-09-28 14:50 +0200
[PATCH 2/6 RESEND] mfd: arizona: factor out checking of jack detection state Richard Fitzgerald <rf@opensource.wolfsonmicro.com> - 2015-09-28 14:50 +0200
csiph-web