Linux-GPIO Archive on lore.kernel.org
 help / color / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: linus.walleij@linaro.org, linux-kernel@vger.kernel.org,
	linux-gpio@vger.kernel.org,
	Jonathan Hunter <jonathanh@nvidia.com>,
	linux-tegra@vger.kernel.org
Subject: Re: [PATCH 22/25] pinctrl: tegra: pinctrl-tegra194: Do not initialise field twice
Date: Tue, 14 Jul 2020 17:49:14 +0200
Message-ID: <20200714154914.GA251696@ulmo> (raw)
In-Reply-To: <20200713144930.1034632-23-lee.jones@linaro.org>


[-- Attachment #1: Type: text/plain, Size: 3459 bytes --]

On Mon, Jul 13, 2020 at 03:49:27PM +0100, Lee Jones wrote:
> Both PIN_PINGROUP_ENTRY_Y() and DRV_PINGROUP_ENTRY_Y() macros are
> called for each of the 2 pin groups defined here, and both of them
> initialise 'drv_reg', causing the compiler to complain.
> 
> Only initialise 'drv_reg' once.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/pinctrl/tegra/pinctrl-tegra194.c:71:14: warning: initialized field overwritten [-Woverride-init]
>  71 | .drv_reg = ((r)), | ^
>  drivers/pinctrl/tegra/pinctrl-tegra194.c:105:2: note: in expansion of macro ‘DRV_PINGROUP_ENTRY_Y’
>  105 | DRV_PINGROUP_ENTRY_Y(0x14004, 12, 5, 20, 5, -1, -1, -1, -1, 0)
>  | ^~~~~~~~~~~~~~~~~~~~
>  drivers/pinctrl/tegra/pinctrl-tegra194.c:124:3: note: in expansion of macro ‘drive_pex_l5_clkreq_n_pgg0’
>  124 | drive_##pg_name, | ^~~~~~
>  drivers/pinctrl/tegra/pinctrl-tegra194.c:128:2: note: in expansion of macro ‘PINGROUP’
>  128 | PINGROUP(pex_l5_clkreq_n_pgg0, PE5, RSVD1, RSVD2, RSVD3, 0x14000, 0,
>  | ^~~~~~~~
>  drivers/pinctrl/tegra/pinctrl-tegra194.c:71:14: note: (near initialization for ‘tegra194_groups[0].drv_reg’)
>  71 | .drv_reg = ((r)), | ^
>  drivers/pinctrl/tegra/pinctrl-tegra194.c:105:2: note: in expansion of macro ‘DRV_PINGROUP_ENTRY_Y’
>  105 | DRV_PINGROUP_ENTRY_Y(0x14004, 12, 5, 20, 5, -1, -1, -1, -1, 0)
>  | ^~~~~~~~~~~~~~~~~~~~
>  drivers/pinctrl/tegra/pinctrl-tegra194.c:124:3: note: in expansion of macro ‘drive_pex_l5_clkreq_n_pgg0’
>  124 | drive_##pg_name, | ^~~~~~
>  drivers/pinctrl/tegra/pinctrl-tegra194.c:128:2: note: in expansion of macro ‘PINGROUP’
>  128 | PINGROUP(pex_l5_clkreq_n_pgg0, PE5, RSVD1, RSVD2, RSVD3, 0x14000, 0,
>  | ^~~~~~~~
>  drivers/pinctrl/tegra/pinctrl-tegra194.c:71:14: warning: initialized field overwritten [-Woverride-init]
>  71 | .drv_reg = ((r)), | ^
>  drivers/pinctrl/tegra/pinctrl-tegra194.c:107:2: note: in expansion of macro ‘DRV_PINGROUP_ENTRY_Y’
>  107 | DRV_PINGROUP_ENTRY_Y(0x1400c, 12, 5, 20, 5, -1, -1, -1, -1, 0)
>  | ^~~~~~~~~~~~~~~~~~~~
>  drivers/pinctrl/tegra/pinctrl-tegra194.c:124:3: note: in expansion of macro ‘drive_pex_l5_rst_n_pgg1’
>  124 | drive_##pg_name, | ^~~~~~
>  drivers/pinctrl/tegra/pinctrl-tegra194.c:130:2: note: in expansion of macro ‘PINGROUP’
>  130 | PINGROUP(pex_l5_rst_n_pgg1, PE5, RSVD1, RSVD2, RSVD3, 0x14008, 0,
>  | ^~~~~~~~
>  drivers/pinctrl/tegra/pinctrl-tegra194.c:71:14: note: (near initialization for ‘tegra194_groups[1].drv_reg’)
>  71 | .drv_reg = ((r)), | ^
>  drivers/pinctrl/tegra/pinctrl-tegra194.c:107:2: note: in expansion of macro ‘DRV_PINGROUP_ENTRY_Y’
>  107 | DRV_PINGROUP_ENTRY_Y(0x1400c, 12, 5, 20, 5, -1, -1, -1, -1, 0)
>  | ^~~~~~~~~~~~~~~~~~~~
>  drivers/pinctrl/tegra/pinctrl-tegra194.c:124:3: note: in expansion of macro ‘drive_pex_l5_rst_n_pgg1’
>  124 | drive_##pg_name, | ^~~~~~
>  drivers/pinctrl/tegra/pinctrl-tegra194.c:130:2: note: in expansion of macro ‘PINGROUP’
>  130 | PINGROUP(pex_l5_rst_n_pgg1, PE5, RSVD1, RSVD2, RSVD3, 0x14008, 0,
>  | ^~~~~~~~
> 
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Jonathan Hunter <jonathanh@nvidia.com>
> Cc: linux-tegra@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/pinctrl/tegra/pinctrl-tegra194.c | 1 -
>  1 file changed, 1 deletion(-)

Indeed, looks correct to me:

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply index

Thread overview: 54+ 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-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 [this message]
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=20200714154914.GA251696@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=jonathanh@nvidia.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-tegra@vger.kernel.org \
    /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

Linux-GPIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-gpio/0 linux-gpio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-gpio linux-gpio/ https://lore.kernel.org/linux-gpio \
		linux-gpio@vger.kernel.org
	public-inbox-index linux-gpio

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-gpio


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git