From: Dinh Nguyen <dinguyen@kernel.org>
To: Rounak Das <rounakdas2025@gmail.com>, Borislav Petkov <bp@alien8.de>
Cc: Tony Luck <tony.luck@intel.com>,
linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] EDAC/altera: Refactor exit paths in altr_portb_setup()
Date: Fri, 2 Oct 2026 16:40:55 -0500 [thread overview]
Message-ID: <7b0146ca-956a-4075-8577-10c96f881fe5@kernel.org> (raw)
In-Reply-To: <20261001171556.57548-1-rounakdas2025@gmail.com>
On 10/1/26 12:15, Rounak Das wrote:
> altr_portb_setup() has a single caller, socfpga_init_sdmmc_ecc(), which
> looks up the same SDMMC ECC node and holds a reference to it across the
> call. Pass that node in instead of looking it up a second time. This makes
> altr_portb_setup() lose its lookup and its of_node_put() calls. The caller
> drops its reference at every path.
>
> Convert the remaining unwinding to one goto label per resource. Each
> exit path undid its own acquisitions by hand, so commit 7d5a36a5490d
> ("EDAC/altera: Fix device node reference leaks in the SDMMC ECC setup")
> had to add the same of_node_put() calls to four of them.
>
> While at it, replace the two comments on the PortB IRQ index with one
> that describes the interrupt layout, and select the index with a
> ternary.
>
> A devres_open_group() failure now also prints the common error
> message. No other functional change intended.
>
> Suggested-by: Borislav Petkov (AMD) <bp@alien8.de>
> Link: https://lore.kernel.org/all/20260926185955.GAargWKzpAwXXC4CQW@fat_crate.local/
> Signed-off-by: Rounak Das <rounakdas2025@gmail.com>
> ---
> drivers/edac/altera_edac.c | 45 ++++++++++++++------------------------
> 1 file changed, 16 insertions(+), 29 deletions(-)
>
Very nice, this looks good to me!
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
prev parent reply other threads:[~2026-10-02 21:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 17:15 Rounak Das
2026-10-02 21:40 ` Dinh Nguyen [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=7b0146ca-956a-4075-8577-10c96f881fe5@kernel.org \
--to=dinguyen@kernel.org \
--cc=bp@alien8.de \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rounakdas2025@gmail.com \
--cc=tony.luck@intel.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®