Skip to contentSkip to conversation

PCI/ACPI: Unexport pci_root.c functions

PATCH In review Bjorn Helgaas 2 participants 4 messages Jul 10, 2020 – Jul 13, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover PCI/ACPI: Unexport pci_root.c functions

From: Bjorn Helgaas <[email protected]>

Unexport a couple functions that are no longer needed by modules.

Bjorn Helgaas (2):
PCI/ACPI: Unexport acpi_pci_osc_control_set()
PCI/ACPI: Unexport acpi_pci_find_root()

 drivers/acpi/pci_root.c | 5 ++---
 include/linux/acpi.h    | 3 ---
 2 files changed, 2 insertions(+), 6 deletions(-)

base-commit: b3a9e3b9622ae10064826dccb4f7a52bd88c7407

Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/2 PCI/ACPI: Unexport acpi_pci_osc_control_set()

From: Bjorn Helgaas <[email protected]>

acpi_pci_osc_control_set() is called only inside pci_root.c and there's no need for it to be called by modules. Make it static and unexport it.

---
 drivers/acpi/pci_root.c | 4 ++--
 include/linux/acpi.h    | 3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)
drivers/acpi/pci_root.c +2 -2
index f90e841c59f5..b6da9745efcd 100644
@@ -355,7 +355,8 @@ EXPORT_SYMBOL_GPL(acpi_get_pci_dev);
  * _OSC bits the BIOS has granted control of, but its contents are meaningless
  * on failure.
  **/
-acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 *mask, u32 req)
+static acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 *mask,
+					    u32 req)
 {
 	struct acpi_pci_root *root;
 	acpi_status status = AE_OK;
@@ -408,7 +409,6 @@ acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 *mask, u32 req)
 	mutex_unlock(&osc_lock);
 	return status;
 }
-EXPORT_SYMBOL(acpi_pci_osc_control_set);
 
 static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm,
 				 bool is_pcie)
include/linux/acpi.h +0 -3
index d661cd0ee64d..bb20a872729e 100644
@@ -581,9 +581,6 @@ extern bool osc_pc_lpi_support_confirmed;
 #define ACPI_GSB_ACCESS_ATTRIB_RAW_BYTES	0x0000000E
 #define ACPI_GSB_ACCESS_ATTRIB_RAW_PROCESS	0x0000000F
 
-extern acpi_status acpi_pci_osc_control_set(acpi_handle handle,
-					     u32 *mask, u32 req);
-
 /* Enable _OST when all relevant hotplug operations are enabled */
 #if defined(CONFIG_ACPI_HOTPLUG_CPU) &&			\
 	defined(CONFIG_ACPI_HOTPLUG_MEMORY) &&		\
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/2 PCI/ACPI: Unexport acpi_pci_find_root()

In reply to Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

acpi_pci_find_root() is called only from pci_root.c and drivers/pci/hotplug/acpi_pcihp.c, neither of which can be modules. Unexport it.

---
 drivers/acpi/pci_root.c | 1 -
 1 file changed, 1 deletion(-)
drivers/acpi/pci_root.c +0 -1
index b6da9745efcd..933890f97720 100644
@@ -246,7 +246,6 @@ struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle)
 
 	return root;
 }
-EXPORT_SYMBOL_GPL(acpi_pci_find_root);
 
 struct acpi_handle_node {
 	struct list_head node;
Signature · 1 line
2.25.1
maintainer Acked-by on the v1 series
#3 lore raw
In reply to Bjorn Helgaas
Quoted 8 lines · Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

Unexport a couple functions that are no longer needed by modules.

Bjorn Helgaas (2):
PCI/ACPI: Unexport acpi_pci_osc_control_set()
PCI/ACPI: Unexport acpi_pci_find_root()

For both:

Quoted 6 lines
 drivers/acpi/pci_root.c | 5 ++---
 include/linux/acpi.h    | 3 ---
 2 files changed, 2 insertions(+), 6 deletions(-)

base-commit: b3a9e3b9622ae10064826dccb4f7a52bd88c7407