linux-next: build failure after merge of the pinctrl tree
Subsystems (3)
Hi all,
After merging the pinctrl tree, today's linux-next build (arm multi_v7_defconfig) failed like this:
drivers/pinctrl/tegra/pinctrl-tegra.c: In function 'tegra_pinctrl_get_group':drivers/pinctrl/tegra/pinctrl-tegra.c:293:12: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
293 | return &pmx->soc->groups[group];
| ^~~~~~~~~~~~~~~~~~~~~~~~drivers/pinctrl/tegra/pinctrl-tegra.c:282:25: warning: unused variable 'g' [-Wunused-variable]
282 | struct tegra_pingroup *g;
| ^drivers/pinctrl/tegra/pinctrl-tegra.c: In function 'tegra_pinctrl_gpio_disable_free':drivers/pinctrl/tegra/pinctrl-tegra.c:341:10: error: 'return' with a value, in function returning void [-Werror=return-type]
341 | return -EINVAL;
| ^drivers/pinctrl/tegra/pinctrl-tegra.c:327:13: note: declared here
327 | static void tegra_pinctrl_gpio_disable_free(struct pinctrl_dev *pctldev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Caused by commit
a42c7d95d29e ("pinctrl: tegra: Use correct offset for pin group")
I have used the pinctrl tree from next-20211025 for today.
Signature · 2 lines
Cheers, Stephen Rothwell
Fixed following warnings and error.
Attached the patch that fixes the issue.
Please help apply the Patch.
Thanks
Prathamesh.
-----Original Message-----
From: Stephen Rothwell <[email protected]>
Sent: Tuesday, October 26, 2021 10:59 AM
To: Linus Walleij <[email protected]>
Cc: Kartik . <[email protected]>; Prathamesh Shete <[email protected]>; Linux Kernel Mailing List <[email protected]>; Linux Next Mailing List <[email protected]>
Subject: linux-next: build failure after merge of the pinctrl tree
Hi all,
After merging the pinctrl tree, today's linux-next build (arm multi_v7_defconfig) failed like this:
drivers/pinctrl/tegra/pinctrl-tegra.c: In function 'tegra_pinctrl_get_group':drivers/pinctrl/tegra/pinctrl-tegra.c:293:12: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
293 | return &pmx->soc->groups[group];
| ^~~~~~~~~~~~~~~~~~~~~~~~drivers/pinctrl/tegra/pinctrl-tegra.c:282:25: warning: unused variable 'g' [-Wunused-variable]
282 | struct tegra_pingroup *g;
| ^drivers/pinctrl/tegra/pinctrl-tegra.c: In function 'tegra_pinctrl_gpio_disable_free':drivers/pinctrl/tegra/pinctrl-tegra.c:341:10: error: 'return' with a value, in function returning void [-Werror=return-type]
341 | return -EINVAL;
| ^drivers/pinctrl/tegra/pinctrl-tegra.c:327:13: note: declared here
327 | static void tegra_pinctrl_gpio_disable_free(struct pinctrl_dev *pctldev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Caused by commit
a42c7d95d29e ("pinctrl: tegra: Use correct offset for pin group")
I have used the pinctrl tree from next-20211025 for today.
Signature · 2 lines
Cheers, Stephen Rothwell
From d40c09bfd0415b57e102b1be3818b02a2d1080a9 Mon Sep 17 00:00:00 2001
From: Prathamesh Shete <[email protected]>
Date: Tue, 26 Oct 2021 17:41:35 +0530
Subject: [PATCH] pinctrl: tegra: Fix warnings and error
Fix warnings are errors caused by commit a42c7d95d29e ("pinctrl: tegra: Use correct offset for pin group").
--- drivers/pinctrl/tegra/pinctrl-tegra.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/pinctrl/tegra/pinctrl-tegra.c +2 -3
@@ -279,7 +279,6 @@ static struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *pctlde unsigned int offset) {struct tegra_pmx *pmx =pinctrl_dev_get_drvdata (pctldev); -struct tegra_pingroup *g;unsigned int group, num_pins, j;const unsigned int *pins;int ret;
@@ -290,7 +289,7 @@ static struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *pctldecontinue ;for (j =0 ; j < num_pins; j++) {if (offset == pins[j]) -return &pmx->soc->groups[group]; +return (struct tegra_pingroup *)&pmx->soc->groups[group]; } }
@@ -338,7 +337,7 @@ static void tegra_pinctrl_gpio_disable_free(struct pinctrl_dev *pctldev, group =tegra_pinctrl_get_group (pctldev, offset);if (!group) -return -EINVAL ; +return ;if (group->mux_reg <0 || group->sfsel_bit <0 )return ;
Signature · 1 line
2.17.1
Quoted 3 lines · Prathamesh Shete
Fixed following warnings and error.
Attached the patch that fixes the issue.
Please help apply the Patch.
I applied the patch!
Yours,
Linus Walleij
26.10.2021 15:30, Prathamesh Shete пишет:
Quoted 32 lines
Fixed following warnings and error.
Attached the patch that fixes the issue.
Please help apply the Patch.Thanks
Prathamesh.-----Original Message-----
From: Stephen Rothwell <[email protected]>
Sent: Tuesday, October 26, 2021 10:59 AM
To: Linus Walleij <[email protected]>
Cc: Kartik . <[email protected]>; Prathamesh Shete <[email protected]>; Linux Kernel Mailing List <[email protected]>; Linux Next Mailing List <[email protected]>
Subject: linux-next: build failure after merge of the pinctrl treeHi all,
After merging the pinctrl tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:
drivers/pinctrl/tegra/pinctrl-tegra.c: In function 'tegra_pinctrl_get_group':drivers/pinctrl/tegra/pinctrl-tegra.c:293:12: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]293 | return &pmx->soc->groups[group]; | ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/tegra/pinctrl-tegra.c:282:25: warning: unused variable 'g' [-Wunused-variable]
282 | structtegra_pingroup*g;
| ^drivers/pinctrl/tegra/pinctrl-tegra.c: In function 'tegra_pinctrl_gpio_disable_free':drivers/pinctrl/tegra/pinctrl-tegra.c:341:10: error: 'return' with a value, in function returning void [-Werror=return-type]
341 | return-EINVAL;
| ^drivers/pinctrl/tegra/pinctrl-tegra.c:327:13: note: declared here
327 | static void tegra_pinctrl_gpio_disable_free(structpinctrl_dev*pctldev,
Quoted 8 lines
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Caused by commit
a42c7d95d29e("pinctrl: tegra: Use correct offset for pin group")I have used the pinctrl tree from next-20211025 for today.
The tegra_pinctrl_get_group() should return const and not cast the pointers. Please make another patch to fix it properly.
Thanks Dmitry for pointing out.
Attached patch to fix the issue.
Please help apply the patch.
Thanks
Prathamesh.
-----Original Message-----
From: Dmitry Osipenko <[email protected]>
Sent: Wednesday, October 27, 2021 2:51 AM
To: Prathamesh Shete <[email protected]>; Stephen Rothwell <[email protected]>; Linus Walleij <[email protected]>
Cc: Kartik . <[email protected]>; Linux Kernel Mailing List <[email protected]>; Linux Next Mailing List <[email protected]>
Subject: Re: linux-next: build failure after merge of the pinctrl tree
External email: Use caution opening links or attachments
26.10.2021 15:30, Prathamesh Shete пишет:
Quoted 35 lines
Fixed following warnings and error. Attached the patch that fixes the issue. Please help apply the Patch.
Thanks
Prathamesh.-----Original Message-----
From: Stephen Rothwell <[email protected]>
Sent: Tuesday, October 26, 2021 10:59 AM
To: Linus Walleij <[email protected]>
Cc: Kartik . <[email protected]>; Prathamesh Shete <[email protected]>; Linux Kernel Mailing List <[email protected]>; Linux Next Mailing List <[email protected]>
Subject: linux-next: build failure after merge of the pinctrl treeHi all,
After merging the pinctrl tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:
drivers/pinctrl/tegra/pinctrl-tegra.c: In function 'tegra_pinctrl_get_group':drivers/pinctrl/tegra/pinctrl-tegra.c:293:12: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]293 | return &pmx->soc->groups[group]; | ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/tegra/pinctrl-tegra.c:282:25: warning: unused variable 'g' [-Wunused-variable]
282 | structtegra_pingroup*g;
| ^drivers/pinctrl/tegra/pinctrl-tegra.c: In function 'tegra_pinctrl_gpio_disable_free':drivers/pinctrl/tegra/pinctrl-tegra.c:341:10: error: 'return' with a value, in function returning void [-Werror=return-type]
341 | return-EINVAL;
| ^drivers/pinctrl/tegra/pinctrl-tegra.c:327:13: note: declared here
327 | static void tegra_pinctrl_gpio_disable_free(structpinctrl_dev*pctldev,
Quoted 8 lines
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Caused by commit
a42c7d95d29e("pinctrl: tegra: Use correct offset for pin group")I have used the pinctrl tree from next-20211025 for today.
The tegra_pinctrl_get_group() should return const and not cast the pointers. Please make another patch to fix it properly.
From 247a23a8ba6378fb6bd9100b93e82f109deb9c2b Mon Sep 17 00:00:00 2001
From: Prathamesh Shete <[email protected]>
Date: Thu, 28 Oct 2021 17:32:35 +0530
Subject: [PATCH] pinctrl: tegra: Return const pointer from
tegra_pinctrl_get_group()
Instead of returning const pointer from tegra_pinctrl_get_group() the return value is being casted.
This change helps return const pointer.
--- drivers/pinctrl/tegra/pinctrl-tegra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/tegra/pinctrl-tegra.c +2 -2
@@ -275,7 +275,7 @@ static int tegra_pinctrl_set_mux(struct pinctrl_dev *pctldev,return 0 ; } -static struct tegra_pingroup *tegra_pinctrl_get_group (struct pinctrl_dev *pctldev, +static const struct tegra_pingroup *tegra_pinctrl_get_group (struct pinctrl_dev *pctldev,unsigned int offset) {struct tegra_pmx *pmx =pinctrl_dev_get_drvdata (pctldev);
@@ -289,7 +289,7 @@ static struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *pctldecontinue ;for (j =0 ; j < num_pins; j++) {if (offset == pins[j]) -return (struct tegra_pingroup *)&pmx->soc->groups[group]; +return &pmx->soc->groups[group]; } }
Signature · 1 line
2.17.1
Quoted 3 lines · Prathamesh Shete
Thanks Dmitry for pointing out.
Attached patch to fix the issue.
Please help apply the patch.
Patch applied for fixes.
Yours,
Linus Walleij