From: Kelsey Skunberg <skunberg.kelsey@gmail.com>
To: rjw@rjwysocki.net, lenb@kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: skhan@linuxfoundation.org,
linux-kernel-mentees@lists.linuxfoundation.org,
bjorn@helgaas.com, skunberg.kelsey@gmail.com
Subject: [PATCH 2/3] ACPI: Remove acpi_has_method() call from scan.c
Date: Sun, 21 Jul 2019 20:35:29 -0600 [thread overview]
Message-ID: <20190722023530.67676-3-skunberg.kelsey@gmail.com> (raw)
In-Reply-To: <20190722023530.67676-1-skunberg.kelsey@gmail.com>
acpi_evaluate_reference() will return an error if the DEP method
does not exist. Checking if the DEP method exists before the
acpi_evaluate_reference() call is not needed. Remove acpi_has_method()
call to avoid additional work.
Signed-off-by: Kelsey Skunberg <skunberg.kelsey@gmail.com>
---
drivers/acpi/scan.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 0e28270b0fd8..4f2b0b481cee 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1803,9 +1803,6 @@ static void acpi_device_dep_initialize(struct acpi_device *adev)
adev->dep_unmet = 0;
- if (!acpi_has_method(adev->handle, "_DEP"))
- return;
-
status = acpi_evaluate_reference(adev->handle, "_DEP", NULL,
&dep_devices);
if (ACPI_FAILURE(status)) {
--
2.20.1
next prev parent reply other threads:[~2019-07-22 2:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 2:35 [PATCH 0/3] ACPI: Remove unnecessary acpi_has_method() calls Kelsey Skunberg
2019-07-22 2:35 ` [PATCH 1/3] ACPI: Remove acpi_has_method() call from acpi_adxl.c Kelsey Skunberg
2019-07-22 8:31 ` Rafael J. Wysocki
2019-07-22 18:29 ` Bjorn Helgaas
2019-09-02 21:08 ` Rafael J. Wysocki
2019-09-05 4:11 ` Kelsey Skunberg
2019-07-22 2:35 ` Kelsey Skunberg [this message]
2019-07-22 8:29 ` [PATCH 2/3] ACPI: Remove acpi_has_method() call from scan.c Rafael J. Wysocki
2019-07-22 2:35 ` [PATCH 3/3] ACPI: Remove acpi_has_method() calls from thermal.c Kelsey Skunberg
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=20190722023530.67676-3-skunberg.kelsey@gmail.com \
--to=skunberg.kelsey@gmail.com \
--cc=bjorn@helgaas.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=skhan@linuxfoundation.org \
/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).