All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Wandun <chenwandun1@gmail.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	zhaomeijing@lixiang.com, saravanak@kernel.org
Subject: Re: [PATCH v2 1/3] of: reserved_mem: avoid unnecessary memory allocation when __reserved_mem_check_root() fails
Date: Mon, 1 Jun 2026 18:06:49 -0500	[thread overview]
Message-ID: <20260601230649.GA154030-robh@kernel.org> (raw)
In-Reply-To: <0dd4546a-6133-4493-a911-41c35ec42c15@gmail.com>

On Wed, May 20, 2026 at 04:16:23PM +0800, Wandun wrote:
> 
> 
> On 5/20/26 15:44, Krzysztof Kozlowski wrote:
> > On Tue, May 19, 2026 at 04:24:25PM +0800, Wandun Chen wrote:
> > > total_reserved_mem_cnt will keep the init value (MAX_RESERVED_REGIONS)
> > > in fdt_scan_reserved_mem() if __reserved_mem_check_root() fails.
> > > 
> > > fdt_scan_reserved_mem_late() calls alloc_reserved_mem_array() to
> > > allocate memory according to total_reserved_mem_cnt before
> > > __reserved_mem_check_root(), so if __reserved_mem_check_root() fails,
> > > the allocated array has nowhere to be used, so no need to allocate
> > > memory.
> > > 
> > > Move alloc_reserved_mem_array() after __reserved_mem_check_root() to
> > > avoid potential memory waste.
> > > 
> > > Signed-off-by: Wandun Chen <chenwandun@lixiang.com>
> > Authorship/DCO mismatch.
> Hi Krzysztof,
> 
> Thanks for your review.
> Sorry for the mismatch. Dueto my company email server's issues with
> community mailing lists, I sent the patch via my personal email.
> I will add the correct 'From:' header and send a v3 patch shortly.

There is also the 'b4 relay' that can be used for this kind of issue.

Rob

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

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19  8:24 [PATCH v2 0/3] of: reserved_mem: fixes and cleanups Wandun Chen
2026-05-19  8:24 ` [PATCH v2 1/3] of: reserved_mem: avoid unnecessary memory allocation when __reserved_mem_check_root() fails Wandun Chen
2026-05-19  8:46   ` sashiko-bot
2026-05-20  7:44   ` Krzysztof Kozlowski
2026-05-20  8:16     ` Wandun
2026-06-01 23:06       ` Rob Herring [this message]
2026-06-02  1:37         ` Wandun
2026-05-19  8:24 ` [PATCH v2 2/3] of: reserved_mem: clean up redundant alloc_reserved_mem_array() call Wandun Chen
2026-05-19  9:09   ` sashiko-bot
2026-05-19  8:24 ` [PATCH v2 3/3] of: reserved_mem: only support one <base size> entry in reg property Wandun Chen
2026-05-19  9:24   ` sashiko-bot
2026-05-22  7:13     ` Wandun

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=20260601230649.GA154030-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=chenwandun1@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=saravanak@kernel.org \
    --cc=zhaomeijing@lixiang.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.