mbox series

[0/3] of: base: of_parse_phandle() fixes and new variant

Message ID 20220113085208.2636517-1-michael@walle.cc
Headers show
Series of: base: of_parse_phandle() fixes and new variant | expand

Message

Michael Walle Jan. 13, 2022, 8:52 a.m. UTC
This series is a result of the discussion in [1]. Rob suggested to convert
the index parameter to unsigned int and drop the check for negative values
and make them static inline.

It will also introduce a new variant of the function, although it is unused
for now. They will be needed when nvmem phandles are modified to take
additional arguments and need to retain backwards compatibility with older
device trees.

[1] https://lore.kernel.org/linux-devicetree/20211228142549.1275412-1-michael@walle.cc/

Michael Walle (3):
  of: base: convert index to unsigned for of_parse_phandle()
  of: property: use unsigned index for of_link_property()
  of: base: add of_parse_phandle_with_optional_args()

 drivers/of/base.c     | 137 +++-----------------------------
 drivers/of/property.c |  27 ++++---
 include/linux/of.h    | 176 ++++++++++++++++++++++++++++++++++++++----
 3 files changed, 189 insertions(+), 151 deletions(-)

Comments

Michael Walle Jan. 13, 2022, 12:22 p.m. UTC | #1
Am 2022-01-13 09:52, schrieb Michael Walle:
> This series is a result of the discussion in [1]. Rob suggested to 
> convert
> the index parameter to unsigned int and drop the check for negative 
> values
> and make them static inline.

Oh I haven't thought this through.. If this is going via another tree 
than
the nvmem patches, then I'd need either wait one kernel release, or 
there
need to be an immutable tag, right?

-michael
Rob Herring Jan. 14, 2022, 2:30 a.m. UTC | #2
On Thu, Jan 13, 2022 at 6:22 AM Michael Walle <michael@walle.cc> wrote:
>
> Am 2022-01-13 09:52, schrieb Michael Walle:
> > This series is a result of the discussion in [1]. Rob suggested to
> > convert
> > the index parameter to unsigned int and drop the check for negative
> > values
> > and make them static inline.
>
> Oh I haven't thought this through.. If this is going via another tree
> than
> the nvmem patches, then I'd need either wait one kernel release, or
> there
> need to be an immutable tag, right?

I can pick this up for 5.17-rc1 if we can get it sorted soon.

Rob