pinctrl: fix a discarded-qualifiers build error
Subsystems (3)
PATCH 1/1 pinctrl: fix a discarded-qualifiers build error
Fix COMPILER=gcc ARCH=arm64 DEFCONFIG=allyesconfig build:
log:drivers/pinctrl/pinctrl-thunderbay.c:815:29: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
--- drivers/pinctrl/pinctrl-thunderbay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/pinctrl-thunderbay.c +1 -1
@@ -812,7 +812,7 @@ static int thunderbay_add_functions(struct thunderbay_pinctrl *tpc, struct funct } } - grp = func->group_names; + grp = (const char **)func->group_names;while (*grp) grp++;
Signature · 7 lines
2.18.0 _______________________________________________ Linux-mediatek mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-mediatek
From: Miles Chen
Quoted 19 lines
Sent: 25 January 2022 17:55
Fix COMPILER=gcc ARCH=arm64 DEFCONFIG=allyesconfig build:
log:
drivers/pinctrl/pinctrl-thunderbay.c:815:29: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]Fixes 12422af8194d ("pinctrl: Add Intel Thunder Bay pinctrl driver")Signed-off-by Miles Chen <[email protected]>--- drivers/pinctrl/pinctrl-thunderbay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pinctrl/pinctrl-thunderbay.c +0
-0
drivers/pinctrl/pinctrl-thunderbay.c static int thunderbay_add_functions(struct thunderbay_pinctrl *tpc, struct funct · line 815
Quoted 5 lines
drivers/pinctrl/pinctrl-thunderbay.c +1
-1@@ -812,7 +812,7 @@ static int thunderbay_add_functions(struct thunderbay_pinctrl *tpc, struct funct } } - grp = func->group_names; + grp = (const char **)func->group_names;
You should change the type of 'grp' not add a cast. The compiler can warn about casts removing 'const' as well.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
Hi,
Quoted 4 lines
You should change the type of 'grp' not add a cast. The compiler can warn about casts removing 'const' as well.
David
Thanks for the comment,
I just found that this issue has been fixed [1]
Miles