mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zijun Hu <zijun_hu@icloud.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	"Rob Herring (Arm)" <robh@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Saravana Kannan <saravanak@google.com>,
	Len Brown <lenb@kernel.org>, Daniel Scally <djrscally@gmail.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	linux-acpi@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, Zijun Hu <quic_zijuhu@quicinc.com>
Subject: Re: [PATCH v3] of: property: Increase NR_FWNODE_REFERENCE_ARGS
Date: Tue, 11 Feb 2025 21:40:33 +0800	[thread overview]
Message-ID: <a682824a-1b65-4b05-9e42-3edc167600a8@icloud.com> (raw)
In-Reply-To: <Z6tBlfmTFu9916LA@smile.fi.intel.com>

On 2025/2/11 20:24, Andy Shevchenko wrote:
>>>> -#define NR_FWNODE_REFERENCE_ARGS	8
>>>> +#define NR_FWNODE_REFERENCE_ARGS	16
>>> Thinking of the case, perhaps you also want
>>>
>>> static_assert(NR_FWNODE_REFERENCE_ARGS == MAX_PHANDLE_ARGS);
>>>
>>> to be put somewhere, but I don't think we can do it in this header file.
>> thank you Andy for code review.
>>
>> yes. it seems there are good location to place the static_assert().
>>
>> is it okay to associate two macros by
>> #define MAX_PHANDLE_ARGS NR_FWNODE_REFERENCE_ARGS
> I was thinking about this and I don't see how it can be done without
> introducing more chaos (dependency hell) into the headers. So, I won't
> take this path or even consider it deeper.
> 

i have confirmed that:

of.h includes fwnode.h indirectly
fwnode.h does not include of.h directly or indirectly

in theory, dependency between both headers should also be like this.

So, it is simple to use below define in of.h
#define MAX_PHANDLE_ARGS NR_FWNODE_REFERENCE_ARGS

>> OR
>> replace all MAX_PHANDLE_ARGS instances with NR_FWNODE_REFERENCE_ARGS
>> ?
> This sounds plausible to me, but you need a blessing from OF people as
> the naming may be a bit confusing (for them) as "phandle" is well established
> term in OF realm.

phandle is a type of DT firmware node reference. so this solution
seems suitable as well.

struct software_node_ref_args also uses NR_FWNODE_REFERENCE_ARGS directly.

let us wait for more comments.


  reply	other threads:[~2025-02-11 13:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10 15:00 Zijun Hu
2025-02-10 15:34 ` Andy Shevchenko
2025-02-11 12:20   ` Zijun Hu
2025-02-11 12:24     ` Andy Shevchenko
2025-02-11 13:40       ` Zijun Hu [this message]
2025-02-11 14:22         ` Rob Herring
2025-02-11 14:57           ` Zijun Hu

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=a682824a-1b65-4b05-9e42-3edc167600a8@icloud.com \
    --to=zijun_hu@icloud.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=djrscally@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_zijuhu@quicinc.com \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=saravanak@google.com \
    /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

all inboxes | Powered by JetHome®