Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4745683imm; Fri, 18 May 2018 09:58:27 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpz7iv79JN1BpzoKT7KBgOQP5FdolTSc23zkm9CleHGoIo2EWy0hzUZt7knPo7cz74w9roY X-Received: by 2002:aa7:8492:: with SMTP id u18-v6mr10156119pfn.225.1526662707039; Fri, 18 May 2018 09:58:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526662707; cv=none; d=google.com; s=arc-20160816; b=MD3wguWRDdKp+UD4Hm5IBkVcRWl+L74qDPlmZ7RYuCggJ1hKW9kF3EF/szi7BKoBZC 0OenYlL7LOAcSw9lKZgSB/v+I27z19V0ff7uwZ3mlj9HbR1k/rqisGtq5UYrfuC7VhBJ RUwELCnkzZXpaiQ1YDCUnZf0f9JdVOdUhCnJHrANpwRF0GI2dQK6kNRzBxPMQqCAznku 4kAhk5wZwLCC7cxLUsMTKjWEj//LxpQjj/gZozqbB69wjbiw4yeJb9YcAkuFRvL03DKX 6aG1J61fS+vKORdTH/O+iAMhzb9y6nU/YdgA/LwPUVguqnbqI5psNsttB/lW5x6A1XAd X0wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=XYcahGdnuKoViGuKi3PC/6eBqg2IiW4z7ZrtM5sUoqA=; b=0Sk4xsZxjjE7YmJR4DgMCLdJQaIdn1d7lTHE0IHmMQyd7jBsvGyTs3xQU3qmNEEZnR gEKhcdvWxwrpZcHqeodtHctB8YPNKm/HdtF5LEBIlaY4aUfxyFcrbplY5Q+DyPMaSF0M 9JG9mBwr5a6JFazMPcqlePGIt8KejDoL6/OIDDzDZasp8tkYJDPR5JX6woDC131c1JhD kSqslMwojVz72END6SbrdS86BSx4Z8aQFuAZ5IPphgNc1HwaG+T1hJBKqtA2OnHsCOFK PlPmRKSkHgAHfg74BA67WpIcaH/AApOqgGoY/E5v5fqrYp2nk03ymirBJxzMA7cCY1l9 6CGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=PfThKn5r; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w12-v6si7825733pfd.113.2018.05.18.09.58.12; Fri, 18 May 2018 09:58:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=PfThKn5r; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752381AbeERQ4g (ORCPT + 99 others); Fri, 18 May 2018 12:56:36 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:50960 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752226AbeERQ4b (ORCPT ); Fri, 18 May 2018 12:56:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=XYcahGdnuKoViGuKi3PC/6eBqg2IiW4z7ZrtM5sUoqA=; b=PfThKn5reRnHH9lYsroOK2uS+ 6rVvrGTvFm1i0QhRcL13x182ICbHqBCGGK/zSKpifx6Ivkh+v7FvogxR/j1hSTCEVUT1m8JOEfQMA vXi2LezgaknCGy/uX5B7aSb0bCZtgqG9hVhQ7RgSijKdXtXdypUDjOt7sGX8/kKNEeHlaCpTE8FiH L2NjWi60R90brH5kQKYUf7uCd3QiCESTb5OGYaMEORUrOFZZLYaEmArfW7oo7vwjCR/1m0OfjOzDX S29td7F7BwyVciFJ02DfdX3BjQYPAC1t100xhqo4ZkgmedmZy6GSqdq5r+UcmOBFgIHkATeQ4qCrl bSvU8taZQ==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJig5-0006ht-EB; Fri, 18 May 2018 16:56:25 +0000 Subject: Re: [PATCH 1/2] mfd: stm32-timers: fix pwm-stm32 linker issue with COMPILE_TEST To: Fabrice Gasnier , lee.jones@linaro.org, thierry.reding@gmail.com Cc: sfr@canb.auug.org.au, gerald.baeza@st.com, alexandre.torgue@st.com, mcoquelin.stm32@gmail.com, linux-next@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org References: <1526657044-14879-1-git-send-email-fabrice.gasnier@st.com> <1526657044-14879-2-git-send-email-fabrice.gasnier@st.com> From: Randy Dunlap Message-ID: <0f03fe4b-0b5f-92f1-2929-c6c585432159@infradead.org> Date: Fri, 18 May 2018 09:56:24 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1526657044-14879-2-git-send-email-fabrice.gasnier@st.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/18/2018 08:24 AM, Fabrice Gasnier wrote: > This is seen when COMPILE_TEST=y and MFD_STM32_TIMERS=n. > drivers/pwm/pwm-stm32.o: In function 'stm32_pwm_raw_capture': > pwm-stm32.c:... undefined reference to 'stm32_timers_dma_burst_read' > Fixes: 0c6609805b63 ("mfd: stm32-timers: Add support for DMAs") > > Signed-off-by: Fabrice Gasnier Reported-by: Randy Dunlap Tested-by: Randy Dunlap Thanks. > --- > include/linux/mfd/stm32-timers.h | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/include/linux/mfd/stm32-timers.h b/include/linux/mfd/stm32-timers.h > index 9da1d7e..067d146 100644 > --- a/include/linux/mfd/stm32-timers.h > +++ b/include/linux/mfd/stm32-timers.h > @@ -124,8 +124,20 @@ struct stm32_timers { > struct stm32_timers_dma dma; /* Only to be used by the parent */ > }; > > +#if IS_REACHABLE(CONFIG_MFD_STM32_TIMERS) > int stm32_timers_dma_burst_read(struct device *dev, u32 *buf, > enum stm32_timers_dmas id, u32 reg, > unsigned int num_reg, unsigned int bursts, > unsigned long tmo_ms); > +#else > +static inline int stm32_timers_dma_burst_read(struct device *dev, u32 *buf, > + enum stm32_timers_dmas id, > + u32 reg, > + unsigned int num_reg, > + unsigned int bursts, > + unsigned long tmo_ms) > +{ > + return -ENODEV; > +} > +#endif > #endif > -- ~Randy