From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEF32C10F11 for ; Mon, 22 Apr 2019 10:15:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BBA5E206A3 for ; Mon, 22 Apr 2019 10:15:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="j873hmly"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="dCoieSXt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BBA5E206A3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1I7p9rjur+1k469GFuE+avGlb9mpJmdlgtjFCw8p4gc=; b=j873hmlyLPyIhP KjGWYZqvwMj8PulyiFxMsoNLGv/cP2+oA6QkNXbygFNUJxiSQlgKQvvVEG4XzGS5O71rxNZtWVzz8 WZV+wR9RpIwZxhS+JTSIUlJgfvOCbmdVv1ZzD/Qwvk0MqlHrGM7XhCTm/wD9e9jgiIePEIR3eOCRU nWReGaGq3WgTcgrUsHCUCTvdq9Z6yaaB0GLk0xaj9M9k0SAJC2IiIzAx7+VQ1obswjRnsK7EkyHeA VDGZxUZzp2DcMZR/Vu7xy79sJc95qy+rx2ZzLAr6/mf/85e81/t9EVoGxqjuYZCnOT8puNUFCc9Q4 u/TdM4QAj/qEsjoiaetg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hIVyl-0005Ko-6Y; Mon, 22 Apr 2019 10:15:15 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hIVyM-0004uQ-RU for linux-arm-kernel@lists.infradead.org; Mon, 22 Apr 2019 10:14:58 +0000 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D991E206A3; Mon, 22 Apr 2019 10:14:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555928090; bh=2NDX7a/oF3+wR3ClQPwRoNDywtT9vPrseyn0WaUMBNU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dCoieSXtx0F+k1B5dC08md6B13zWersEtpm2JUXIs3vidCrLdx/nCBcSS+xTShfsk vp2HX83fo+0WUSVPFt/S6WRzGs/vNBYC0HxIR9NYEDMkG7vUO0crWcs12ujWbWOz9i 5leUsoKaQc9/63zLM/bZkEOEyhALZHyFBGQ0aw0E= Date: Mon, 22 Apr 2019 11:14:43 +0100 From: Jonathan Cameron To: Fabrice Gasnier Subject: Re: [PATCH] iio: trigger: stm32-timer: fix build issue when disabled Message-ID: <20190422111443.276572ff@archlinux> In-Reply-To: <1555321642-482-1-git-send-email-fabrice.gasnier@st.com> References: <1555321642-482-1-git-send-email-fabrice.gasnier@st.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190422_031451_344851_7594FD6C X-CRM114-Status: GOOD ( 17.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sfr@canb.auug.org.au, lars@metafoo.de, olivier.moysan@st.com, mcoquelin.stm32@gmail.com, linux-iio@vger.kernel.org, pmeerw@pmeerw.net, rdunlap@infradead.org, arnaud.pouliquen@st.com, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org, benjamin.gaignard@linaro.org, knaack.h@gmx.de, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, alexandre.torgue@st.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 15 Apr 2019 11:47:22 +0200 Fabrice Gasnier wrote: > This fixes a build issue when CONFIG_IIO_STM32_TIMER_TRIGGER isn't set but > used in stm32-dfsdm-adc driver (e.g. CONFIG_STM32_DFSDM_ADC is set): > ERROR: "is_stm32_timer_trigger" [drivers/iio/adc/stm32-dfsdm-adc.ko] > undefined! > > There are two possible options to fix this issue: > - select IIO_STM32_TIMER_TRIGGER along with CONFIG_STM32_DFSDM_ADC. > This is what's being done currently for CONFIG_STM32_ADC. > - stub "is_stm32_timer_trigger" function > > Choice is made to stub this function as suggested in [1]. This is also > inspired by similar "is_stm32_lptim_trigger" function (see [2]) in > include/linux/iio/timer/stm32-lptim-trigger.h > > [1] > https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1977377.html > [2] https://lkml.org/lkml/2017/9/10/124 > > Fixes: 11646e81d775 ("iio: adc: stm32-dfsdm: add support for buffer modes") > > Reported-by: Randy Dunlap > Fix-suggested-by: Jonathan Cameron > Signed-off-by: Fabrice Gasnier Hmm. That feels a bit more complex than I was anticipating but fair enough, it seems to cover the combinations. Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to have another poke at it. Thanks, Jonathan > --- > include/linux/iio/timer/stm32-timer-trigger.h | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/include/linux/iio/timer/stm32-timer-trigger.h b/include/linux/iio/timer/stm32-timer-trigger.h > index d68add8..cbb7c7a 100644 > --- a/include/linux/iio/timer/stm32-timer-trigger.h > +++ b/include/linux/iio/timer/stm32-timer-trigger.h > @@ -73,6 +73,15 @@ > > #define TIM17_OC1 "tim17_oc1" > > +#if IS_REACHABLE(CONFIG_IIO_STM32_TIMER_TRIGGER) > bool is_stm32_timer_trigger(struct iio_trigger *trig); > - > +#else > +static inline bool is_stm32_timer_trigger(struct iio_trigger *trig) > +{ > +#if IS_ENABLED(CONFIG_IIO_STM32_TIMER_TRIGGER) > + pr_warn_once("stm32-timer-trigger not linked in\n"); > +#endif > + return false; > +} > +#endif > #endif _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel