All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Sang-Heon Jeon <ekffu200098@gmail.com>
Cc: Saravana Kannan <saravanak@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Dan Williams <djbw@kernel.org>,
	David Hildenbrand <david@kernel.org>,
	devicetree@vger.kernel.org,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	"Mike Rapoport (Microsoft)" <rppt@kernel.org>
Subject: Re: [PATCH] of_numa: fix return -EINVAL when numa-node-id is not found in last node
Date: Mon, 22 Jun 2026 20:42:46 -0500	[thread overview]
Message-ID: <20260623014246.GA3897146-robh@kernel.org> (raw)
In-Reply-To: <20260621143919.4176646-1-ekffu200098@gmail.com>

On Sun, Jun 21, 2026 at 11:39:18PM +0900, Sang-Heon Jeon wrote:
> When the numa-node-id property is not found in the last memory node,
> of_property_read_u32() returns -EINVAL, which then becomes the return
> value of of_numa_parse_memory_nodes(), even though earlier memory nodes
> were parsed successfully.
> 
> Commit 7e488677a54a ("of, numa: return -EINVAL when no numa-node-id is
> found") meant -EINVAL to be returned only when the numa-node-id property
> is not found at all, not when it is found in an earlier memory node but
> not in the last.
> 
> Check whether at least one memory node was parsed successfully, and return
> 0 in that case, -EINVAL otherwise, so the return value of
> of_property_read_u32() for the last memory node no longer corrupts the
> overall return value.

IDK, it's arguable that an incomplete DT isn't valid and something we 
need to support. Is missing numa-node-id valid or it's just better to 
have at least partially 
configured NUMA nodes?

Rob

      reply	other threads:[~2026-06-23  1:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-21 14:39 [PATCH] of_numa: fix return -EINVAL when numa-node-id is not found in last node Sang-Heon Jeon
2026-06-23  1:42 ` Rob Herring [this message]

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=20260623014246.GA3897146-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=djbw@kernel.org \
    --cc=ekffu200098@gmail.com \
    --cc=rppt@kernel.org \
    --cc=saravanak@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 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.