Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2057348imm; Mon, 28 May 2018 00:21:11 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKLeyVI9Ver1zu8kiZuqAiBHPL6HL/ItkiTOKiWM+3TiJ5j+FXf1z3hWUY3i5ZvEZFIwaNv X-Received: by 2002:a62:2394:: with SMTP id q20-v6mr6995312pfj.1.1527492071635; Mon, 28 May 2018 00:21:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527492071; cv=none; d=google.com; s=arc-20160816; b=mQSOuKMmAH86JxxebjROVEF2gGywfE7WnnebT9CWGMGk45tT65neeCKOdziehFSYUw 0PgMfur22JoRO81OyHtv4/a+IdF0shNYs1MSkSYvnQWFLJG6+yVrdtCOfBWp6N0HX3na iPt/qOVrrnYjD11AMqb2Q+/39ksVL4k7+2acymRXmssujugs72rSAQlJb7/3p0BKATJ1 NnXPf/cOM7gip73oV6ZX3lSbuor5bEe3Xw8aW1pJxNnOs9+n7sehpacw858Mr7s2J/lB M6ZB4Xt27HZVdxwwVgKvec6PoeMxnZi+vXcJl/upccDRb+aDd/JffNyMG0AmckAmVhJq hS/g== 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:arc-authentication-results; bh=3QQHz6ZZvAgMyOnOVW3HBcVLHkEMe6MrorLYbYbT+Bw=; b=a6d9S/v8AgaGI+zIl2bEd2fc1kIHMqx8D3WnAFOhoaC4vycNIY9R5IQAXYtZJV73Eh TS+iKyb8I3+Ozg+8e5ZiH6Mt8cT7M/+8T1XQ8kP/1IbR5oKsQqEvnrWK6Fh9wMNNzlM/ d7rrpkqE/YulnPNXJFAb3rtHNpyhTDzYRZ/NSfDhH/yFIt2AUB/m/zAk7CUxHNNndSZP Zv2e8ncmaqomKW/Bh5WgEpE721Z4scPuw7WSPkag1biDKE6TmKzWXCzQZJpN/xCM37C2 bRoHutc6T1UOBDJUxoi4SXiscKmJGRy4VBzSQcxDAwtZeT6UkS+fJ3sjnWiUOpl8DmAI 4JbQ== 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 f4-v6si20590231pgc.551.2018.05.28.00.20.56; Mon, 28 May 2018 00:21:11 -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 S1753797AbeE1HUo (ORCPT + 99 others); Mon, 28 May 2018 03:20:44 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:51106 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753638AbeE1HUj (ORCPT ); Mon, 28 May 2018 03:20:39 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w4S7JeuL005187; Mon, 28 May 2018 09:20:17 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2j6vq5gcs7-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 28 May 2018 09:20:17 +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 3B3CD3D; Mon, 28 May 2018 07:20:11 +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 B1444140D; Mon, 28 May 2018 07:20:11 +0000 (GMT) Received: from [10.48.0.167] (10.75.127.49) by SFHDAG5NODE3.st.com (10.75.127.15) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 28 May 2018 09:20:10 +0200 Subject: Re: [PATCH] pwm: stm32: fix build warning with CONFIG_DMA_ENGINE disabled To: Arnd Bergmann , Thierry Reding , Maxime Coquelin , Alexandre Torgue CC: Benjamin Gaignard , , , References: <20180525210843.1821071-1-arnd@arndb.de> From: Fabrice Gasnier Message-ID: <91444ee7-40fa-5022-ca4d-1c15e0807347@st.com> Date: Mon, 28 May 2018 09:20:10 +0200 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: <20180525210843.1821071-1-arnd@arndb.de> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.49] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SFHDAG5NODE3.st.com (10.75.127.15) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-28_04:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/25/2018 11:08 PM, Arnd Bergmann wrote: > Without dmaengine support, we get a harmless warning about an > unused function: > > drivers/pwm/pwm-stm32.c:166:12: error: 'stm32_pwm_capture' defined but not used [-Werror=unused-function] > > Changing the #ifdef to an IS_ENABLED() check shuts up that warning > and is slightly nicer to read. > > Fixes: 53e38fe73f94 ("pwm: stm32: Add capture support") > Signed-off-by: Arnd Bergmann > --- > drivers/pwm/pwm-stm32.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Hi Arnd, Acked-by: Fabrice Gasnier Thanks, Fabrice > > diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c > index 60bfc07c4912..97bbc1f18fd6 100644 > --- a/drivers/pwm/pwm-stm32.c > +++ b/drivers/pwm/pwm-stm32.c > @@ -484,9 +484,7 @@ static int stm32_pwm_apply_locked(struct pwm_chip *chip, struct pwm_device *pwm, > static const struct pwm_ops stm32pwm_ops = { > .owner = THIS_MODULE, > .apply = stm32_pwm_apply_locked, > -#if IS_ENABLED(CONFIG_DMA_ENGINE) > - .capture = stm32_pwm_capture, > -#endif > + .capture = IS_ENABLED(CONFIG_DMA_ENGINE) ? stm32_pwm_capture : NULL, > }; > > static int stm32_pwm_set_breakinput(struct stm32_pwm *priv, >