From: Alison Schofield <alison.schofield@intel.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: <hemanth.selam@gmail.com>, Dan Williams <djbw@kernel.org>,
Vishal Verma <vishal.l.verma@intel.com>,
Dave Jiang <dave.jiang@intel.com>, Ira Weiny <iweiny@kernel.org>,
<linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>,
<nvdimm@lists.linux.dev>
Subject: Re: [PATCH v2] nvdimm/pmem: Propagate devm_init_badblocks() error code
Date: Wed, 2 Dec 2026 17:34:07 -0800 [thread overview]
Message-ID: <axDHDxBT6e8Lqm_H@aschofie-mobl2.lan> (raw)
In-Reply-To: <a24a19c429dd734c83c563f9b3c5fb5514cd7de0.1792784093.git.christophe.jaillet@wanadoo.fr>
On Fri, Oct 23, 2026 at 09:35:40PM +0200, Christophe JAILLET wrote:
> Propagate errors from devm_init_badblocks() instead of hard-coding a
> -ENOMEM.
>
> This change is a no-op. The sanity check in devm_init_badblocks() can't
> fail, so -EINVAL can't be returned. And __badblocks_init() can only return
> 0 or -ENOMEM.
>
> However, propagating the error code is cleaner and more future proof.
Thanks, Christophe. I’m taking the patch with a small commit message edit.
I dropped “cleaner and more future proof” because the cleanup is straight-
forward to describe: pmem_attach_disk() can use the helper’s return value
directly. -ENOMEM is still the only error this call can return today.
Applied to libnvdimm-for-next:
https://git.kernel.org/nvdimm/nvdimm/c/3860f1f60537
prev parent reply other threads:[~2026-12-03 1:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 19:35 Christophe JAILLET
2026-12-03 1:34 ` Alison Schofield [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=axDHDxBT6e8Lqm_H@aschofie-mobl2.lan \
--to=alison.schofield@intel.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dave.jiang@intel.com \
--cc=djbw@kernel.org \
--cc=hemanth.selam@gmail.com \
--cc=iweiny@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
--cc=vishal.l.verma@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®