From: Hanjun Guo <guohanjun@huawei.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: <linux-acpi@vger.kernel.org>, <lkp@intel.com>,
Ken Xue <Ken.Xue@amd.com>, Hanjun Guo <guohanjun@huawei.com>
Subject: [PATCH v2 4/5] ACPI / APD: Remove the unneeded APD_ADDR(desc) macro define
Date: Mon, 7 Sep 2020 20:57:32 +0800 [thread overview]
Message-ID: <1599483453-26635-5-git-send-email-guohanjun@huawei.com> (raw)
In-Reply-To: <1599483453-26635-1-git-send-email-guohanjun@huawei.com>
Since APD_ADDR(desc) is only used when CONFIG_X86_AMD_PLATFORM_DEVICE or
CONFIG_ARM64 is set, no need for the redundant
'#define APD_ADDR(desc) (0UL)', remove it.
Also update the comments for #endif.
Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
---
drivers/acpi/acpi_apd.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index 4dbf85b..561d9ba 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -62,7 +62,6 @@ static int acpi_apd_setup(struct apd_private_data *pdata)
}
#ifdef CONFIG_X86_AMD_PLATFORM_DEVICE
-
static int misc_check_res(struct acpi_resource *ares, void *data)
{
struct resource res;
@@ -133,7 +132,7 @@ static int fch_misc_setup(struct apd_private_data *pdata)
static const struct apd_device_desc fch_misc_desc = {
.setup = fch_misc_setup,
};
-#endif
+#endif /* CONFIG_X86_AMD_PLATFORM_DEVICE */
#ifdef CONFIG_ARM64
static const struct apd_device_desc xgene_i2c_desc = {
@@ -175,13 +174,9 @@ static int fch_misc_setup(struct apd_private_data *pdata)
.setup = acpi_apd_setup,
.fixed_clk_rate = 250000000,
};
-#endif
+#endif /* CONFIG_ARM64 */
-#else
-
-#define APD_ADDR(desc) (0UL)
-
-#endif /* CONFIG_X86_AMD_PLATFORM_DEVICE */
+#endif
/**
* Create platform device during acpi scan attach handle.
--
1.7.12.4
next prev parent reply other threads:[~2020-09-07 17:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-07 12:57 [PATCH v2 0/5] Cleanups for ACPI APD driver Hanjun Guo
2020-09-07 12:57 ` [PATCH v2 1/5] ACPI / APD: Add kernel doc for the properties in struct apd_device_desc Hanjun Guo
2020-09-07 12:57 ` [PATCH v2 2/5] ACPI / APD: Remove the flags " Hanjun Guo
2020-09-07 12:57 ` [PATCH v2 3/5] ACPI / APD: Remove ACPI_MODULE_NAME() Hanjun Guo
2020-09-07 12:57 ` Hanjun Guo [this message]
2020-09-07 12:57 ` [PATCH v2 5/5] ACPI / APD: Head file including cleanups Hanjun Guo
2020-09-25 10:51 ` [PATCH v2 0/5] Cleanups for ACPI APD driver 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=1599483453-26635-5-git-send-email-guohanjun@huawei.com \
--to=guohanjun@huawei.com \
--cc=Ken.Xue@amd.com \
--cc=linux-acpi@vger.kernel.org \
--cc=lkp@intel.com \
--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).