From 749626fa099085ca77f3ff05a8efcb3b87721724 Mon Sep 17 00:00:00 2001 From: YueHaibing Date: Tue, 1 Sep 2020 14:47:16 +0800 Subject: [PATCH 01/17] ACPI: Remove three unused inline functions There is no callers in tree. Signed-off-by: YueHaibing [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki --- include/linux/acpi.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 1e4cdc6c7ae2..7ce2235f99f9 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -977,8 +977,6 @@ int acpi_subsys_runtime_suspend(struct device *dev); int acpi_subsys_runtime_resume(struct device *dev); int acpi_dev_pm_attach(struct device *dev, bool power_on); #else -static inline int acpi_dev_runtime_suspend(struct device *dev) { return 0; } -static inline int acpi_dev_runtime_resume(struct device *dev) { return 0; } static inline int acpi_subsys_runtime_suspend(struct device *dev) { return 0; } static inline int acpi_subsys_runtime_resume(struct device *dev) { return 0; } static inline int acpi_dev_pm_attach(struct device *dev, bool power_on) @@ -1216,13 +1214,6 @@ static inline int acpi_node_prop_get(const struct fwnode_handle *fwnode, return -ENXIO; } -static inline int acpi_dev_prop_get(const struct acpi_device *adev, - const char *propname, - void **valptr) -{ - return -ENXIO; -} - static inline int acpi_dev_prop_read_single(const struct acpi_device *adev, const char *propname, enum dev_prop_type proptype, From 1eb3d0414520c8ee91b78b9f24cf30ffe71b6e5d Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Thu, 24 Sep 2020 10:56:53 +0800 Subject: [PATCH 02/17] ACPI: cmos_rtc: Remove leftover ACPI_MODULE_NAME() ACPI_MODULE_NAME() is only needed for ACPICA debug functionality such as ACPI_DEBUG_PRINT() which is not used in acpi_cmos_rtc.c, remove it. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpi_cmos_rtc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/acpi/acpi_cmos_rtc.c b/drivers/acpi/acpi_cmos_rtc.c index 33ac6cb428fe..67f1d33d15c4 100644 --- a/drivers/acpi/acpi_cmos_rtc.c +++ b/drivers/acpi/acpi_cmos_rtc.c @@ -15,8 +15,6 @@ #include "internal.h" -ACPI_MODULE_NAME("cmos rtc"); - static const struct acpi_device_id acpi_cmos_rtc_ids[] = { { "PNP0B00" }, { "PNP0B01" }, From cbaef23b2cb3098d7f59ea894af2315f38a8c2fc Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Thu, 24 Sep 2020 10:56:54 +0800 Subject: [PATCH 03/17] ACPI: LPSS: Remove ACPI_MODULE_NAME() ACPI_MODULE_NAME() is only needed for ACPICA debug functionality such as ACPI_DEBUG_PRINT() which is not used in acpi_lpss.c, remove it. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpi_lpss.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index 5e2bfbcf526f..46e307ea0f78 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -26,8 +26,6 @@ #include "internal.h" -ACPI_MODULE_NAME("acpi_lpss"); - #ifdef CONFIG_X86_INTEL_LPSS #include From 8295d7900398f46f9518fa6c5465f8162b9ddc4e Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Thu, 24 Sep 2020 10:56:55 +0800 Subject: [PATCH 04/17] ACPI: memhotplug: Remove leftover ACPICA debug functionality After commit 0a34764411aa ("ACPI / scan: Make memory hotplug drive use struct acpi_scan_handler"), all the ACPICA debug functionality was removed, remove the leftover ACPICA debug code. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpi_memhotplug.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index e294f44a7850..9cd987d5fee5 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c @@ -22,13 +22,6 @@ #define ACPI_MEMORY_DEVICE_HID "PNP0C80" #define ACPI_MEMORY_DEVICE_NAME "Hotplug Mem Device" -#define _COMPONENT ACPI_MEMORY_DEVICE_COMPONENT - -#undef PREFIX -#define PREFIX "ACPI:memory_hp:" - -ACPI_MODULE_NAME("acpi_memhotplug"); - static const struct acpi_device_id memory_device_ids[] = { {ACPI_MEMORY_DEVICE_HID, 0}, {"", 0}, From da5b64329d8ff599d9683479612b50b46b4d99bf Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Thu, 24 Sep 2020 10:56:56 +0800 Subject: [PATCH 05/17] ACPI: platform: Remove ACPI_MODULE_NAME() ACPI_MODULE_NAME() is not used in the acpi_platform.c, remove it. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpi_platform.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/acpi/acpi_platform.c b/drivers/acpi/acpi_platform.c index c05050f474cd..78d621290a35 100644 --- a/drivers/acpi/acpi_platform.c +++ b/drivers/acpi/acpi_platform.c @@ -19,8 +19,6 @@ #include "internal.h" -ACPI_MODULE_NAME("platform"); - static const struct acpi_device_id forbidden_id_list[] = { {"PNP0000", 0}, /* PIC */ {"PNP0100", 0}, /* Timer */ From d2c18c0db8c2f75bade2ebc483fd5dcc99da913b Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Thu, 24 Sep 2020 10:56:57 +0800 Subject: [PATCH 06/17] ACPI: container: Remove leftover ACPICA debug functionality After commit 737f1a9f8082 ("ACPI / scan: Make container driver use struct acpi_scan_handler"), ACPICA debug print function calls were removed, so the leftover ACPICA debug functionality is useless, remove it. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/container.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c index 9ea5f55d97e3..ccaa647ac3d4 100644 --- a/drivers/acpi/container.c +++ b/drivers/acpi/container.c @@ -14,9 +14,6 @@ #include "internal.h" -#define _COMPONENT ACPI_CONTAINER_COMPONENT -ACPI_MODULE_NAME("container"); - static const struct acpi_device_id container_device_ids[] = { {"ACPI0004", 0}, {"PNP0A05", 0}, From 6b168c56e5bd3cbccdd2d63cb4c15d56bdf4f7b8 Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Thu, 24 Sep 2020 10:56:58 +0800 Subject: [PATCH 07/17] ACPI: custom_method: Remove dead ACPICA debug code ACPICA debug code _COMPONENT and ACPI_MODULE_NAME() is not used in custom_method.c, remove it. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/custom_method.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/acpi/custom_method.c b/drivers/acpi/custom_method.c index b097ef209313..7b54dc95d36b 100644 --- a/drivers/acpi/custom_method.c +++ b/drivers/acpi/custom_method.c @@ -13,8 +13,6 @@ #include "internal.h" -#define _COMPONENT ACPI_SYSTEM_COMPONENT -ACPI_MODULE_NAME("custom_method"); MODULE_LICENSE("GPL"); static struct dentry *cm_dentry; From d0611c6e020982c691bf160854c0d004ef6f6c6c Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Thu, 24 Sep 2020 10:56:59 +0800 Subject: [PATCH 08/17] ACPI: debugfs: Remove dead ACPICA debug code The _COMPONENT and ACPI_MODULE_NAME() were not used even when the debugfs.c was introduced, remove them. Signed-off-by: Hanjun Guo [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/debugfs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/acpi/debugfs.c b/drivers/acpi/debugfs.c index d5ecea3715f8..074eb98d213e 100644 --- a/drivers/acpi/debugfs.c +++ b/drivers/acpi/debugfs.c @@ -10,9 +10,6 @@ #include "internal.h" -#define _COMPONENT ACPI_SYSTEM_COMPONENT -ACPI_MODULE_NAME("debugfs"); - struct dentry *acpi_debugfs_dir; EXPORT_SYMBOL_GPL(acpi_debugfs_dir); From 7ae57c6d14a28d6b04ed0fb5e05e08b113317628 Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Thu, 24 Sep 2020 10:57:00 +0800 Subject: [PATCH 09/17] ACPI: dock: Remove dead ACPICA debug code The ACPICA debug ACPI_MODULE_NAME() definition is not used, remove it. Signed-off-by: Hanjun Guo [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/dock.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 9bd72c26ef46..45d4b7b69de8 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -20,8 +20,6 @@ #include "internal.h" -ACPI_MODULE_NAME("dock"); - static bool immediate_undock = 1; module_param(immediate_undock, bool, 0644); MODULE_PARM_DESC(immediate_undock, "1 (default) will cause the driver to " From 3ffa00e88df58f755b1a6ac20949ab09f92086af Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Thu, 24 Sep 2020 10:57:01 +0800 Subject: [PATCH 10/17] ACPI: event: Remove leftover ACPICA debug code After commit (ff491a7334ac "netlink: change return-value logic of netlink_broadcast()"), ACPI_DEBUG_PRINT() was removed from event.c, so the ACPICA debug code is not used, remove it. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/event.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c index 47f21599f2ab..170643927044 100644 --- a/drivers/acpi/event.c +++ b/drivers/acpi/event.c @@ -19,9 +19,6 @@ #include "internal.h" -#define _COMPONENT ACPI_SYSTEM_COMPONENT -ACPI_MODULE_NAME("event"); - /* ACPI notifier chain */ static BLOCKING_NOTIFIER_HEAD(acpi_chain_head); From be690f3ed1d87ac14411772750af98ad7d6cafab Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Thu, 24 Sep 2020 10:57:02 +0800 Subject: [PATCH 11/17] ACPI: PCI: Remove unused ACPICA debug code The ACPICA debug code _COMPONENT and ACPI_MODULE_NAME() are not used, so can be removed. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/pci_root.c | 2 -- drivers/acpi/pci_slot.c | 3 --- 2 files changed, 5 deletions(-) diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index f90e841c59f5..7a6abd3d10ef 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -24,8 +24,6 @@ #include "internal.h" -#define _COMPONENT ACPI_PCI_COMPONENT -ACPI_MODULE_NAME("pci_root"); #define ACPI_PCI_ROOT_CLASS "pci_bridge" #define ACPI_PCI_ROOT_DEVICE_NAME "PCI Root Bridge" static int acpi_pci_root_add(struct acpi_device *device, diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c index ca2461d1bf14..d6cb2c27a23b 100644 --- a/drivers/acpi/pci_slot.c +++ b/drivers/acpi/pci_slot.c @@ -28,9 +28,6 @@ static int check_sta_before_sun; -#define _COMPONENT ACPI_PCI_COMPONENT -ACPI_MODULE_NAME("pci_slot"); - #define SLOT_NAME_SIZE 21 /* Inspired by #define in acpiphp.h */ struct acpi_pci_slot { From d93b767e8cb319b3062d2e6ef4328bee97da57f5 Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Thu, 24 Sep 2020 10:57:03 +0800 Subject: [PATCH 12/17] ACPI: proc: Remove dead ACPICA debug code Remove the not used ACPICA debug code _COMPONENT and ACPI_MODULE_NAME() which were not used even when proc.c was introduced. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/proc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c index 7892980b3ce4..0cca7991f186 100644 --- a/drivers/acpi/proc.c +++ b/drivers/acpi/proc.c @@ -10,15 +10,11 @@ #include "sleep.h" #include "internal.h" -#define _COMPONENT ACPI_SYSTEM_COMPONENT - /* * this file provides support for: * /proc/acpi/wakeup */ -ACPI_MODULE_NAME("sleep") - static int acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset) { From 34f98c29041ddbde910277fb92c1094adccd0c44 Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Thu, 24 Sep 2020 10:57:04 +0800 Subject: [PATCH 13/17] ACPI: processor: Remove dead ACPICA debug code The ACPICA debug code is not used anywhere in processor_core.c and processor_thermal.c, remove it. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/processor_core.c | 3 --- drivers/acpi/processor_thermal.c | 2 -- 2 files changed, 5 deletions(-) diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index f32beb7d7882..2ac48cda5b20 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c @@ -14,9 +14,6 @@ #include #include -#define _COMPONENT ACPI_PROCESSOR_COMPONENT -ACPI_MODULE_NAME("processor_core"); - static struct acpi_table_madt *get_madt_table(void) { static struct acpi_table_madt *madt; diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c index 41feb88ee92d..6c7d05b37c98 100644 --- a/drivers/acpi/processor_thermal.c +++ b/drivers/acpi/processor_thermal.c @@ -20,8 +20,6 @@ #define PREFIX "ACPI: " #define ACPI_PROCESSOR_CLASS "processor" -#define _COMPONENT ACPI_PROCESSOR_COMPONENT -ACPI_MODULE_NAME("processor_thermal"); #ifdef CONFIG_CPU_FREQ From b16cd57ebc5d866c3b16664d8d19c91579b3aa88 Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Thu, 24 Sep 2020 10:57:05 +0800 Subject: [PATCH 14/17] ACPI: tiny-power-button: Remove dead ACPICA debug code The ACPICA debug code is not used, can be removed. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/tiny-power-button.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/acpi/tiny-power-button.c b/drivers/acpi/tiny-power-button.c index 6273d73c0b59..420e61b8eaae 100644 --- a/drivers/acpi/tiny-power-button.c +++ b/drivers/acpi/tiny-power-button.c @@ -4,7 +4,6 @@ #include #include -ACPI_MODULE_NAME("tiny-power-button"); MODULE_AUTHOR("Josh Triplett"); MODULE_DESCRIPTION("ACPI Tiny Power Button Driver"); MODULE_LICENSE("GPL"); From e0e13705edd903b71453b2f9668d06a728eb95d7 Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Thu, 24 Sep 2020 10:57:06 +0800 Subject: [PATCH 15/17] ACPI: video: Remove leftover ACPICA debug code After commit (87521e16a7ab "acpi-video-detect: Rewrite backlight interface selection logic"), ACPI_DEBUG_PRINT() was remove, so ACPI_MODULE_NAME() and _COMPONENT are not used anymore, remove them. Signed-off-by: Hanjun Guo [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/video_detect.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c index 2499d7e3c710..d2981f70a736 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video_detect.c @@ -35,9 +35,6 @@ #include #include -ACPI_MODULE_NAME("video"); -#define _COMPONENT ACPI_VIDEO_COMPONENT - void acpi_video_unregister_backlight(void); static bool backlight_notifier_registered; From 77569c7533a6c089c67874ad6d8b442f5c20be10 Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Thu, 24 Sep 2020 10:57:07 +0800 Subject: [PATCH 16/17] ACPI: wakeup: Remove dead ACPICA debug code The ACPICA debug code of ACPI_SYSTEM_COMPONENT and ACPI_MODULE_NAME() is not used in wakeup.c, remove it. Signed-off-by: Hanjun Guo [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/wakeup.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/acpi/wakeup.c b/drivers/acpi/wakeup.c index 0b2e42530adf..f89dd9a99e6e 100644 --- a/drivers/acpi/wakeup.c +++ b/drivers/acpi/wakeup.c @@ -26,8 +26,6 @@ static DEFINE_MUTEX(acpi_wakeup_handler_mutex); * suspend/resume and isn't really required as this is called in S-state. At * that time, there is no device hotplug **/ -#define _COMPONENT ACPI_SYSTEM_COMPONENT -ACPI_MODULE_NAME("wakeup_devices") /** * acpi_enable_wakeup_devices - Enable wake-up device GPEs. From 1e0cb59d5f0a41d1a2b7a1e7d45024fbac62d6e7 Mon Sep 17 00:00:00 2001 From: John Garry Date: Wed, 30 Sep 2020 13:43:50 +0100 Subject: [PATCH 17/17] ACPI: Make acpi_evaluate_dsm() prototype consistent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When compiling a driver which includes both include/linux/acpi.h and include/acpi/acpi_bus.h for when CONFIG_ACPI=n for i386, I get this: /include/acpi/acpi_bus.h:53:20: error: conflicting types for ‘acpi_evaluate_dsm’ union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid, ^~~~~~~~~~~~~~~~~ In file included from drivers/scsi/hisi_sas/hisi_sas.h:10:0, from drivers/scsi/hisi_sas/hisi_sas_main.c:7: ./include/linux/acpi.h:866:34: note: previous definition of ‘acpi_evaluate_dsm’ was here static inline union acpi_object *acpi_evaluate_dsm(acpi_handle handle, ^~~~~~~~~~~~~~~~~ Fix by making prototype in include/linux/acpi.h consistent. Signed-off-by: John Garry [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki --- include/linux/acpi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 7ce2235f99f9..49dbb105084f 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -865,7 +865,7 @@ static inline bool acpi_driver_match_device(struct device *dev, static inline union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid, - int rev, int func, + u64 rev, u64 func, union acpi_object *argv4) { return NULL;