From: Hans de Goede <hdegoede@redhat.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH 1/2] ACPI: scan: Move acpi_scan_dep_init() higher up in scan.c
Date: Mon, 29 Mar 2021 16:29:58 +0200 [thread overview]
Message-ID: <48fddb93-2bfd-8433-b0bc-e53c781dd986@redhat.com> (raw)
In-Reply-To: <CAJZ5v0inp8KejTtRnK0oOy2n+Ugsf99A7Ohj915JxhcTCN6vPg@mail.gmail.com>
Hi,
On 3/29/21 2:52 PM, Rafael J. Wysocki wrote:
> On Sun, Mar 28, 2021 at 1:20 PM Hans de Goede <hdegoede@redhat.com> wrote:
>>
>> Move acpi_scan_dep_init() higher up in scan.c to avoid needing a forward
>> declaration in the next patch in this set.
>>
>> Fixes: 71da201f38df ("ACPI: scan: Defer enumeration of devices with _DEP lists")
>
> Well, this doesn't seem applicable here, as the patch shouldn't make a
> practical difference.
Its a pre-req for the actual fix, hence the fixes tag so that it will get
cherry-pick into the same stable-series as the actual fix (assuming the
actual fix gets merged as is).
Regards,
Hans
>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>> drivers/acpi/scan.c | 28 ++++++++++++++--------------
>> 1 file changed, 14 insertions(+), 14 deletions(-)
>>
>> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
>> index 1584c9e463bd..19f8fd6ea17a 100644
>> --- a/drivers/acpi/scan.c
>> +++ b/drivers/acpi/scan.c
>> @@ -1655,6 +1655,20 @@ void acpi_device_add_finalize(struct acpi_device *device)
>> kobject_uevent(&device->dev.kobj, KOBJ_ADD);
>> }
>>
>> +static void acpi_scan_dep_init(struct acpi_device *adev)
>> +{
>> + struct acpi_dep_data *dep;
>> +
>> + mutex_lock(&acpi_dep_list_lock);
>> +
>> + list_for_each_entry(dep, &acpi_dep_list, node) {
>> + if (dep->consumer == adev->handle)
>> + adev->dep_unmet++;
>> + }
>> +
>> + mutex_unlock(&acpi_dep_list_lock);
>> +}
>> +
>> static int acpi_add_single_object(struct acpi_device **child,
>> acpi_handle handle, int type,
>> unsigned long long sta)
>> @@ -1906,20 +1920,6 @@ static u32 acpi_scan_check_dep(acpi_handle handle)
>> return count;
>> }
>>
>> -static void acpi_scan_dep_init(struct acpi_device *adev)
>> -{
>> - struct acpi_dep_data *dep;
>> -
>> - mutex_lock(&acpi_dep_list_lock);
>> -
>> - list_for_each_entry(dep, &acpi_dep_list, node) {
>> - if (dep->consumer == adev->handle)
>> - adev->dep_unmet++;
>> - }
>> -
>> - mutex_unlock(&acpi_dep_list_lock);
>> -}
>> -
>> static bool acpi_bus_scan_second_pass;
>>
>> static acpi_status acpi_bus_check_add(acpi_handle handle, bool check_dep,
>> --
>> 2.30.2
>>
>
prev parent reply other threads:[~2021-03-29 14:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-28 11:19 [PATCH 1/2] ACPI: scan: Move acpi_scan_dep_init() higher up in scan.c Hans de Goede
2021-03-28 11:20 ` [PATCH 2/2] ACPI: scan: Fix _STA getting called on devices with unmet dependencies Hans de Goede
2021-03-29 13:39 ` Rafael J. Wysocki
2021-03-29 14:45 ` Hans de Goede
2021-03-29 14:56 ` Rafael J. Wysocki
2021-03-29 12:52 ` [PATCH 1/2] ACPI: scan: Move acpi_scan_dep_init() higher up in scan.c Rafael J. Wysocki
2021-03-29 14:29 ` Hans de Goede [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=48fddb93-2bfd-8433-b0bc-e53c781dd986@redhat.com \
--to=hdegoede@redhat.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rafael@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