From patchwork Tue Nov 6 21:55:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12701 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id D739123E00 for ; Tue, 6 Nov 2012 21:55:55 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 87A86A18710 for ; Tue, 6 Nov 2012 21:55:55 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id f6so618566iag.11 for ; Tue, 06 Nov 2012 13:55:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-provags-id:x-gm-message-state; bh=KB7MuevZDGxArdT71xdAzzXq31SdSB0MwI7iX3EZpPo=; b=TkpIkv2ivZ5mt4lHb7ssQ9KBQUvpoSdzGvndWzf3r/9SDScsagiQJiLG4VrfNeTZDV ++wjSZjufYCBZPoxlMPhPf+zytFAPgefNOHMB9j83KBqpyWaNFn/fXlNARQYPiehYYkn RiVFw2hFICfgLJwAuHut35Athvk8AAscJt0OjRDxX6qbW+Fth7SF3wW5l2wMxeF/C6y+ leArjeN1WrZyECrRxntk21i9hzOXTnhtap/OO8mz7GBUAg80ixxhsZTJZTNl4J5HTsbT mrWRT776PjaKRsm4NI37/g1jWCCGikCRF0Ypw4BB44OCZ3U5ez8pLEAU9dsA/zsyP9MF UuwA== Received: by 10.50.140.97 with SMTP id rf1mr14488063igb.70.1352238955309; Tue, 06 Nov 2012 13:55:55 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp114521igt; Tue, 6 Nov 2012 13:55:54 -0800 (PST) Received: by 10.14.221.194 with SMTP id r42mr7855536eep.25.1352238954375; Tue, 06 Nov 2012 13:55:54 -0800 (PST) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.17.8]) by mx.google.com with ESMTPS id n49si2437452eeo.133.2012.11.06.13.55.53 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 06 Nov 2012 13:55:54 -0800 (PST) Received-SPF: neutral (google.com: 212.227.17.8 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.17.8; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.17.8 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de Received: from localhost.localdomain (HSI-KBW-149-172-5-253.hsi13.kabel-badenwuerttemberg.de [149.172.5.253]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0M2ndG-1TFpdY1wvO-00snKX; Tue, 06 Nov 2012 22:55:43 +0100 From: Arnd Bergmann To: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Mark Langsdorf , Rob Herring , Jeff Garzik Subject: [PATCH 7/8] ata: highbank: mark ahci_highbank_probe as __devinit Date: Tue, 6 Nov 2012 22:55:32 +0100 Message-Id: <1352238933-4886-8-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1352238933-4886-1-git-send-email-arnd@arndb.de> References: <1352238933-4886-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:oQM2Nb2FpM/JP98YNZes+7+tFTmvDAK4Kp4rqTWvbVz 3tzEGZ/3na6oWULIi7eF4uMgzx/KcaA9HfJr6JH7n/ebximoR9 pXjvzl2dwITAP17F0gtm3UYJZ45Y0c7lxasAemaghzgaZpK3Pb RBvEHUR7KKCcGPFfXn53b0KiRHWu06Ezfa8h/LwOB6iWkZJCot JbnM8A5BQ91fxpt9gNR2vGI2jRsNzJV598T0onCd1v1r1ptPuw ABJDf1PXLnQwqC1FkuSY6CfMYV35pAWRavv/H53Vg8KRRlPc0r QQUArWWZiR/ZvJi8IuEr2FcY3q8AkGyBkmGH2u2Xa0sdlFC6Xb 8M7KTsmQmzZ7OLZ+bt7muaGrECH0A/wD7BrDJnuorLOGnDVXo1 oHVAEjgH06aGQ== X-Gm-Message-State: ALoCoQk31BX8rjCnPe+09jgvmDHU3Ox8tAS3sOBAL+nmQbd/GRsz5w/WA5Zd5FXdQSWAq31o5K5F The ahci_highbank_probe function is incorrectly marked as __init, which means it can get discarded at boot time, which might be a problem if for some reason the device only becomes operational after loading another module. Using __devinit instead avoids seeing this warning for every build: WARNING: vmlinux.o(.data+0xf7b0): Section mismatch in reference from the variable ahci_highbank_driver to the function .init.text:ahci_highbank_probe() The variable ahci_highbank_driver references the function __init ahci_highbank_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console Signed-off-by: Arnd Bergmann Cc: Mark Langsdorf Cc: Rob Herring Cc: Jeff Garzik --- drivers/ata/sata_highbank.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c index 0d7c4c2..36a141a 100644 --- a/drivers/ata/sata_highbank.c +++ b/drivers/ata/sata_highbank.c @@ -260,7 +260,7 @@ static const struct of_device_id ahci_of_match[] = { }; MODULE_DEVICE_TABLE(of, ahci_of_match); -static int __init ahci_highbank_probe(struct platform_device *pdev) +static int __devinit ahci_highbank_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct ahci_host_priv *hpriv;