Linux CXL
 help / color / mirror / Atom feed
From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "Jonathan.Cameron@Huawei.com" <Jonathan.Cameron@Huawei.com>
Cc: "Jiang, Dave" <dave.jiang@intel.com>,
	"Schofield, Alison" <alison.schofield@intel.com>,
	"linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Williams, Dan J" <dan.j.williams@intel.com>,
	"Weight, Russell H" <russell.h.weight@intel.com>,
	"bwidawsk@kernel.org" <bwidawsk@kernel.org>,
	"Weiny, Ira" <ira.weiny@intel.com>,
	"dave@stgolabs.net" <dave@stgolabs.net>
Subject: Re: [PATCH v2 1/4] cxl: add a firmware update mechanism using the sysfs firmware loader
Date: Thu, 8 Jun 2023 20:26:43 +0000	[thread overview]
Message-ID: <298ed811de7148da70609ac2c6ef81f025690620.camel@intel.com> (raw)
In-Reply-To: <6666972e336a6749f24ce3aab7dddad63a796974.camel@intel.com>

On Thu, 2023-06-08 at 20:15 +0000, Verma, Vishal L wrote:
> 
> > > +
> > > +       fwl = firmware_upload_register(THIS_MODULE, &cxlmd->dev,
> > > +                                      dev_name(&cxlmd->dev),
> > > +                                      &cxl_memdev_fw_ops, cxlds);
> > > +       if (IS_ERR(fwl)) {
> > > +               dev_err(&cxlmd->dev, "Failed to register firmware loader\n");
> > > +               return PTR_ERR(fwl);
> > 
> > It's called from probe only so could use dev_err_probe() for slight
> > simplification.
> 
> From what I can tell, this ends up looking like:
> 
>         fwl = firmware_upload_register(THIS_MODULE, dev, dev_name(dev),
>                                        &cxl_memdev_fw_ops, cxlds);
>         rc = dev_err_probe(dev, PTR_ERR(fwl),
>                            "Failed to register firmware loader\n");
>         if (rc)
>                 return rc;
> 
> Is that what you meant? Happy to make the change if so.
> 
> 
Actually I can't drop the IS_ERR() check - so unless I'm missing
something, this doesn't look like much of a simplification:


	if (IS_ERR(fwl)) {
		rc = dev_err_probe(dev, PTR_ERR(fwl),
				   "Failed to register firmware loader\n");
		if (rc)
			return rc;
	}


  reply	other threads:[~2023-06-08 20:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-05 20:20 [PATCH v2 0/4] cxl: Add a firmware update mechanism and cxl_test emulation Vishal Verma
2023-06-05 20:20 ` [PATCH v2 1/4] cxl: add a firmware update mechanism using the sysfs firmware loader Vishal Verma
2023-06-08 14:49   ` Jonathan Cameron
2023-06-08 20:15     ` Verma, Vishal L
2023-06-08 20:26       ` Verma, Vishal L [this message]
2023-06-09 11:08         ` Jonathan Cameron
2023-06-09 11:06       ` Jonathan Cameron
2023-06-05 20:20 ` [PATCH v2 2/4] tools/testing/cxl: Fix command effects for inject/clear poison Vishal Verma
2023-06-07 19:18   ` Alison Schofield
2023-06-08 11:01     ` Jonathan Cameron
2023-06-05 20:20 ` [PATCH v2 3/4] tools/testing/cxl: Use named effects for the Command Effect Log Vishal Verma
2023-06-07 19:19   ` Alison Schofield
2023-06-08 13:31   ` Jonathan Cameron
2023-06-05 20:20 ` [PATCH v2 4/4] tools/testing/cxl: add firmware update emulation to CXL memdevs Vishal Verma
2023-06-08 14:54   ` Jonathan Cameron

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=298ed811de7148da70609ac2c6ef81f025690620.camel@intel.com \
    --to=vishal.l.verma@intel.com \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=alison.schofield@intel.com \
    --cc=bwidawsk@kernel.org \
    --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=linux-kernel@vger.kernel.org \
    --cc=russell.h.weight@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