From patchwork Mon Aug 25 21:26:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Krause X-Patchwork-Id: 4776841 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 59B1A9F2E8 for ; Mon, 25 Aug 2014 21:27:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8AC33201CE for ; Mon, 25 Aug 2014 21:27:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F48E201DD for ; Mon, 25 Aug 2014 21:27:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933329AbaHYV1Q (ORCPT ); Mon, 25 Aug 2014 17:27:16 -0400 Received: from mail-wg0-f41.google.com ([74.125.82.41]:59442 "EHLO mail-wg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756618AbaHYV1O (ORCPT ); Mon, 25 Aug 2014 17:27:14 -0400 Received: by mail-wg0-f41.google.com with SMTP id z12so13892626wgg.24 for ; Mon, 25 Aug 2014 14:27:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eWVelzYpFIKBeQJzjXWofaOUhK83BaZsPJmnC45JClk=; b=ze+z9O3JukvLReyw2Z4Ta96TWREN06VU09RFeiRGwkiK0gRI88Eseryf5pd8gq2SlW b6yU9e82TazyMQWzIxrgGeBE3oTosWD7ETu6lTStatwUsNiTAoFOokeH8JsgtWw2wN3x BhJm4E+SDUGGVr8vyi7koAqMTSBxFB1QAtoV2f7lP/zCG2zgc4JyR9NxjOSIMo0hYJyK /1tcxJ9RA2Bm3G8Y+/bHs8VUHGUJovfKeqRFiT582sq7vx8MIR6N60NBBlwqGwOjP17R 6iHGLpIQdFlRtLPFiI6ic1j7bu2UvdxD9VtkypXbMrlnBX58tMmB94z7pu1Mj+g8Xr0Z YWbQ== X-Received: by 10.180.39.172 with SMTP id q12mr17618873wik.55.1409002033595; Mon, 25 Aug 2014 14:27:13 -0700 (PDT) Received: from jig.fritz.box (p4FF2823D.dip0.t-ipconnect.de. [79.242.130.61]) by mx.google.com with ESMTPSA id lh5sm2622976wjb.12.2014.08.25.14.27.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Aug 2014 14:27:12 -0700 (PDT) From: Mathias Krause To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, Mathias Krause Subject: [PATCH 5/5] x86/PCI: Mark PCI BIOS initialization code as such Date: Mon, 25 Aug 2014 23:26:39 +0200 Message-Id: <1409001999-23161-6-git-send-email-minipli@googlemail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1409001999-23161-1-git-send-email-minipli@googlemail.com> References: <1409001999-23161-1-git-send-email-minipli@googlemail.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;