All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: Alison Schofield <alison.schofield@intel.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
	Dave Jiang <dave.jiang@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <ira.weiny@intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	<linux-cxl@vger.kernel.org>
Subject: Re: [PATCH v2 4/4] cxl/region: Add inject and clear poison by region offset
Date: Tue, 15 Jul 2025 16:20:42 +0100	[thread overview]
Message-ID: <20250715162042.0000545e@huawei.com> (raw)
In-Reply-To: <aHHnWgKx3YBx__8H@aschofie-mobl2.lan>

> > > +
> > > +	rc = region_offset_to_dpa_result(cxlr, offset, &result);
> > > +	if (rc || !result.cxlmd || result.dpa == ULLONG_MAX) {
> > > +		dev_dbg(&cxlr->dev,
> > > +			"Failed to resolve DPA for region offset %#llx\n",
> > > +			offset);
> > > +
> > > +		return -EINVAL;  
> > 
> > If rc was set, preferable to return that. I'd split the condition
> > into two parts to avoid this.  
> 
> I want to dev_dbg() regardless, so how about adding the rc to dev_dbg()
> and returning like this:
> 
>         rc = region_offset_to_dpa_result(cxlr, offset, &result);
>         if (rc || !result.cxlmd || result.dpa == ULLONG_MAX) {
>                 dev_dbg(&cxlr->dev,
> -                       "Failed to resolve DPA for region offset %#llx\n",
> -                       offset);
> +                       "Failed to resolve DPA for region offset %#llx rc %d\n",
> +                       offset, rc);
>  
> -               return -EINVAL;
> +               return rc ? rc : -EINVAL;
>         }
> 
LGTM

      reply	other threads:[~2025-07-15 15:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-03  4:03 [PATCH v2 0/4] cxl: Support Poison Inject & Clear by Region Offset alison.schofield
2025-07-03  4:03 ` [PATCH v2 1/4] cxl: Define a SPA->CXL HPA root decoder callback for XOR Math alison.schofield
2025-07-03 13:43   ` Jonathan Cameron
2025-07-03  4:03 ` [PATCH v2 2/4] cxl/region: Introduce SPA to DPA address translation alison.schofield
2025-07-03 14:23   ` Jonathan Cameron
2025-07-12  4:17     ` Alison Schofield
2025-07-03  4:03 ` [PATCH v2 3/4] cxl/core: Add locked variants of the poison inject and clear funcs alison.schofield
2025-07-03 14:25   ` Jonathan Cameron
2025-07-12  4:23     ` Alison Schofield
2025-07-03  4:03 ` [PATCH v2 4/4] cxl/region: Add inject and clear poison by region offset alison.schofield
2025-07-03 14:31   ` Jonathan Cameron
2025-07-12  4:40     ` Alison Schofield
2025-07-15 15:20       ` Jonathan Cameron [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=20250715162042.0000545e@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=ira.weiny@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --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 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.