All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	"Shevchenko, Andriy" <andriy.shevchenko@intel.com>
Subject: Re: [PATCH v3 2/8] ACPI: property: Tie data nodes to acpi handles
Date: Fri, 27 May 2022 19:04:39 +0200	[thread overview]
Message-ID: <CAJZ5v0jM3rayEkAT21aReau+n-mZsNzVeQjH0wS5c1F+s5OgsQ@mail.gmail.com> (raw)
In-Reply-To: <YpCTjhncY4fhDjMq@paasikivi.fi.intel.com>

On Fri, May 27, 2022 at 11:02 AM Sakari Ailus
<sakari.ailus@linux.intel.com> wrote:
>
> Hi Rafael,
>
> On Thu, May 26, 2022 at 09:19:17PM +0200, Rafael J. Wysocki wrote:
> > > +static int acpi_tie_nondev_subnodes(struct acpi_device_data *data)
> > > +{
> > > +       struct acpi_data_node *dn;
> > > +
> > > +       list_for_each_entry(dn, &data->subnodes, sibling) {
> > > +               acpi_status status;
> > > +               int ret;
> > > +
> > > +               status = acpi_attach_data(dn->handle, acpi_nondev_subnode_tag, dn);
> > > +               if (ACPI_FAILURE(status)) {
> > > +                       acpi_handle_err(dn->handle, "Can't tag data node\n");
> > > +                       return 0;
> > > +               }
> > > +
> > > +               ret = acpi_tie_nondev_subnodes(&dn->data);
> > > +               if (ret)
> > > +                       return ret;
> >
> > Is it actually possible that this returns anything different from 0?
>
> acpi_attach_data() involves allocating memory and resolving a reference.
> Both can fail.

Yes, they can, but the value returned by acpi_attach_data() is
effectively ignored above (except for printing the error message,
which BTW could be "info" and provide more information).

I don't see how acpi_tie_nondev_subnodes() can produce a nonzero return value.

  reply	other threads:[~2022-05-27 17:04 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 13:01 [PATCH v3 0/8] ACPI: Buffer property and reference as string support Sakari Ailus
2022-05-25 13:01 ` [PATCH v3 1/8] ACPI: property: Return type of acpi_add_nondev_subnodes() should be bool Sakari Ailus
2022-05-25 17:15   ` Andy Shevchenko
2022-05-25 13:01 ` [PATCH v3 2/8] ACPI: property: Tie data nodes to acpi handles Sakari Ailus
2022-05-25 17:20   ` Andy Shevchenko
2022-05-27 14:35     ` Sakari Ailus
2022-05-26 19:19   ` Rafael J. Wysocki
2022-05-27  9:02     ` Sakari Ailus
2022-05-27 17:04       ` Rafael J. Wysocki [this message]
2022-05-27 20:59         ` Sakari Ailus
2022-05-28 13:56           ` Rafael J. Wysocki
2022-05-25 13:01 ` [PATCH v3 3/8] ACPI: property: Use acpi_object_type consistently in property ref parsing Sakari Ailus
2022-05-25 17:23   ` Andy Shevchenko
2022-05-25 13:01 ` [PATCH v3 4/8] ACPI: property: Move property ref argument parsing into a new function Sakari Ailus
2022-05-25 17:28   ` Andy Shevchenko
2022-05-27 14:37     ` Sakari Ailus
2022-05-25 13:01 ` [PATCH v3 5/8] ACPI: property: Switch node property referencing from ifs to a switch Sakari Ailus
2022-05-25 17:30   ` Andy Shevchenko
2022-05-25 13:01 ` [PATCH v3 6/8] ACPI: property: Unify integer value reading functions Sakari Ailus
2022-05-25 17:14   ` Andy Shevchenko
2022-05-27 15:12     ` Sakari Ailus
2022-05-25 13:01 ` [PATCH v3 7/8] ACPI: property: Add support for parsing buffer property UUID Sakari Ailus
2022-05-25 17:44   ` Andy Shevchenko
2022-05-27 12:43     ` Sakari Ailus
2022-05-25 13:01 ` [PATCH v3 8/8] ACPI: property: Read buffer properties as integers Sakari Ailus
2022-05-25 17:36   ` Andy Shevchenko
2022-05-27 10:01     ` Sakari Ailus
2022-06-09 18:38 ` [PATCH v3 0/8] ACPI: Buffer property and reference as string support 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=CAJZ5v0jM3rayEkAT21aReau+n-mZsNzVeQjH0wS5c1F+s5OgsQ@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=sakari.ailus@linux.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.