Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4647708imm; Fri, 18 May 2018 08:26:57 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqmkRK6PJnvmtjxgzudzSs+zGHqBjf1ZmvpdlbLgWP/WRCqvcVSsU+WR3LtQeGkcUXJOuvX X-Received: by 2002:a17:902:76c4:: with SMTP id j4-v6mr10041087plt.257.1526657217384; Fri, 18 May 2018 08:26:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526657217; cv=none; d=google.com; s=arc-20160816; b=KlThUgLss1da3WHAHhLOKm1NbFm6jcqfN33BMMwNe08g1d1S0tkHLgayrtyWGzlto6 p6e+1UKaz4KoOq5CMQ0FVnG9K58WKX8vczioykwvPrLleJ0iv3ga3lxZZipN2ci6eXax jmaVATmy5jr3FzGFRXNEx1nvUGecnnYQO4S/uJNB9QccsCj5P08qQTpwXjgybGLjv6uw Z4N4Ssi9vC9stW9n6cDhsXS/AgPCz6ZJQTmP82O1PBqAD8jdwbKQbA6kKncK2BubJ/A2 GTZkY8sVytLnjOO3X3wRe2VloAW42aXcqGAy18WvzctAghSqVXb2ol2pMi6lg286ydZ/ y4aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=7J1TnF3yBFQSPj+HdtpVWC5I3ebkV2RLdo0lkDxKC70=; b=1CV8/qBk5dMZ/lnCFFPy0pYwPMpiudmnVkcweoXMMn1j2S/coI+CjnwcXgUV8Jd3TY jFjOgGAdl4+MbxE4UVg7oaC8KAPXfN7UtqL13V5YC2DnuKJbFM9ZhlcN6zMECDFANeDb ftEJZDtHqimcLOmj5HeRtWGzDts1449ovVpbJPZmtkettVYGsv9Qt/tuavtcYXSNd2Il YE0Jm6mJ34y+MqzZhEGCZ0mEBWBcTz45vtcsVfgHo2vMdb7jRYOV8Xs4dgk/6vav7DFh GgMWNEzBez/L5iVb+2jC742s5yg7R0+UBttdrQ/P63Ww3eM3Yw0C/uMkKswjedLNdw6P j+XA== ARC-Authentication-Results: i=1; mx.google.com; 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 v38-v6si7817871plg.283.2018.05.18.08.26.43; Fri, 18 May 2018 08:26:57 -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; 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 S1752454AbeERPZP (ORCPT + 99 others); Fri, 18 May 2018 11:25:15 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:24708 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751569AbeERPZJ (ORCPT ); Fri, 18 May 2018 11:25:09 -0400 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w4IFOBAH014279; Fri, 18 May 2018 17:24:29 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2j1e18ddr2-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 18 May 2018 17:24:29 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 360253A; Fri, 18 May 2018 15:24:28 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag5node3.st.com [10.75.127.15]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id D507E5208; Fri, 18 May 2018 15:24:27 +0000 (GMT) Received: from localhost (10.75.127.47) by SFHDAG5NODE3.st.com (10.75.127.15) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 18 May 2018 17:24:27 +0200 From: Fabrice Gasnier To: , CC: , , , , , , , , Subject: [PATCH 1/2] mfd: stm32-timers: fix pwm-stm32 linker issue with COMPILE_TEST Date: Fri, 18 May 2018 17:24:03 +0200 Message-ID: <1526657044-14879-2-git-send-email-fabrice.gasnier@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1526657044-14879-1-git-send-email-fabrice.gasnier@st.com> References: <1526657044-14879-1-git-send-email-fabrice.gasnier@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG3NODE3.st.com (10.75.127.9) To SFHDAG5NODE3.st.com (10.75.127.15) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-18_06:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 -- 1.9.1