devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	Michael Walle <michael@walle.cc>
Subject: [PATCH 0/3] of: base: of_parse_phandle() fixes and new variant
Date: Thu, 13 Jan 2022 09:52:05 +0100	[thread overview]
Message-ID: <20220113085208.2636517-1-michael@walle.cc> (raw)

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(-)

-- 
2.30.2


             reply	other threads:[~2022-01-13  8:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13  8:52 Michael Walle [this message]
2022-01-13  8:52 ` [PATCH 1/3] of: base: convert index to unsigned for of_parse_phandle() Michael Walle
2022-01-14  2:29   ` Rob Herring
2022-01-13  8:52 ` [PATCH 2/3] of: property: use unsigned index for of_link_property() Michael Walle
2022-01-13  8:52 ` [PATCH 3/3] of: base: add of_parse_phandle_with_optional_args() Michael Walle
2022-01-13 12:22 ` [PATCH 0/3] of: base: of_parse_phandle() fixes and new variant Michael Walle
2022-01-14  2:30   ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220113085208.2636517-1-michael@walle.cc \
    --to=michael@walle.cc \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).