From patchwork Mon Sep 7 08:56:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 11760233 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8CD6A92C for ; Mon, 7 Sep 2020 09:04:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 79A7521556 for ; Mon, 7 Sep 2020 09:04:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728183AbgIGJEi (ORCPT ); Mon, 7 Sep 2020 05:04:38 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:10788 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728173AbgIGJEg (ORCPT ); Mon, 7 Sep 2020 05:04:36 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 4D9D35AEFC1EC6B2FEEA; Mon, 7 Sep 2020 17:04:34 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Sep 2020 17:04:14 +0800 From: Hanjun Guo To: "Rafael J. Wysocki" CC: , Ken Xue , Hanjun Guo Subject: [PATCH 1/5] ACPI / APD: Add kernel doc for the properties in struct apd_device_desc Date: Mon, 7 Sep 2020 16:56:17 +0800 Message-ID: <1599468981-17301-2-git-send-email-guohanjun@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1599468981-17301-1-git-send-email-guohanjun@huawei.com> References: <1599468981-17301-1-git-send-email-guohanjun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org commit 7ff55d174cbf ("ACPI / APD: Provide build-in properties of the UART") add the 'struct property_entry *properties' in struct apd_device_desc but didn't add the kernel doc, add it now. Signed-off-by: Hanjun Guo --- drivers/acpi/acpi_apd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c index 4c34837..6f39289 100644 --- a/drivers/acpi/acpi_apd.c +++ b/drivers/acpi/acpi_apd.c @@ -34,6 +34,7 @@ * @flags: device flags like %ACPI_APD_SYSFS, %ACPI_APD_PM * @fixed_clk_rate: fixed rate input clock source for acpi device; * 0 means no fixed rate input clock source + * @properties: build-in properties of the device such as UART * @setup: a hook routine to set device resource during create platform device * * Device description defined as acpi_device_id.driver_data From patchwork Mon Sep 7 08:56:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 11760231 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1001715E4 for ; Mon, 7 Sep 2020 09:04:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EF64D2168B for ; Mon, 7 Sep 2020 09:04:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727122AbgIGJEi (ORCPT ); Mon, 7 Sep 2020 05:04:38 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:33340 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728183AbgIGJEf (ORCPT ); Mon, 7 Sep 2020 05:04:35 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 72F71BF5C3AF71B17CE4; Mon, 7 Sep 2020 17:04:34 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Sep 2020 17:04:15 +0800 From: Hanjun Guo To: "Rafael J. Wysocki" CC: , Ken Xue , Hanjun Guo Subject: [PATCH 2/5] ACPI / APD: Remove the flags in struct apd_device_desc Date: Mon, 7 Sep 2020 16:56:18 +0800 Message-ID: <1599468981-17301-3-git-send-email-guohanjun@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1599468981-17301-1-git-send-email-guohanjun@huawei.com> References: <1599468981-17301-1-git-send-email-guohanjun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org The flags is not used in anywhere, remove it and its related code. Signed-off-by: Hanjun Guo --- drivers/acpi/acpi_apd.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c index 6f39289..c4bc4ab 100644 --- a/drivers/acpi/acpi_apd.c +++ b/drivers/acpi/acpi_apd.c @@ -23,15 +23,7 @@ struct apd_private_data; /** - * ACPI_APD_SYSFS : add device attributes in sysfs - * ACPI_APD_PM : attach power domain to device - */ -#define ACPI_APD_SYSFS BIT(0) -#define ACPI_APD_PM BIT(1) - -/** * struct apd_device_desc - a descriptor for apd device - * @flags: device flags like %ACPI_APD_SYSFS, %ACPI_APD_PM * @fixed_clk_rate: fixed rate input clock source for acpi device; * 0 means no fixed rate input clock source * @properties: build-in properties of the device such as UART @@ -40,7 +32,6 @@ * Device description defined as acpi_device_id.driver_data */ struct apd_device_desc { - unsigned int flags; unsigned int fixed_clk_rate; struct property_entry *properties; int (*setup)(struct apd_private_data *pdata); From patchwork Mon Sep 7 08:56:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 11760235 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B9E8515AB for ; Mon, 7 Sep 2020 09:04:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A52AC2168B for ; Mon, 7 Sep 2020 09:04:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728173AbgIGJEi (ORCPT ); Mon, 7 Sep 2020 05:04:38 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:33378 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728186AbgIGJEg (ORCPT ); Mon, 7 Sep 2020 05:04:36 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 8282B88F0C772872483C; Mon, 7 Sep 2020 17:04:34 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Sep 2020 17:04:15 +0800 From: Hanjun Guo To: "Rafael J. Wysocki" CC: , Ken Xue , Hanjun Guo Subject: [PATCH 3/5] ACPI / APD: Remove ACPI_MODULE_NAME() Date: Mon, 7 Sep 2020 16:56:19 +0800 Message-ID: <1599468981-17301-4-git-send-email-guohanjun@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1599468981-17301-1-git-send-email-guohanjun@huawei.com> References: <1599468981-17301-1-git-send-email-guohanjun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org ACPI_MODULE_NAME() is used for ACPI debug output when using ACPI debug print functions, but ACPI debug print functions are not used in acpi_apd.c, remove the ACPI_MODULE_NAME(). Signed-off-by: Hanjun Guo --- drivers/acpi/acpi_apd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c index c4bc4ab..4dbf85b 100644 --- a/drivers/acpi/acpi_apd.c +++ b/drivers/acpi/acpi_apd.c @@ -19,7 +19,6 @@ #include "internal.h" -ACPI_MODULE_NAME("acpi_apd"); struct apd_private_data; /** From patchwork Mon Sep 7 08:56:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 11760227 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 674BC112E for ; Mon, 7 Sep 2020 09:04:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 54DD92166E for ; Mon, 7 Sep 2020 09:04:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728217AbgIGJEg (ORCPT ); Mon, 7 Sep 2020 05:04:36 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:33370 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728199AbgIGJEf (ORCPT ); Mon, 7 Sep 2020 05:04:35 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 77464C13801C0C18BFF1; Mon, 7 Sep 2020 17:04:34 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Sep 2020 17:04:16 +0800 From: Hanjun Guo To: "Rafael J. Wysocki" CC: , Ken Xue , Hanjun Guo Subject: [PATCH 4/5] ACPI / APD: Remove the unneeded APD_ADDR(desc) macro define Date: Mon, 7 Sep 2020 16:56:20 +0800 Message-ID: <1599468981-17301-5-git-send-email-guohanjun@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1599468981-17301-1-git-send-email-guohanjun@huawei.com> References: <1599468981-17301-1-git-send-email-guohanjun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org 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 --- 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. From patchwork Mon Sep 7 08:56:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 11760229 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 961B315AB for ; Mon, 7 Sep 2020 09:04:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 822122166E for ; Mon, 7 Sep 2020 09:04:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728180AbgIGJEh (ORCPT ); Mon, 7 Sep 2020 05:04:37 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:10787 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727122AbgIGJEg (ORCPT ); Mon, 7 Sep 2020 05:04:36 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 2151A43B1A30621C55C3; Mon, 7 Sep 2020 17:04:34 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Sep 2020 17:04:16 +0800 From: Hanjun Guo To: "Rafael J. Wysocki" CC: , Ken Xue , Hanjun Guo Subject: [PATCH 5/5] ACPI / APD: Head file including cleanups Date: Mon, 7 Sep 2020 16:56:21 +0800 Message-ID: <1599468981-17301-6-git-send-email-guohanjun@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1599468981-17301-1-git-send-email-guohanjun@huawei.com> References: <1599468981-17301-1-git-send-email-guohanjun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Make the including head files to be alphabetical order, and remove the not needed head file inclusion. Signed-off-by: Hanjun Guo Reported-by: kernel test robot Reported-by: kernel test robot --- drivers/acpi/acpi_apd.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c index 561d9ba..5d50ca7 100644 --- a/drivers/acpi/acpi_apd.c +++ b/drivers/acpi/acpi_apd.c @@ -7,17 +7,13 @@ * Wu, Jeff */ -#include -#include -#include -#include -#include #include +#include +#include #include #include -#include - -#include "internal.h" +#include +#include struct apd_private_data;