linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathias Krause <minipli@googlemail.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org, Mathias Krause <minipli@googlemail.com>
Subject: [PATCH 5/5] x86/PCI: Mark PCI BIOS initialization code as such
Date: Mon, 25 Aug 2014 23:26:39 +0200	[thread overview]
Message-ID: <1409001999-23161-6-git-send-email-minipli@googlemail.com> (raw)
In-Reply-To: <1409001999-23161-1-git-send-email-minipli@googlemail.com>

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>
---
 arch/x86/pci/pcbios.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/pci/pcbios.c b/arch/x86/pci/pcbios.c
index c77b24a8b2..9b83b9051a 100644
--- a/arch/x86/pci/pcbios.c
+++ b/arch/x86/pci/pcbios.c
@@ -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;
-- 
1.7.10.4


  parent reply	other threads:[~2014-08-25 21:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-25 21:26 [PATCH 0/5] x86/PCI: Minor size reduction by marking init code and data as such Mathias Krause
2014-08-25 21:26 ` [PATCH 1/5] x86/PCI: Mark DMI tables as initialization data Mathias Krause
2014-08-25 21:26 ` [PATCH 2/5] x86/PCI: Move __init annotation were it belongs to Mathias Krause
2014-08-25 21:26 ` [PATCH 3/5] x86/PCI: Mark constants of pci_mmcfg_nvidia_mcp55() as __initconst Mathias Krause
2014-08-25 21:26 ` [PATCH 4/5] x86/PCI: Constify pci_mmcfg_probes[] array Mathias Krause
2014-08-25 21:26 ` Mathias Krause [this message]
2014-09-22 20:27 ` [PATCH 0/5] x86/PCI: Minor size reduction by marking init code and data as such Bjorn Helgaas
2014-09-22 20:34   ` Bjorn Helgaas
2014-09-23 15:43     ` Mathias Krause
2014-09-24  7:28     ` Ingo Molnar

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=1409001999-23161-6-git-send-email-minipli@googlemail.com \
    --to=minipli@googlemail.com \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    /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).