Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp229743pxb; Thu, 12 Nov 2020 02:12:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJyveGaHTwXZwwoQKyOwosW22M07Kq1M7i7Irr0qZkx3ebaW3UWJQwUUpBoXBYGjBPUzASa6 X-Received: by 2002:a17:906:b852:: with SMTP id ga18mr30768838ejb.80.1605175930976; Thu, 12 Nov 2020 02:12:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605175930; cv=none; d=google.com; s=arc-20160816; b=qvDrz/4BNi74BW1a5n4VOe6xfqvp7PwP9NQk6/jc8LY38eG0zXPuOgBTwsdWweZXE6 qe8a4DEdTbN+hBYLa9e/QS9fkS5K+gGp1vBSXFBz/14XEWZkuHxJLWpfmlifJvCw2jzg rlVwNy7q/EZxSXKGqVI2vLNgyD+AXsO+FQ/Tmv75ICCDlowaShgaP4tDPlQBPW3eyDtf 5moFKIQ6uYQR+Y1YFVC+7J1CL9rLwZvG0AJy5pMZqfBbXykaOJ06XdRJv/UhjmQt6bnq w2KuDLuuGazXQ/3dScDBTl0SGbM1u+bKal94rCNqBGD3xETIlV47u9c+GvsXUkqvce/4 +vzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=o3kOclPa9haPsQzI7eWNoI+8A5txdjIl3ljtaElrjdc=; b=AcybnMFitRaNQP4ZYjij4nvPC4xtMv6qtodlkzLcMe4LYEkn6Gvis0bKv7G8/4xtwh HRna7BJyiG8xbS+LSqqrZY2ivfsIwKR58QWhlpMxKhf+m1TCEo9GiJtLDCa0sR6GlA8a haZYvbY9fUS9AlNV62DejXqwws076LXIu5KYHyzUyQQD+R0uvnIt2arVOsOULuQu7B6h 1wPPK1nw6OhX1+FS4qK0tvDguSfY6xu/J1buz0v1XlDObGEbTrgi/GpJIdj6iLaU+5hw VMO7YoxHvPLhuARaab6xm5XkItYmX+QwczFTIFNRPLPI39Do0vV+g7YKP69zSLe14asz OP1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bu6si3710789edb.94.2020.11.12.02.11.48; Thu, 12 Nov 2020 02:12:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727241AbgKLKIM (ORCPT + 99 others); Thu, 12 Nov 2020 05:08:12 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:52495 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725979AbgKLKIM (ORCPT ); Thu, 12 Nov 2020 05:08:12 -0500 Received: from localhost (lfbn-lyo-1-997-19.w86-194.abo.wanadoo.fr [86.194.74.19]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 8480B240015; Thu, 12 Nov 2020 10:07:32 +0000 (UTC) Date: Thu, 12 Nov 2020 11:07:31 +0100 From: Alexandre Belloni To: Lee Jones Cc: linus.walleij@linaro.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Russell King , Nicolas Ferre , Ludovic Desroches Subject: Re: [PATCH v2 16/25] arch: arm: mach-at91: pm: Move prototypes to mutually included header Message-ID: <20201112100731.GC4556@piout.net> References: <20200713144930.1034632-1-lee.jones@linaro.org> <20200713144930.1034632-17-lee.jones@linaro.org> <20201112093918.GV2063125@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201112093918.GV2063125@dell> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 12/11/2020 09:39:18+0000, Lee Jones wrote: > Both the caller and the supplier's source file should have access to > the include file containing the prototypes. > > Fixes the following W=1 kernel build warning(s): > > drivers/pinctrl/pinctrl-at91.c:1637:6: warning: no previous prototype for ‘at91_pinctrl_gpio_suspend’ [-Wmissing-prototypes] > 1637 | void at91_pinctrl_gpio_suspend(void) > | ^~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/pinctrl/pinctrl-at91.c:1661:6: warning: no previous prototype for ‘at91_pinctrl_gpio_resume’ [-Wmissing-prototypes] > 1661 | void at91_pinctrl_gpio_resume(void) > | ^~~~~~~~~~~~~~~~~~~~~~~~ > > Cc: Russell King > Cc: Nicolas Ferre > Cc: Alexandre Belloni > Cc: Ludovic Desroches > Signed-off-by: Lee Jones > --- > > v2: Moved shared header to: include/soc/at91/pm.h > > arch/arm/mach-at91/pm.c | 19 ++++++++----------- > drivers/pinctrl/pinctrl-at91.c | 2 ++ > include/soc/at91/pm.h | 9 +++++++++ > 3 files changed, 19 insertions(+), 11 deletions(-) > create mode 100644 include/soc/at91/pm.h > > diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c > index 120f9aa6fff32..90dcdfe3b3d0d 100644 > --- a/arch/arm/mach-at91/pm.c > +++ b/arch/arm/mach-at91/pm.c > @@ -17,6 +17,8 @@ > #include > #include > > +#include > + > #include > #include > #include > @@ -25,17 +27,6 @@ > #include "generic.h" > #include "pm.h" > > -/* > - * FIXME: this is needed to communicate between the pinctrl driver and > - * the PM implementation in the machine. Possibly part of the PM > - * implementation should be moved down into the pinctrl driver and get > - * called as part of the generic suspend/resume path. > - */ > -#ifdef CONFIG_PINCTRL_AT91 > -extern void at91_pinctrl_gpio_suspend(void); > -extern void at91_pinctrl_gpio_resume(void); > -#endif > - > struct at91_soc_pm { > int (*config_shdwc_ws)(void __iomem *shdwc, u32 *mode, u32 *polarity); > int (*config_pmc_ws)(void __iomem *pmc, u32 mode, u32 polarity); > @@ -326,6 +317,12 @@ static void at91_pm_suspend(suspend_state_t state) > static int at91_pm_enter(suspend_state_t state) > { > #ifdef CONFIG_PINCTRL_AT91 > + /* > + * FIXME: this is needed to communicate between the pinctrl driver and > + * the PM implementation in the machine. Possibly part of the PM > + * implementation should be moved down into the pinctrl driver and get > + * called as part of the generic suspend/resume path. > + */ > at91_pinctrl_gpio_suspend(); > #endif > > diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c > index 72edc675431ce..0a7e10d39505c 100644 > --- a/drivers/pinctrl/pinctrl-at91.c > +++ b/drivers/pinctrl/pinctrl-at91.c > @@ -23,6 +23,8 @@ > /* Since we request GPIOs from ourself */ > #include > > +#include > + > #include "pinctrl-at91.h" > #include "core.h" > > diff --git a/include/soc/at91/pm.h b/include/soc/at91/pm.h > new file mode 100644 > index 0000000000000..0fd5093f7f73a > --- /dev/null > +++ b/include/soc/at91/pm.h > @@ -0,0 +1,9 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > +/* > + * atmel platform data > + */ > + > +#ifdef CONFIG_PINCTRL_AT91 Shouldn't that be a header guard instead of depending on PINCTRL_AT91 ? -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com