From patchwork Mon Aug 25 21:26:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Krause X-Patchwork-Id: 4776831 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 73C27C0338 for ; Mon, 25 Aug 2014 21:27:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9E741201DC for ; Mon, 25 Aug 2014 21:27:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4C1A1201CE for ; Mon, 25 Aug 2014 21:27:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933418AbaHYV1N (ORCPT ); Mon, 25 Aug 2014 17:27:13 -0400 Received: from mail-wg0-f50.google.com ([74.125.82.50]:53383 "EHLO mail-wg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756619AbaHYV1L (ORCPT ); Mon, 25 Aug 2014 17:27:11 -0400 Received: by mail-wg0-f50.google.com with SMTP id n12so13407524wgh.21 for ; Mon, 25 Aug 2014 14:27:10 -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=7L8tcbV1MT95NXGJYluVZpvITWPDTVwBpcX6Qbpfy+k=; b=MsSgW+FYkXQzEy5n7/dCyaRdzn8yKjZcIXtBFLgH58/3yVfJBMn8f9FoOV3Wh3Zkd1 IVmyZOeXHbeNoaDOm+I5PVID72X1S0ihnAUiItWVvrFAC8oGLYC2vKHAgO0iRSt4YQH7 pSu8kTee+OiiIEUTtrj19z3Irzh9F9h5Ha79oQF6JKrO0amvyFNm+Z71VNyYhxPyQ3oH TA78ugzpqviWK+U8b90AUzcL8Dj23Cm8CjwKqcpNgDcMEu+UjT6J69uFoyDITUa97NLi 6RjaG5czaJMZFar4LD+1VivkAtns+VL2SfSsJCZMmcy5j6QT74z1glnmAHcCvAqmc8Rv FhJg== X-Received: by 10.180.198.232 with SMTP id jf8mr17267556wic.37.1409002030067; Mon, 25 Aug 2014 14:27:10 -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.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Aug 2014 14:27:09 -0700 (PDT) From: Mathias Krause To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, Mathias Krause Subject: [PATCH 2/5] x86/PCI: Move __init annotation were it belongs to Date: Mon, 25 Aug 2014 23:26:36 +0200 Message-Id: <1409001999-23161-3-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 According to include/linux/init.h the __init annotation should be added immediately before the function name. However, for quite a few functions in mmconfig-shared.c this is not the case. It's either before the return type or even in the middle of it. Beside gcc still getting it right, we should change them to comply to the rules of include/linux/init.h. Signed-off-by: Mathias Krause --- arch/x86/pci/mmconfig-shared.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index 248642f4ba..163ef6bf16 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c @@ -31,7 +31,7 @@ static DEFINE_MUTEX(pci_mmcfg_lock); LIST_HEAD(pci_mmcfg_list); -static __init void pci_mmconfig_remove(struct pci_mmcfg_region *cfg) +static void __init pci_mmconfig_remove(struct pci_mmcfg_region *cfg) { if (cfg->res.parent) release_resource(&cfg->res); @@ -39,7 +39,7 @@ static __init void pci_mmconfig_remove(struct pci_mmcfg_region *cfg) kfree(cfg); } -static __init void free_all_mmcfg(void) +static void __init free_all_mmcfg(void) { struct pci_mmcfg_region *cfg, *tmp; @@ -93,7 +93,7 @@ static struct pci_mmcfg_region *pci_mmconfig_alloc(int segment, int start, return new; } -static __init struct pci_mmcfg_region *pci_mmconfig_add(int segment, int start, +static struct pci_mmcfg_region *__init pci_mmconfig_add(int segment, int start, int end, u64 addr) { struct pci_mmcfg_region *new; @@ -125,7 +125,7 @@ struct pci_mmcfg_region *pci_mmconfig_lookup(int segment, int bus) return NULL; } -static const char __init *pci_mmcfg_e7520(void) +static const char *__init pci_mmcfg_e7520(void) { u32 win; raw_pci_ops->read(0, 0, PCI_DEVFN(0, 0), 0xce, 2, &win); @@ -140,7 +140,7 @@ static const char __init *pci_mmcfg_e7520(void) return "Intel Corporation E7520 Memory Controller Hub"; } -static const char __init *pci_mmcfg_intel_945(void) +static const char *__init pci_mmcfg_intel_945(void) { u32 pciexbar, mask = 0, len = 0; @@ -184,7 +184,7 @@ static const char __init *pci_mmcfg_intel_945(void) return "Intel Corporation 945G/GZ/P/PL Express Memory Controller Hub"; } -static const char __init *pci_mmcfg_amd_fam10h(void) +static const char *__init pci_mmcfg_amd_fam10h(void) { u32 low, high, address; u64 base, msr; @@ -235,7 +235,7 @@ static const char __init *pci_mmcfg_amd_fam10h(void) } static bool __initdata mcp55_checked; -static const char __init *pci_mmcfg_nvidia_mcp55(void) +static const char *__init pci_mmcfg_nvidia_mcp55(void) { int bus; int mcp55_mmconf_found = 0;