* [PATCH] pinctrl: airoha: Fix AIROHA_PINCTRL_CONFS_DRIVE_E2 in an7583_pinctrl_match_data
@ 2025-11-12 18:44 Nathan Chancellor
2025-11-15 19:55 ` Christian Marangi
2025-11-18 23:03 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Nathan Chancellor @ 2025-11-12 18:44 UTC (permalink / raw)
To: Linus Walleij, Christian Marangi, Lorenzo Bianconi, Sean Wang,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: linux-mediatek, linux-gpio, linux-arm-kernel, llvm, patches,
Nathan Chancellor
Clang warns (or errors with CONFIG_WERROR=y / W=e):
pinctrl/mediatek/pinctrl-airoha.c:2064:41: error: variable 'an7583_pinctrl_drive_e2_conf' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
2064 | static const struct airoha_pinctrl_conf an7583_pinctrl_drive_e2_conf[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Due to a typo, an7583_pinctrl_drive_e2_conf is only used within
ARRAY_SIZE() (hence no instance of -Wunused-variable), which is
evaluated at compile time, so it will not be needed in the final object
file.
Fix the .confs assignment for AIROHA_PINCTRL_CONFS_DRIVE_E2 in
an7583_pinctrl_match_data to clear up the warning.
Closes: https://github.com/ClangBuiltLinux/linux/issues/2142
Fixes: 3ffeb17a9a27 ("pinctrl: airoha: add support for Airoha AN7583 PINs")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
drivers/pinctrl/mediatek/pinctrl-airoha.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/mediatek/pinctrl-airoha.c b/drivers/pinctrl/mediatek/pinctrl-airoha.c
index bfcedc7f920b..706532a820b0 100644
--- a/drivers/pinctrl/mediatek/pinctrl-airoha.c
+++ b/drivers/pinctrl/mediatek/pinctrl-airoha.c
@@ -2993,7 +2993,7 @@ static const struct airoha_pinctrl_match_data an7583_pinctrl_match_data = {
.num_confs = ARRAY_SIZE(an7583_pinctrl_pulldown_conf),
},
[AIROHA_PINCTRL_CONFS_DRIVE_E2] = {
- .confs = en7581_pinctrl_drive_e2_conf,
+ .confs = an7583_pinctrl_drive_e2_conf,
.num_confs = ARRAY_SIZE(an7583_pinctrl_drive_e2_conf),
},
[AIROHA_PINCTRL_CONFS_DRIVE_E4] = {
---
base-commit: 57916750bc0886917ea2c6209ca6a56acb7b8182
change-id: 20251112-pinctrl-airoha-fix-an7583-drive-e2-confg-usage-bbf4cff20b50
Best regards,
--
Nathan Chancellor <nathan@kernel.org>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: airoha: Fix AIROHA_PINCTRL_CONFS_DRIVE_E2 in an7583_pinctrl_match_data
2025-11-12 18:44 [PATCH] pinctrl: airoha: Fix AIROHA_PINCTRL_CONFS_DRIVE_E2 in an7583_pinctrl_match_data Nathan Chancellor
@ 2025-11-15 19:55 ` Christian Marangi
2025-11-18 23:03 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Christian Marangi @ 2025-11-15 19:55 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Linus Walleij, Lorenzo Bianconi, Sean Wang, Matthias Brugger,
AngeloGioacchino Del Regno, linux-mediatek, linux-gpio,
linux-arm-kernel, llvm, patches
On Wed, Nov 12, 2025 at 11:44:30AM -0700, Nathan Chancellor wrote:
> Clang warns (or errors with CONFIG_WERROR=y / W=e):
>
> pinctrl/mediatek/pinctrl-airoha.c:2064:41: error: variable 'an7583_pinctrl_drive_e2_conf' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
> 2064 | static const struct airoha_pinctrl_conf an7583_pinctrl_drive_e2_conf[] = {
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Due to a typo, an7583_pinctrl_drive_e2_conf is only used within
> ARRAY_SIZE() (hence no instance of -Wunused-variable), which is
> evaluated at compile time, so it will not be needed in the final object
> file.
>
> Fix the .confs assignment for AIROHA_PINCTRL_CONFS_DRIVE_E2 in
> an7583_pinctrl_match_data to clear up the warning.
>
> Closes: https://github.com/ClangBuiltLinux/linux/issues/2142
> Fixes: 3ffeb17a9a27 ("pinctrl: airoha: add support for Airoha AN7583 PINs")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
> drivers/pinctrl/mediatek/pinctrl-airoha.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/mediatek/pinctrl-airoha.c b/drivers/pinctrl/mediatek/pinctrl-airoha.c
> index bfcedc7f920b..706532a820b0 100644
> --- a/drivers/pinctrl/mediatek/pinctrl-airoha.c
> +++ b/drivers/pinctrl/mediatek/pinctrl-airoha.c
> @@ -2993,7 +2993,7 @@ static const struct airoha_pinctrl_match_data an7583_pinctrl_match_data = {
> .num_confs = ARRAY_SIZE(an7583_pinctrl_pulldown_conf),
> },
> [AIROHA_PINCTRL_CONFS_DRIVE_E2] = {
> - .confs = en7581_pinctrl_drive_e2_conf,
> + .confs = an7583_pinctrl_drive_e2_conf,
> .num_confs = ARRAY_SIZE(an7583_pinctrl_drive_e2_conf),
> },
> [AIROHA_PINCTRL_CONFS_DRIVE_E4] = {
>
> ---
> base-commit: 57916750bc0886917ea2c6209ca6a56acb7b8182
> change-id: 20251112-pinctrl-airoha-fix-an7583-drive-e2-confg-usage-bbf4cff20b50
>
> Best regards,
> --
> Nathan Chancellor <nathan@kernel.org>
>
--
Ansuel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: airoha: Fix AIROHA_PINCTRL_CONFS_DRIVE_E2 in an7583_pinctrl_match_data
2025-11-12 18:44 [PATCH] pinctrl: airoha: Fix AIROHA_PINCTRL_CONFS_DRIVE_E2 in an7583_pinctrl_match_data Nathan Chancellor
2025-11-15 19:55 ` Christian Marangi
@ 2025-11-18 23:03 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2025-11-18 23:03 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Christian Marangi, Lorenzo Bianconi, Sean Wang, Matthias Brugger,
AngeloGioacchino Del Regno, linux-mediatek, linux-gpio,
linux-arm-kernel, llvm, patches
On Wed, Nov 12, 2025 at 7:44 PM Nathan Chancellor <nathan@kernel.org> wrote:
> Clang warns (or errors with CONFIG_WERROR=y / W=e):
>
> pinctrl/mediatek/pinctrl-airoha.c:2064:41: error: variable 'an7583_pinctrl_drive_e2_conf' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
> 2064 | static const struct airoha_pinctrl_conf an7583_pinctrl_drive_e2_conf[] = {
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Due to a typo, an7583_pinctrl_drive_e2_conf is only used within
> ARRAY_SIZE() (hence no instance of -Wunused-variable), which is
> evaluated at compile time, so it will not be needed in the final object
> file.
>
> Fix the .confs assignment for AIROHA_PINCTRL_CONFS_DRIVE_E2 in
> an7583_pinctrl_match_data to clear up the warning.
>
> Closes: https://github.com/ClangBuiltLinux/linux/issues/2142
> Fixes: 3ffeb17a9a27 ("pinctrl: airoha: add support for Airoha AN7583 PINs")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Patch applied!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-11-18 23:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-12 18:44 [PATCH] pinctrl: airoha: Fix AIROHA_PINCTRL_CONFS_DRIVE_E2 in an7583_pinctrl_match_data Nathan Chancellor
2025-11-15 19:55 ` Christian Marangi
2025-11-18 23:03 ` Linus Walleij
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).