Skip to content

Commit 0341d1b

Browse files
nathanchanceLinus Walleij
authored andcommitted
pinctrl: airoha: Fix AIROHA_PINCTRL_CONFS_DRIVE_E2 in an7583_pinctrl_match_data
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: ClangBuiltLinux#2142 Fixes: 3ffeb17 ("pinctrl: airoha: add support for Airoha AN7583 PINs") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Acked-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent f2bd5a0 commit 0341d1b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/pinctrl/mediatek/pinctrl-airoha.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2993,7 +2993,7 @@ static const struct airoha_pinctrl_match_data an7583_pinctrl_match_data = {
29932993
.num_confs = ARRAY_SIZE(an7583_pinctrl_pulldown_conf),
29942994
},
29952995
[AIROHA_PINCTRL_CONFS_DRIVE_E2] = {
2996-
.confs = en7581_pinctrl_drive_e2_conf,
2996+
.confs = an7583_pinctrl_drive_e2_conf,
29972997
.num_confs = ARRAY_SIZE(an7583_pinctrl_drive_e2_conf),
29982998
},
29992999
[AIROHA_PINCTRL_CONFS_DRIVE_E4] = {

0 commit comments

Comments
 (0)