mbox series

[v4,00/23] pinctrl: Convert struct group_desc to use struct pingroup

Message ID 20231129161459.1002323-1-andriy.shevchenko@linux.intel.com (mailing list archive)
Headers show
Series pinctrl: Convert struct group_desc to use struct pingroup | expand

Message

Andy Shevchenko Nov. 29, 2023, 4:06 p.m. UTC
The struct group_desc has a lot of duplication with struct pingroup.
Deduplicate that by embeddind the latter in the former and convert
users.

Linus, assuming everything is fine, I can push this to my tree.
Or you can apply it (assumming all CIs and people are happy with
the series).

NB. It seems to me that GCC 7.x has an issue when compound literal
is being assigned to a constant object. I believe it's a false positive
(at least I can't reproduce this with recent GCC and LLVM and hence
I haven't touched the code in order to address this.

NB. This series contains previously sent patches for Qualcomm and
Nuvoton. Here the updated version for Qualcomm that splits previous
patch to two and fixes compilation warnings.

NB. The function_desc is in plan to follow the similar deduplication.

In v4:
- made pins also unsigned in struct group_desc (Geert)
- made local pins variable unsigned in renesas drivers (Geert)
- collected more tags (Paul, Geert)

v3: https://lore.kernel.org/r/20231128200155.438722-1-andriy.shevchenko@linux.intel.com

In v3:
- fixed reported bug in equilibrium code (LKP)
- collected tags (Emil, Florian, Paul)

v2: https://lore.kernel.org/r/20231123193355.3400852-1-andriy.shevchenko@linux.intel.com

In v2:
- added a few patches to fix multiple compile-time errors (LKP)
- added tag (Jonathan)

v1: https://lore.kernel.org/r/20231122164040.2262742-1-andriy.shevchenko@linux.intel.com

Andy Shevchenko (23):
  pinctrl: qcom: lpass-lpi: Replace kernel.h with what is being used
  pinctrl: qcom: lpass-lpi: Remove unused member in struct lpi_pingroup
  pinctrl: equilibrium: Unshadow error code of
    of_property_count_u32_elems()
  pinctrl: equilibrium: Use temporary variable to hold pins
  pinctrl: imx: Use temporary variable to hold pins
  pinctrl: core: Make pins const unsigned int pointer in struct
    group_desc
  pinctrl: equilibrium: Convert to use struct pingroup
  pinctrl: keembay: Convert to use struct pingroup
  pinctrl: nuvoton: Convert to use struct pingroup and
    PINCTRL_PINGROUP()
  pinctrl: core: Add a convenient define PINCTRL_GROUP_DESC()
  pinctrl: ingenic: Make use of PINCTRL_GROUP_DESC()
  pinctrl: mediatek: Make use of PINCTRL_GROUP_DESC()
  pinctrl: core: Embed struct pingroup into struct group_desc
  pinctrl: bcm: Convert to use grp member
  pinctrl: equilibrium: Convert to use grp member
  pinctrl: imx: Convert to use grp member
  pinctrl: ingenic: Convert to use grp member
  pinctrl: keembay: Convert to use grp member
  pinctrl: mediatek: Convert to use grp member
  pinctrl: renesas: Convert to use grp member
  pinctrl: starfive: Convert to use grp member
  pinctrl: core: Remove unused members from struct group_desc
  pinctrl: Convert unsigned to unsigned int

 drivers/pinctrl/bcm/pinctrl-ns.c              |  4 +-
 drivers/pinctrl/core.c                        | 41 ++++++++---------
 drivers/pinctrl/core.h                        | 33 ++++++++------
 drivers/pinctrl/devicetree.c                  |  8 ++--
 drivers/pinctrl/freescale/pinctrl-imx.c       | 44 +++++++++----------
 drivers/pinctrl/mediatek/pinctrl-moore.c      | 13 +++---
 drivers/pinctrl/mediatek/pinctrl-moore.h      |  7 +--
 drivers/pinctrl/mediatek/pinctrl-paris.h      |  7 +--
 drivers/pinctrl/nuvoton/pinctrl-wpcm450.c     |  9 ++--
 drivers/pinctrl/pinconf-generic.c             | 16 +++----
 drivers/pinctrl/pinconf.c                     | 14 +++---
 drivers/pinctrl/pinconf.h                     | 10 ++---
 drivers/pinctrl/pinctrl-equilibrium.c         | 42 +++++++++---------
 drivers/pinctrl/pinctrl-ingenic.c             | 27 +++++-------
 drivers/pinctrl/pinctrl-keembay.c             |  6 +--
 drivers/pinctrl/pinctrl-utils.c               | 26 +++++------
 drivers/pinctrl/pinctrl-utils.h               | 18 ++++----
 drivers/pinctrl/pinmux.c                      | 36 +++++++--------
 drivers/pinctrl/pinmux.h                      | 20 ++++-----
 drivers/pinctrl/qcom/pinctrl-lpass-lpi.h      |  6 +--
 .../pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c   | 16 -------
 .../pinctrl/qcom/pinctrl-sc8280xp-lpass-lpi.c | 20 ---------
 .../pinctrl/qcom/pinctrl-sm6115-lpass-lpi.c   | 20 ---------
 .../pinctrl/qcom/pinctrl-sm8250-lpass-lpi.c   | 15 -------
 .../pinctrl/qcom/pinctrl-sm8350-lpass-lpi.c   | 16 -------
 .../pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c   | 24 ----------
 .../pinctrl/qcom/pinctrl-sm8550-lpass-lpi.c   | 24 ----------
 .../pinctrl/qcom/pinctrl-sm8650-lpass-lpi.c   | 24 ----------
 drivers/pinctrl/renesas/pinctrl-rza1.c        |  2 +-
 drivers/pinctrl/renesas/pinctrl-rza2.c        | 10 ++---
 drivers/pinctrl/renesas/pinctrl-rzg2l.c       |  6 +--
 drivers/pinctrl/renesas/pinctrl-rzv2m.c       |  6 +--
 .../starfive/pinctrl-starfive-jh7100.c        |  8 ++--
 .../starfive/pinctrl-starfive-jh7110.c        |  8 ++--
 include/linux/pinctrl/machine.h               |  6 +--
 include/linux/pinctrl/pinconf-generic.h       | 10 ++---
 include/linux/pinctrl/pinconf.h               | 16 +++----
 include/linux/pinctrl/pinctrl.h               | 24 +++++-----
 include/linux/pinctrl/pinmux.h                | 22 +++++-----
 39 files changed, 242 insertions(+), 422 deletions(-)

Comments

Linus Walleij Dec. 1, 2023, 2:05 p.m. UTC | #1
On Wed, Nov 29, 2023 at 5:15 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> The struct group_desc has a lot of duplication with struct pingroup.
> Deduplicate that by embeddind the latter in the former and convert
> users.
>
> Linus, assuming everything is fine, I can push this to my tree.
> Or you can apply it (assumming all CIs and people are happy with
> the series).

I applied the series to devel so we get some rotation in linux-next,
augmenting the relevant commit messages as discussed!

Yours,
Linus Walleij
Andy Shevchenko Dec. 1, 2023, 2:19 p.m. UTC | #2
On Fri, Dec 01, 2023 at 03:05:30PM +0100, Linus Walleij wrote:
> On Wed, Nov 29, 2023 at 5:15 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:

...

> I applied the series to devel so we get some rotation in linux-next,
> augmenting the relevant commit messages as discussed!

Thank you very much and have a good weekend!
Krzysztof Kozlowski Dec. 4, 2023, 7:49 a.m. UTC | #3
On 01/12/2023 15:05, Linus Walleij wrote:
> On Wed, Nov 29, 2023 at 5:15 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> 
>> The struct group_desc has a lot of duplication with struct pingroup.
>> Deduplicate that by embeddind the latter in the former and convert
>> users.
>>
>> Linus, assuming everything is fine, I can push this to my tree.
>> Or you can apply it (assumming all CIs and people are happy with
>> the series).
> 
> I applied the series to devel so we get some rotation in linux-next,
> augmenting the relevant commit messages as discussed!
> 

... and this next fails to build on standard defconfig:
https://krzk.eu/#/builders/76/builds/420/steps/9/logs/stdio

I did not bisect yet, so I am just guessing that error looks like
something introduced here.

Best regards,
Krzysztof
Krzysztof Kozlowski Dec. 4, 2023, 7:51 a.m. UTC | #4
On 04/12/2023 08:49, Krzysztof Kozlowski wrote:
> On 01/12/2023 15:05, Linus Walleij wrote:
>> On Wed, Nov 29, 2023 at 5:15 PM Andy Shevchenko
>> <andriy.shevchenko@linux.intel.com> wrote:
>>
>>> The struct group_desc has a lot of duplication with struct pingroup.
>>> Deduplicate that by embeddind the latter in the former and convert
>>> users.
>>>
>>> Linus, assuming everything is fine, I can push this to my tree.
>>> Or you can apply it (assumming all CIs and people are happy with
>>> the series).
>>
>> I applied the series to devel so we get some rotation in linux-next,
>> augmenting the relevant commit messages as discussed!
>>
> 
> ... and this next fails to build on standard defconfig:
> https://krzk.eu/#/builders/76/builds/420/steps/9/logs/stdio
> 
> I did not bisect yet, so I am just guessing that error looks like
> something introduced here.

One more for arm32 defconfig:
https://krzk.eu/#/builders/5/builds/2532/steps/9/logs/stdio

Best regards,
Krzysztof
Linus Walleij Dec. 4, 2023, 2:35 p.m. UTC | #5
On Mon, Dec 4, 2023 at 8:49 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
> On 01/12/2023 15:05, Linus Walleij wrote:
> > On Wed, Nov 29, 2023 at 5:15 PM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> >
> >> The struct group_desc has a lot of duplication with struct pingroup.
> >> Deduplicate that by embeddind the latter in the former and convert
> >> users.
> >>
> >> Linus, assuming everything is fine, I can push this to my tree.
> >> Or you can apply it (assumming all CIs and people are happy with
> >> the series).
> >
> > I applied the series to devel so we get some rotation in linux-next,
> > augmenting the relevant commit messages as discussed!
> >
>
> ... and this next fails to build on standard defconfig:
> https://krzk.eu/#/builders/76/builds/420/steps/9/logs/stdio
>
> I did not bisect yet, so I am just guessing that error looks like
> something introduced here.

Ooops how unfortunate.

I actually thought the autobuilders grabbing patches from the mail lists
would have warned.

I dropped the majority of the patches (not the preparatory patches)
from my tree again, rinse and repeat.

Yours,
Linus Walleij
Linus Walleij Dec. 4, 2023, 2:38 p.m. UTC | #6
Hi Andy,

due to compile errors on arm32 and arm64 I had to drop most of the
patches again but I kept the preparatory patches so your
patch stack don't need to be so deep.

On Wed, Nov 29, 2023 at 5:15 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> Andy Shevchenko (23):
>   pinctrl: qcom: lpass-lpi: Replace kernel.h with what is being used
>   pinctrl: qcom: lpass-lpi: Remove unused member in struct lpi_pingroup
>   pinctrl: equilibrium: Unshadow error code of
>     of_property_count_u32_elems()
>   pinctrl: equilibrium: Use temporary variable to hold pins
>   pinctrl: imx: Use temporary variable to hold pins

I kept these.

>   pinctrl: core: Make pins const unsigned int pointer in struct
>     group_desc
>   pinctrl: equilibrium: Convert to use struct pingroup
>   pinctrl: keembay: Convert to use struct pingroup
>   pinctrl: nuvoton: Convert to use struct pingroup and
>     PINCTRL_PINGROUP()
>   pinctrl: core: Add a convenient define PINCTRL_GROUP_DESC()
>   pinctrl: ingenic: Make use of PINCTRL_GROUP_DESC()
>   pinctrl: mediatek: Make use of PINCTRL_GROUP_DESC()
>   pinctrl: core: Embed struct pingroup into struct group_desc
>   pinctrl: bcm: Convert to use grp member
>   pinctrl: equilibrium: Convert to use grp member
>   pinctrl: imx: Convert to use grp member
>   pinctrl: ingenic: Convert to use grp member
>   pinctrl: keembay: Convert to use grp member
>   pinctrl: mediatek: Convert to use grp member
>   pinctrl: renesas: Convert to use grp member
>   pinctrl: starfive: Convert to use grp member
>   pinctrl: core: Remove unused members from struct group_desc

I dropped these (because they all cross-depend...)

>   pinctrl: Convert unsigned to unsigned int

I kept this one.

Yours,
Linus Walleij
Andy Shevchenko Dec. 4, 2023, 2:49 p.m. UTC | #7
On Mon, Dec 04, 2023 at 03:38:43PM +0100, Linus Walleij wrote:
> Hi Andy,
> 
> due to compile errors on arm32 and arm64 I had to drop most of the
> patches again but I kept the preparatory patches so your
> patch stack don't need to be so deep.

Thank you!

...

> >   pinctrl: core: Make pins const unsigned int pointer in struct
> >     group_desc
> >   pinctrl: equilibrium: Convert to use struct pingroup
> >   pinctrl: keembay: Convert to use struct pingroup
> >   pinctrl: nuvoton: Convert to use struct pingroup and
> >     PINCTRL_PINGROUP()

Hmm... Why these to be dropped?

> >   pinctrl: core: Add a convenient define PINCTRL_GROUP_DESC()
> >   pinctrl: ingenic: Make use of PINCTRL_GROUP_DESC()
> >   pinctrl: mediatek: Make use of PINCTRL_GROUP_DESC()
> >   pinctrl: core: Embed struct pingroup into struct group_desc
> >   pinctrl: bcm: Convert to use grp member
> >   pinctrl: equilibrium: Convert to use grp member
> >   pinctrl: imx: Convert to use grp member
> >   pinctrl: ingenic: Convert to use grp member
> >   pinctrl: keembay: Convert to use grp member
> >   pinctrl: mediatek: Convert to use grp member
> >   pinctrl: renesas: Convert to use grp member
> >   pinctrl: starfive: Convert to use grp member
> >   pinctrl: core: Remove unused members from struct group_desc
> 
> I dropped these (because they all cross-depend...)
Linus Walleij Dec. 7, 2023, 9:50 a.m. UTC | #8
On Mon, Dec 4, 2023 at 3:49 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> On Mon, Dec 04, 2023 at 03:38:43PM +0100, Linus Walleij wrote:
> > Hi Andy,
> >
> > due to compile errors on arm32 and arm64 I had to drop most of the
> > patches again but I kept the preparatory patches so your
> > patch stack don't need to be so deep.
>
> Thank you!
>
> ...
>
> > >   pinctrl: core: Make pins const unsigned int pointer in struct
> > >     group_desc
> > >   pinctrl: equilibrium: Convert to use struct pingroup
> > >   pinctrl: keembay: Convert to use struct pingroup
> > >   pinctrl: nuvoton: Convert to use struct pingroup and
> > >     PINCTRL_PINGROUP()
>
> Hmm... Why these to be dropped?

I couldn't tell apart which ones could cross depend on the others,
simple as that...

Yours,
Linus Walleij
Andy Shevchenko Dec. 7, 2023, 1:14 p.m. UTC | #9
On Thu, Dec 07, 2023 at 10:50:29AM +0100, Linus Walleij wrote:
> On Mon, Dec 4, 2023 at 3:49 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Mon, Dec 04, 2023 at 03:38:43PM +0100, Linus Walleij wrote:

...

> > > >   pinctrl: core: Make pins const unsigned int pointer in struct
> > > >     group_desc
> > > >   pinctrl: equilibrium: Convert to use struct pingroup
> > > >   pinctrl: keembay: Convert to use struct pingroup
> > > >   pinctrl: nuvoton: Convert to use struct pingroup and
> > > >     PINCTRL_PINGROUP()
> >
> > Hmm... Why these to be dropped?
> 
> I couldn't tell apart which ones could cross depend on the others,
> simple as that...

No problem as I have noticed a warning which had been fixed in a separate
series I sent earlier and which you already applied today. Thanks!