From: Dan Williams <dan.j.williams@intel.com>
To: "Wilczynski, Michal" <michal.wilczynski@intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
<nvdimm@lists.linux.dev>, <linux-acpi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Cc: Dan Williams <dan.j.williams@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>
Subject: Re: [PATCH v1 1/1] ACPI: NFIT: Switch to use acpi_evaluate_dsm_typed()
Date: Thu, 19 Oct 2023 18:02:06 -0700 [thread overview]
Message-ID: <6531d18eb13c4_7258329435@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <ec5029b0-553c-4a6c-b2a9-ef9943e553dc@intel.com>
Wilczynski, Michal wrote:
>
>
> On 10/2/2023 3:54 PM, Andy Shevchenko wrote:
> > The acpi_evaluate_dsm_typed() provides a way to check the type of the
> > object evaluated by _DSM call. Use it instead of open coded variant.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> > drivers/acpi/nfit/core.c | 5 ++---
> > 1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
> > index f96bf32cd368..280da408c02c 100644
> > --- a/drivers/acpi/nfit/core.c
> > +++ b/drivers/acpi/nfit/core.c
> > @@ -1737,9 +1737,8 @@ __weak void nfit_intel_shutdown_status(struct nfit_mem *nfit_mem)
> > if ((nfit_mem->dsm_mask & (1 << func)) == 0)
> > return;
> >
> > - out_obj = acpi_evaluate_dsm(handle, guid, revid, func, &in_obj);
> > - if (!out_obj || out_obj->type != ACPI_TYPE_BUFFER
> > - || out_obj->buffer.length < sizeof(smart)) {
> > + out_obj = acpi_evaluate_dsm_typed(handle, guid, revid, func, &in_obj, ACPI_TYPE_BUFFER);
>
> This line is 90 characters long, wouldn't it be better to split it ?
100 characters is allowed these days.
> > + if (!out_obj || out_obj->buffer.length < sizeof(smart)) {
> > dev_dbg(dev->parent, "%s: failed to retrieve initial health\n",
> > dev_name(dev));
>
> While at it maybe fix alignment ? :-)
Life is too short to fiddle with indentation. For old code leave it
alone, for new code just use clang-format.
next prev parent reply other threads:[~2023-10-20 1:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-02 13:54 Andy Shevchenko
2023-10-02 15:46 ` Dave Jiang
2023-10-02 20:27 ` Wilczynski, Michal
2023-10-03 8:48 ` Andy Shevchenko
2023-10-20 1:02 ` Dan Williams [this message]
2023-10-19 15:36 ` Andy Shevchenko
2023-10-20 1:03 ` Dan Williams
2023-11-20 15:03 ` Andy Shevchenko
2023-11-20 15:11 ` Rafael J. Wysocki
[not found] ` <ZVuVMNlfumQ4p6oM@smile.fi.intel.com>
2024-02-02 15:49 ` Andy Shevchenko
2024-02-02 16:33 ` Rafael J. Wysocki
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=6531d18eb13c4_7258329435@dwillia2-xfh.jf.intel.com.notmuch \
--to=dan.j.williams@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dave.jiang@intel.com \
--cc=ira.weiny@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.wilczynski@intel.com \
--cc=nvdimm@lists.linux.dev \
--cc=rafael@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 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®