All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: fix a discarded-qualifiers build error
@ 2022-01-25 17:54 ` Miles Chen
  0 siblings, 0 replies; 9+ messages in thread
From: Miles Chen @ 2022-01-25 17:54 UTC (permalink / raw)
  To: Lakshmi Sowjanya D, Linus Walleij, Matthias Brugger, Kiran Kumar S
  Cc: Miles Chen, linux-gpio, linux-kernel, linux-arm-kernel, linux-mediatek

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 <miles.chen@mediatek.com>
---
 drivers/pinctrl/pinctrl-thunderbay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-thunderbay.c b/drivers/pinctrl/pinctrl-thunderbay.c
index b5b47f4dd774..4e6d718c03fc 100644
--- a/drivers/pinctrl/pinctrl-thunderbay.c
+++ b/drivers/pinctrl/pinctrl-thunderbay.c
@@ -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++;
 
-- 
2.18.0


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] pinctrl: fix a discarded-qualifiers build error
@ 2022-01-25 17:54 ` Miles Chen
  0 siblings, 0 replies; 9+ messages in thread
From: Miles Chen @ 2022-01-25 17:54 UTC (permalink / raw)
  To: Lakshmi Sowjanya D, Linus Walleij, Matthias Brugger, Kiran Kumar S
  Cc: Miles Chen, linux-gpio, linux-kernel, linux-arm-kernel, linux-mediatek

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 <miles.chen@mediatek.com>
---
 drivers/pinctrl/pinctrl-thunderbay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-thunderbay.c b/drivers/pinctrl/pinctrl-thunderbay.c
index b5b47f4dd774..4e6d718c03fc 100644
--- a/drivers/pinctrl/pinctrl-thunderbay.c
+++ b/drivers/pinctrl/pinctrl-thunderbay.c
@@ -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++;
 
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] pinctrl: fix a discarded-qualifiers build error
@ 2022-01-25 17:54 ` Miles Chen
  0 siblings, 0 replies; 9+ messages in thread
From: Miles Chen @ 2022-01-25 17:54 UTC (permalink / raw)
  To: Lakshmi Sowjanya D, Linus Walleij, Matthias Brugger, Kiran Kumar S
  Cc: Miles Chen, linux-gpio, linux-kernel, linux-arm-kernel, linux-mediatek

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 <miles.chen@mediatek.com>
---
 drivers/pinctrl/pinctrl-thunderbay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-thunderbay.c b/drivers/pinctrl/pinctrl-thunderbay.c
index b5b47f4dd774..4e6d718c03fc 100644
--- a/drivers/pinctrl/pinctrl-thunderbay.c
+++ b/drivers/pinctrl/pinctrl-thunderbay.c
@@ -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++;
 
-- 
2.18.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* RE: [PATCH] pinctrl: fix a discarded-qualifiers build error
  2022-01-25 17:54 ` Miles Chen
  (?)
@ 2022-01-25 22:17   ` David Laight
  -1 siblings, 0 replies; 9+ messages in thread
From: David Laight @ 2022-01-25 22:17 UTC (permalink / raw)
  To: 'Miles Chen',
	Lakshmi Sowjanya D, Linus Walleij, Matthias Brugger,
	Kiran Kumar S
  Cc: linux-gpio, linux-kernel, linux-arm-kernel, linux-mediatek

From: Miles Chen
> 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 <miles.chen@mediatek.com>
> ---
>  drivers/pinctrl/pinctrl-thunderbay.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-thunderbay.c b/drivers/pinctrl/pinctrl-thunderbay.c
> index b5b47f4dd774..4e6d718c03fc 100644
> --- a/drivers/pinctrl/pinctrl-thunderbay.c
> +++ b/drivers/pinctrl/pinctrl-thunderbay.c
> @@ -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)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] pinctrl: fix a discarded-qualifiers build error
@ 2022-01-25 22:17   ` David Laight
  0 siblings, 0 replies; 9+ messages in thread
From: David Laight @ 2022-01-25 22:17 UTC (permalink / raw)
  To: 'Miles Chen',
	Lakshmi Sowjanya D, Linus Walleij, Matthias Brugger,
	Kiran Kumar S
  Cc: linux-gpio, linux-kernel, linux-arm-kernel, linux-mediatek

From: Miles Chen
> 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 <miles.chen@mediatek.com>
> ---
>  drivers/pinctrl/pinctrl-thunderbay.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-thunderbay.c b/drivers/pinctrl/pinctrl-thunderbay.c
> index b5b47f4dd774..4e6d718c03fc 100644
> --- a/drivers/pinctrl/pinctrl-thunderbay.c
> +++ b/drivers/pinctrl/pinctrl-thunderbay.c
> @@ -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)


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] pinctrl: fix a discarded-qualifiers build error
@ 2022-01-25 22:17   ` David Laight
  0 siblings, 0 replies; 9+ messages in thread
From: David Laight @ 2022-01-25 22:17 UTC (permalink / raw)
  To: 'Miles Chen',
	Lakshmi Sowjanya D, Linus Walleij, Matthias Brugger,
	Kiran Kumar S
  Cc: linux-gpio, linux-kernel, linux-arm-kernel, linux-mediatek

From: Miles Chen
> 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 <miles.chen@mediatek.com>
> ---
>  drivers/pinctrl/pinctrl-thunderbay.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-thunderbay.c b/drivers/pinctrl/pinctrl-thunderbay.c
> index b5b47f4dd774..4e6d718c03fc 100644
> --- a/drivers/pinctrl/pinctrl-thunderbay.c
> +++ b/drivers/pinctrl/pinctrl-thunderbay.c
> @@ -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)


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] pinctrl: fix a discarded-qualifiers build error
  2022-01-25 22:17   ` David Laight
  (?)
@ 2022-01-26  5:11     ` Miles Chen
  -1 siblings, 0 replies; 9+ messages in thread
From: Miles Chen @ 2022-01-26  5:11 UTC (permalink / raw)
  To: david.laight
  Cc: kiran.kumar1.s, lakshmi.sowjanya.d, linus.walleij,
	linux-arm-kernel, linux-gpio, linux-kernel, linux-mediatek,
	matthias.bgg, miles.chen

Hi, 

> 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

[1] https://lore.kernel.org/lkml/DM6PR11MB3660804C821D7CA7329B6CAFC45F9@DM6PR11MB3660.namprd11.prod.outlook.com/


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] pinctrl: fix a discarded-qualifiers build error
@ 2022-01-26  5:11     ` Miles Chen
  0 siblings, 0 replies; 9+ messages in thread
From: Miles Chen @ 2022-01-26  5:11 UTC (permalink / raw)
  To: david.laight
  Cc: kiran.kumar1.s, lakshmi.sowjanya.d, linus.walleij,
	linux-arm-kernel, linux-gpio, linux-kernel, linux-mediatek,
	matthias.bgg, miles.chen

Hi, 

> 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

[1] https://lore.kernel.org/lkml/DM6PR11MB3660804C821D7CA7329B6CAFC45F9@DM6PR11MB3660.namprd11.prod.outlook.com/


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] pinctrl: fix a discarded-qualifiers build error
@ 2022-01-26  5:11     ` Miles Chen
  0 siblings, 0 replies; 9+ messages in thread
From: Miles Chen @ 2022-01-26  5:11 UTC (permalink / raw)
  To: david.laight
  Cc: kiran.kumar1.s, lakshmi.sowjanya.d, linus.walleij,
	linux-arm-kernel, linux-gpio, linux-kernel, linux-mediatek,
	matthias.bgg, miles.chen

Hi, 

> 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

[1] https://lore.kernel.org/lkml/DM6PR11MB3660804C821D7CA7329B6CAFC45F9@DM6PR11MB3660.namprd11.prod.outlook.com/


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-01-26  5:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-25 17:54 [PATCH] pinctrl: fix a discarded-qualifiers build error Miles Chen
2022-01-25 17:54 ` Miles Chen
2022-01-25 17:54 ` Miles Chen
2022-01-25 22:17 ` David Laight
2022-01-25 22:17   ` David Laight
2022-01-25 22:17   ` David Laight
2022-01-26  5:11   ` Miles Chen
2022-01-26  5:11     ` Miles Chen
2022-01-26  5:11     ` Miles Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.