2021-10-26 07:13:32

by Stephen Rothwell

[permalink] [raw]
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.
--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-10-26 16:33:26

by Prathamesh Shete

[permalink] [raw]
Subject: RE: linux-next: build failure after merge of the pinctrl tree

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.
--
Cheers,
Stephen Rothwell


Attachments:
0001-pinctrl-tegra-Fix-warnings-and-error.patch (1.50 kB)
0001-pinctrl-tegra-Fix-warnings-and-error.patch

2021-10-27 10:15:49

by Linus Walleij

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the pinctrl tree

On Tue, Oct 26, 2021 at 2:30 PM Prathamesh Shete <[email protected]> wrote:

> Fixed following warnings and error.
> Attached the patch that fixes the issue.
> Please help apply the Patch.

I applied the patch!

Yours,
Linus Walleij

2021-10-27 11:04:18

by Dmitry Osipenko

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the pinctrl tree

26.10.2021 15:30, Prathamesh Shete пишет:
> 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.
>

The tegra_pinctrl_get_group() should return const and not cast the
pointers. Please make another patch to fix it properly.

2021-10-28 12:34:05

by Prathamesh Shete

[permalink] [raw]
Subject: RE: linux-next: build failure after merge of the pinctrl tree

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 пишет:
> 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.
>

The tegra_pinctrl_get_group() should return const and not cast the pointers. Please make another patch to fix it properly.


Attachments:
0001-pinctrl-tegra-Return-const-pointer-from-tegra_pinctr.patch (1.39 kB)
0001-pinctrl-tegra-Return-const-pointer-from-tegra_pinctr.patch

2021-11-09 12:54:18

by Linus Walleij

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the pinctrl tree

On Thu, Oct 28, 2021 at 2:31 PM Prathamesh Shete <[email protected]> wrote:

> Thanks Dmitry for pointing out.
> Attached patch to fix the issue.
> Please help apply the patch.

Patch applied for fixes.

Yours,
Linus Walleij