x86/PCI: Mark PCI BIOS initialization code as such
authorMathias Krause <minipli@googlemail.com>
Mon, 25 Aug 2014 21:26:39 +0000 (23:26 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 24 Sep 2014 12:46:27 +0000 (06:46 -0600)
The pci_find_bios() function is only ever called from initialization code,
therefore can be marked as such, too.  This, in turn, allows marking other
functions called only in this context as well.

The bios32_indirect variable can be marked as __initdata as it is only
referenced from __init functions now.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
arch/x86/pci/pcbios.c

index c77b24a8b2daf499e07527be6f27d5b8c2df20d0..9b83b9051ae7bb78daf009e1d6c95927c74f2877 100644 (file)
@@ -79,13 +79,13 @@ union bios32 {
 static struct {
        unsigned long address;
        unsigned short segment;
-} bios32_indirect = { 0, __KERNEL_CS };
+} bios32_indirect __initdata = { 0, __KERNEL_CS };
 
 /*
  * Returns the entry point for the given service, NULL on error
  */
 
-static unsigned long bios32_service(unsigned long service)
+static unsigned long __init bios32_service(unsigned long service)
 {
        unsigned char return_code;      /* %al */
        unsigned long address;          /* %ebx */
@@ -124,7 +124,7 @@ static struct {
 
 static int pci_bios_present;
 
-static int check_pcibios(void)
+static int __init check_pcibios(void)
 {
        u32 signature, eax, ebx, ecx;
        u8 status, major_ver, minor_ver, hw_mech;
@@ -312,7 +312,7 @@ static const struct pci_raw_ops pci_bios_access = {
  * Try to find PCI BIOS.
  */
 
-static const struct pci_raw_ops *pci_find_bios(void)
+static const struct pci_raw_ops *__init pci_find_bios(void)
 {
        union bios32 *check;
        unsigned char sum;
This page took 0.026745 seconds and 5 git commands to generate.