Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp56625imm; Fri, 25 May 2018 14:09:51 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqaVKh2nWhfqW7E7AOV7tAEupfwmNHtYkCTuV3/Od7/eEDElTYqmQyLmxOzyLJE/I1SjQyv X-Received: by 2002:a17:902:7d87:: with SMTP id a7-v6mr4267314plm.264.1527282591818; Fri, 25 May 2018 14:09:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527282591; cv=none; d=google.com; s=arc-20160816; b=c8KwtBEsXjmJ1j72Z0xVlaBq68aObf9Al5UIWfQzr26dh9Nl4+53+WFX9wOIknAPPC qj+tyk8u3qZpO5oKGg3cE8s1ux7E9SvFl2yCSDaZdUAkt3w0sJm2GBM+NiAEAiSiqSKQ T8dXvuFrugMO/F+5AgwK2AfY223jSqDZtmi39ersZc7ioUZu9ZGgpspbLaIdxxqwko5/ 3qXl+b1jjGu7rp7g8eUAjGfk8OWXS+DZxXGCYLFzphrTM6heORcHOYATvWA3c0+LdDTO ybVbKknn5CM7eO9G1YZa7ej6yADLigdBsAZmkRnO9eO6aOv6u4qS4+2XpnZHQjuYhFfL fGRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=KoGAPMFhvfOLDEnNPBFXLKPnJWlf3sQ1Vr2AJp0qsFw=; b=RE/fHuC1OdJpd82YU6W8UZeWeXBGJ7Q074ySD51FG1JadqLY+W7YUZMUun+fllIVyt wbi654rNmhqZ85h98+nTdjr46kk4fxi6xURogUiObC0LC0R6wFAZ0mENpI1gDif8FmFl m0S7BRc+4p3hLIPdIaJID4i2HjweeUoK4ois5P3lPS6R4GHLDeKa6A4gR+lqzMkl8o1/ Z8vkUWrFlVYjhuIOtI/vUyzyIdGQL8LqcabhtXnXCLtCicVTKkEbaP27+OicwyqU1bEn /DmruPeCrV1DDKM4POgFeV6vCKYoWtgONBLvVBwCc4/oKGFWL1fLyP0MNVU60kMTp2wg JlwA== 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 c13-v6si18110869pgq.616.2018.05.25.14.09.37; Fri, 25 May 2018 14:09:51 -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 S1030324AbeEYVJK (ORCPT + 99 others); Fri, 25 May 2018 17:09:10 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:41281 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968376AbeEYVJI (ORCPT ); Fri, 25 May 2018 17:09:08 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0M8iVg-1fTyvh2lQq-00C6rD; Fri, 25 May 2018 23:08:45 +0200 From: Arnd Bergmann To: Thierry Reding , Maxime Coquelin , Alexandre Torgue Cc: Arnd Bergmann , Benjamin Gaignard , Fabrice Gasnier , linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] pwm: stm32: fix build warning with CONFIG_DMA_ENGINE disabled Date: Fri, 25 May 2018 23:08:30 +0200 Message-Id: <20180525210843.1821071-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:+Fim8R0Ja3k85HCmDb2GmNGWMnqJJ1t1nOxSudEQgTeNt+z27hn fJaDp0W87fPuD7M+I1xV/nxs6hSC4wbPGHROZ6oLX2onGqaAJBGsuu/NPHw+feDhkFlV/MU EQYcouHPYL4O4YiU4FWzMKMEbnTG4ydkpCNxUIhRdJH9A8MCUjXGP8EZ0UrxM21rv131t/A Ssn0OHbol9HNyH2R1QrNg== X-UI-Out-Filterresults: notjunk:1;V01:K0:Opm8/xm9O6A=:+ykAXxA/oiYU2O+3yLc/i3 XmhUyfD3lF4MnY8HhqlZYkBHW+XxpsYF0ktV5IVCC6WsZL9letPxWO7SQzuXrlQODgUq6VVJk Pvj/DZ1bKFxMabWdbDEnmEHT4eWUTEfYYD4xscJxQCC4q5cN7JzTizjZJPWS3xLXhMvcylkgy /ABGE/TFQ43wyOxrcMhceNXsViHl8ktv3NDUiNHkQQfprzXftFyb7q4gAAFxapj0HXuWQ2mbs nT1BASnUtu8pqVaKCKQpwWclaYUhuxgmMMVVjBHjGzvgi0+8NXa0VFOs578QtsBNaOT+dHuua bmtSx6gbfKFtF+sItkcmtVoy9KO0asoOplEE0fXVUlqpVaiaBQuqLIGSbpM5xOqJHmybEkOPG TXLvKGPxTD949Se73QnjpPu3dt9U53ka0FbXm4+oXBLe3VelVMogJXifdZaeKcl3Twcdk0LjT dyeWf8+c9jryaG65K7sPaFo6MkjHfAatzAyY/zqBt1CrcYGfEptFoWZYMX8K0bq3SssNy/TMS sLCCuP58Bo1EKcJS7MMC9G94jNktPAAzmvu8prI+VZ8Z5U/SgNoApQmL+9eAKaTeSvKlsu1/S B+7KMC9M+j+YcT7IKATnq/6xO2IShtd0AVJGIJlwAk3ohBh+e6SQLEJsn8sDzKVWIegZSjVRV i9A+/sYTXqa4fQqwdQjoRPnPCWR+hXN08ckzDOy2FTUv64ee1ds+1ybJLKvznJC7C+B4= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) 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, -- 2.9.0