All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rob Herring (Arm)" <robh@kernel.org>
To: Liya Huang <1425075683@qq.com>
Cc: linux-kernel@vger.kernel.org,
	Saravana Kannan <saravanak@google.com>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH] of: Build warn for missing fn() in _OF_DECLARE
Date: Tue, 22 Apr 2025 07:48:47 -0500	[thread overview]
Message-ID: <174532612584.951202.6817146163427433712.robh@kernel.org> (raw)
In-Reply-To: <tencent_BA80A2305727877DEE7BE20655D9CA825B09@qq.com>


On Thu, 17 Apr 2025 21:23:38 +0800, Liya Huang wrote:
> The function pointer fn() in _OF_DECLARE macro might be NULL. For example,
> in __reserved_mem_init_node(), only non-NULL cases are handled, and NULL
> function pointers are ignored.
> 
> This patch introduces a check to handle cases where fn() is NULL. If fn()
> is found to be NULL, a warning is issued during compilation to notify
> developers about the missing function pointer.
> 
> ---
> The function pointer fn() in _OF_DECLARE macro might be NULL. For example,
> in __reserved_mem_init_node(), only non-NULL cases are handled, and NULL
> function pointers are ignored.
> 
> This patch introduces a check to handle cases where fn() is NULL. If fn()
> is found to be NULL, a warning is issued during compilation to notify
> developers about the missing function pointer.
> 
> Link: https://lore.kernel.org/all/CAL_JsqK733Q9bbxC0Wz5uxyZ9m7bs+bci5kUJF9GJMv73-dO4w@mail.gmail.com/
> 
> Signed-off-by: Liya Huang <1425075683@qq.com>
> ---
>  include/linux/of.h | 2 ++
>  1 file changed, 2 insertions(+)
> 

Applied, thanks!


  reply	other threads:[~2025-04-22 12:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-17 13:23 [PATCH] of: Build warn for missing fn() in _OF_DECLARE Liya Huang
2025-04-22 12:48 ` Rob Herring (Arm) [this message]
2025-04-23 12:18 ` Robin Murphy
2025-04-23 14:48   ` 1425075683
2025-04-23 22:10   ` 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=174532612584.951202.6817146163427433712.robh@kernel.org \
    --to=robh@kernel.org \
    --cc=1425075683@qq.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.