linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: linus.walleij@linaro.org, linux-kernel@vger.kernel.org,
	linux-gpio@vger.kernel.org, Russell King <linux@armlinux.org.uk>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Ludovic Desroches <ludovic.desroches@microchip.com>
Subject: Re: [PATCH v3 16/25] arch: arm: mach-at91: pm: Move prototypes to mutually included header
Date: Thu, 26 Nov 2020 16:33:20 +0100	[thread overview]
Message-ID: <20201126153320.GE1296649@piout.net> (raw)
In-Reply-To: <20201126132840.GD2455276@dell>

On 26/11/2020 13:28:40+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 <linux@armlinux.org.uk>
> Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>


Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

This is my ack in case Linus wants that to go through the pinctrl tree,
which is fine with me.

I can also take it through the at91 tree with Linus' ack.

> ---
>  arch/arm/mach-at91/pm.c        | 19 ++++++++-----------
>  drivers/pinctrl/pinctrl-at91.c |  2 ++
>  include/soc/at91/pm.h          | 16 ++++++++++++++++
>  3 files changed, 26 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 <linux/clk/at91_pmc.h>
>  #include <linux/platform_data/atmel.h>
>  
> +#include <soc/at91/pm.h>
> +
>  #include <asm/cacheflush.h>
>  #include <asm/fncpy.h>
>  #include <asm/system_misc.h>
> @@ -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 <linux/pinctrl/consumer.h>
>  
> +#include <soc/at91/pm.h>
> +
>  #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..7a41e53a3ffa3
> --- /dev/null
> +++ b/include/soc/at91/pm.h
> @@ -0,0 +1,16 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +/*
> + * Atmel Power Management
> + *
> + * Copyright (C) 2020 Atmel
> + *
> + * Author: Lee Jones <lee.jones@linaro.org>
> + */
> +
> +#ifndef __SOC_ATMEL_PM_H
> +#define __SOC_ATMEL_PM_H
> +
> +void at91_pinctrl_gpio_suspend(void);
> +void at91_pinctrl_gpio_resume(void);
> +
> +#endif /* __SOC_ATMEL_PM_H */
> -- 
> 2.25.1

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2020-11-26 15:33 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-13 14:49 [PATCH 00/25] Rid W=1 warnings in Pinctrl Lee Jones
2020-07-13 14:49 ` [PATCH 01/25] pinctrl: actions: pinctrl-owl: Supply missing 'struct owl_pinctrl' attribute descriptions Lee Jones
2020-07-14 17:18   ` Manivannan Sadhasivam
2020-07-13 14:49 ` [PATCH 02/25] pinctrl: sirf: pinctrl-atlas7: Fix a bunch of documentation misdemeanours Lee Jones
2020-07-13 14:49 ` [PATCH 03/25] pinctrl: bcm: pinctrl-bcm281xx: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
2020-07-13 17:59   ` Scott Branden
2020-07-13 14:49 ` [PATCH 04/25] pinctrl: bcm: pinctrl-iproc-gpio: Rename incorrectly documented function param Lee Jones
2020-07-13 17:58   ` Scott Branden
2020-07-13 14:49 ` [PATCH 05/25] pinctrl: qcom: pinctrl-msm: Complete 'struct msm_pinctrl' documentation Lee Jones
2020-07-13 14:49 ` [PATCH 06/25] pinctrl: samsung: pinctrl-samsung: Demote obvious misuse of kerneldoc to standard comment blocks Lee Jones
2020-07-20 14:27   ` Krzysztof Kozlowski
2020-07-20 14:49     ` Lee Jones
2020-07-20 14:52       ` Krzysztof Kozlowski
2020-07-23  8:43         ` Linus Walleij
2020-07-23  8:45           ` Krzysztof Kozlowski
2020-07-13 14:49 ` [PATCH 07/25] pinctrl: samsung: pinctrl-s3c24xx: Fix formatting issues Lee Jones
2020-07-14 18:30   ` Heiko Stuebner
2020-07-20 14:27   ` Krzysztof Kozlowski
2020-07-20 14:49     ` Lee Jones
2020-07-13 14:49 ` [PATCH 08/25] pinctrl: samsung: pinctrl-s3c64xx: " Lee Jones
2020-07-20 14:28   ` Krzysztof Kozlowski
2020-07-20 14:48     ` Lee Jones
2020-07-13 14:49 ` [PATCH 09/25] pinctrl: qcom: pinctrl-msm8976: Remove unused variable 'nav_tsync_groups' Lee Jones
2020-07-13 14:49 ` [PATCH 10/25] pinctrl: mediatek: pinctrl-mtk-common-v2: Mark 'mtk_default_register_base_names' as __maybe_unused Lee Jones
2020-07-14 21:21   ` Sean Wang
2020-07-13 14:49 ` [PATCH 11/25] pinctrl: core: Fix a bunch of kerneldoc issues Lee Jones
2020-07-13 14:49 ` [PATCH 12/25] pinctrl: pinmux: Add some missing parameter descriptions Lee Jones
2020-07-13 14:49 ` [PATCH 13/25] pinctrl: devicetree: Add one new attribute description and rename another two Lee Jones
2020-07-13 14:49 ` [PATCH 14/25] pinctrl: pinconf-generic: Add function parameter description 'pctldev' Lee Jones
2020-07-13 14:49 ` [PATCH 15/25] pinctrl: pinctrl-at91-pio4: PM related attribute descriptions Lee Jones
2020-07-13 14:49 ` [PATCH 16/25] arch: arm: mach-at91: pm: Move prototypes to mutually included header Lee Jones
2020-07-13 20:02   ` Alexandre Belloni
2020-07-16 13:14     ` Linus Walleij
2020-07-16 13:42     ` Lee Jones
2020-07-17 14:10       ` Alexandre Belloni
2020-11-12  9:39   ` [PATCH v2 " Lee Jones
2020-11-12 10:07     ` Alexandre Belloni
2020-11-12 10:48       ` Lee Jones
2020-11-13  9:39         ` Alexandre Belloni
2020-11-13 10:00           ` Lee Jones
2020-11-26 13:28     ` [PATCH v3 " Lee Jones
2020-11-26 15:33       ` Alexandre Belloni [this message]
2020-07-13 14:49 ` [PATCH 17/25] pinctrl: pinctrl-at91: Demote non-kerneldoc header and complete another Lee Jones
2020-07-13 14:49 ` [PATCH 18/25] pinctrl: pinctrl-bm1880: Rename ill documented struct attribute entries Lee Jones
2020-07-14 17:17   ` Manivannan Sadhasivam
2020-07-13 14:49 ` [PATCH 19/25] pinctrl: pinctrl-rockchip: Fix a bunch of kerneldoc misdemeanours Lee Jones
2020-07-14 18:32   ` Heiko Stuebner
2020-07-13 14:49 ` [PATCH 20/25] pinctrl: pinctrl-rza1: Demote some kerneldoc headers and fix others Lee Jones
2020-07-14 13:14   ` Jacopo Mondi
2020-07-14 13:45     ` Lee Jones
2020-07-15  7:30   ` Geert Uytterhoeven
2020-07-16 13:57     ` Linus Walleij
2020-07-16 14:12       ` Geert Uytterhoeven
2020-07-13 14:49 ` [PATCH 21/25] pinctrl: pinctrl-single: Fix struct/function documentation blocks Lee Jones
2020-07-13 16:32   ` Tony Lindgren
2020-07-13 14:49 ` [PATCH 22/25] pinctrl: tegra: pinctrl-tegra194: Do not initialise field twice Lee Jones
2020-07-14 15:49   ` Thierry Reding
2020-07-13 14:49 ` [PATCH 23/25] pinctrl: meson: pinctrl-meson-a1: Remove unused const variable 'i2c_slave_groups' Lee Jones
2020-07-13 14:49 ` [PATCH 24/25] pinctrl: mvebu: pinctrl-armada-37xx: Update documentation block for 'struct armada_37xx_pin_group' Lee Jones
2020-07-13 14:49 ` [PATCH 25/25] pinctrl: pinctrl-amd: Do not define 'struct acpi_device_id' when !CONFIG_ACPI Lee Jones
2020-07-16 13:05 ` [PATCH 00/25] Rid W=1 warnings in Pinctrl Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201126153320.GE1296649@piout.net \
    --to=alexandre.belloni@bootlin.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=ludovic.desroches@microchip.com \
    --cc=nicolas.ferre@microchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).