Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965468AbbEMOPX (ORCPT ); Wed, 13 May 2015 10:15:23 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:33921 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964839AbbEMOPS (ORCPT ); Wed, 13 May 2015 10:15:18 -0400 Date: Wed, 13 May 2015 15:15:13 +0100 From: Lee Jones To: Richard Fitzgerald Cc: linux-kernel@vger.kernel.org, patches@opensource.wolfsonmicro.com, pebolle@tiscali.nl Subject: Re: [PATCH] mfd: arizona: Fix incorrect Makefile conditionals Message-ID: <20150513141513.GY3394@x1> References: <1430830201-18952-1-git-send-email-rf@opensource.wolfsonmicro.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1430830201-18952-1-git-send-email-rf@opensource.wolfsonmicro.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2669 Lines: 76 On Tue, 05 May 2015, Richard Fitzgerald wrote: > The use of ifneq against 'n' to conditionally compile codec-specific > parts is wrong and was resulting in all the codec tables being built > even for deselected codecs. > > For the WM5102 there is an extra dependency on wm5102_patch() so > it is given an alternative empty version when deselected to avoid > having to sprinkle #ifdefs around the code. > > Signed-off-by: Richard Fitzgerald > --- > drivers/mfd/Makefile | 6 +++--- > include/linux/mfd/arizona/core.h | 8 ++++++++ > 2 files changed, 11 insertions(+), 3 deletions(-) I think this patch should be split into 2. You can add my: Acked-by: Lee Jones ... to both of them when you re-submit. > diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile > index ca6d184..63743a7 100644 > --- a/drivers/mfd/Makefile > +++ b/drivers/mfd/Makefile > @@ -41,13 +41,13 @@ obj-$(CONFIG_MFD_ARIZONA) += arizona-core.o > obj-$(CONFIG_MFD_ARIZONA) += arizona-irq.o > obj-$(CONFIG_MFD_ARIZONA_I2C) += arizona-i2c.o > obj-$(CONFIG_MFD_ARIZONA_SPI) += arizona-spi.o > -ifneq ($(CONFIG_MFD_WM5102),n) > +ifeq ($(CONFIG_MFD_WM5102),y) > obj-$(CONFIG_MFD_ARIZONA) += wm5102-tables.o > endif > -ifneq ($(CONFIG_MFD_WM5110),n) > +ifeq ($(CONFIG_MFD_WM5110),y) > obj-$(CONFIG_MFD_ARIZONA) += wm5110-tables.o > endif > -ifneq ($(CONFIG_MFD_WM8997),n) > +ifeq ($(CONFIG_MFD_WM8997),y) > obj-$(CONFIG_MFD_ARIZONA) += wm8997-tables.o > endif > obj-$(CONFIG_MFD_WM8400) += wm8400-core.o > diff --git a/include/linux/mfd/arizona/core.h b/include/linux/mfd/arizona/core.h > index 16a498f..7597164 100644 > --- a/include/linux/mfd/arizona/core.h > +++ b/include/linux/mfd/arizona/core.h > @@ -153,7 +153,15 @@ int arizona_request_irq(struct arizona *arizona, int irq, char *name, > void arizona_free_irq(struct arizona *arizona, int irq, void *data); > int arizona_set_irq_wake(struct arizona *arizona, int irq, int on); > > +#ifdef CONFIG_MFD_WM5102 > int wm5102_patch(struct arizona *arizona); > +#else > +static inline int wm5102_patch(struct arizona *arizona) > +{ > + return 0; > +} > +#endif > + > int wm5110_patch(struct arizona *arizona); > int wm8997_patch(struct arizona *arizona); > -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- 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/