linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: joeyli <jlee@suse.com>
Cc: "Lee, Chun-Yi" <joeyli.kernel@gmail.com>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Len Brown <lenb@kernel.org>
Subject: Re: [PATCH] acpi: handle the acpi hotplug schedule error
Date: Wed, 7 Jun 2017 13:46:37 +0300	[thread overview]
Message-ID: <CAHp75VcBG-gHEOPkPBHMXzpY7G3hJxtXKKAjPesjBHVW-gx6qA@mail.gmail.com> (raw)
In-Reply-To: <20170607101832.GW30622@linux-l9pv.suse>

On Wed, Jun 7, 2017 at 1:18 PM, joeyli <jlee@suse.com> wrote:
> On Wed, Jun 07, 2017 at 11:36:55AM +0300, Andy Shevchenko wrote:
>> On Wed, Jun 7, 2017 at 9:05 AM, Lee, Chun-Yi <joeyli.kernel@gmail.com> wrote:
>> > Kernel should decrements the reference count of acpi device
>> > when scheduling acpi hotplug work is failed, and also evaluates
>> > _OST to notify BIOS the failure.

> So, do you mean like this?

Yes, see below.

>
>         -       if (hotplug_event && ACPI_SUCCESS(acpi_hotplug_schedule(adev, type)))
>         -               return;
>         +       if (hotplug_event) {

>         +               if (ACPI_SUCCESS(acpi_hotplug_schedule(adev, type)))
>         +                       return;

>         +               else

It's redundant...

>         +                       goto err_put_device;

...perhaps

         if (ACPI_FAILURE(acpi_hotplug_schedule(adev, type)))
                 goto err_put_device;
         return;


>         +       }

>
>                 acpi_bus_put_acpi_device(adev);
>                 return;
>
>         +err_put_device:
>         +       acpi_bus_put_acpi_device(adev);
>          err:
>                 acpi_evaluate_ost(handle, type, ost_code, NULL);
>         }


-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2017-06-07 10:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-07  6:05 [PATCH] acpi: handle the acpi hotplug schedule error Lee, Chun-Yi
2017-06-07  8:36 ` Andy Shevchenko
2017-06-07 10:18   ` joeyli
2017-06-07 10:46     ` Andy Shevchenko [this message]
2017-06-07 15:39       ` joeyli
2017-06-07 16:55         ` Andy Shevchenko
  -- strict thread matches above, loose matches on Subject: below --
2017-06-03  7:38 Lee, Chun-Yi

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=CAHp75VcBG-gHEOPkPBHMXzpY7G3hJxtXKKAjPesjBHVW-gx6qA@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=jlee@suse.com \
    --cc=joeyli.kernel@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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;
as well as URLs for NNTP newsgroup(s).