Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753937AbcCOVpN (ORCPT ); Tue, 15 Mar 2016 17:45:13 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:57280 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752613AbcCOVpJ (ORCPT ); Tue, 15 Mar 2016 17:45:09 -0400 From: Arnd Bergmann To: Alexandre Belloni Cc: Arnd Bergmann , Alessandro Zummo , Oleksij Rempel , rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: [PATCH] rtc: asm9260: remove incorrect __init/__exit annotations Date: Tue, 15 Mar 2016 22:44:31 +0100 Message-Id: <1458078287-586232-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:pKhpL78AIH36McXP5yGnot4o8spUjQYiMluxaVKLykRzPtLzH0u T2yvKXcnhpSOaCH/dDh2KKVONoBIBKC2UoYOKOhANcwbD27xbinVqpIjpus+Wf6E91wXnwQ nXaqq1jdDF1uFIVylqNb8xSB4s43d+tAVIpO8P4AIR9PthT9JnvTxDb7PbGmJeC16F8MXq1 8wOxitFCiWTCI2Bfkg2Cg== X-UI-Out-Filterresults: notjunk:1;V01:K0:sf0qbs5+mZ0=:noeS6E4QUVw9eEw5LgUQvq A4KIk4LLdLjx+hJPLuidequjV+sQ8Y2PsntjHVJQmLZFTY+HPtK3QQsIylbF43boz7G3qfIx9 zp2nejVXwbuW65nvSW5aydXcqKv5BX6aKHDOuk55nBMJWK0nurRfYCD7SfjnvHZdt43Qm4Kbe 3NefFV6MDWYfCxnoUC1zY4DJ5cBD4oc+2QmBHYPq6WD2PVLqR9siWC4ODB7eeJyMBEc12QKVY PmXw9nwVt4AnlNyreObSOIUs4x7Nn0zivHLvQFGyC+nlxgSkzuTKiKTMvfcpSJnTpFxNR5Kqe wZlC3Ni8sAASLmmO5AnAbqCLWp3wShzJHfe6EavImaJRYCVEL6F4VJErAk/h/e+ujHbktN/uF j1s/ViTOM3K3uKJZTy0CvoQRB+zCn+Cjn42yTUmEcEWLkt/aDS830HbRuwJ3w0pOpHWzmeZ2n FVBVPcXHvD3Log7c9+3BC0jO52jvHXzHZmcy0yzZYjW4i13Nnz5hIci/svvTxuilwJCJhLzdB jUa47Ths4jvtiSK5st6lp10C3qLQOvq0Efs6SMa2Q+zPMbYvKoQ67iJwcaxWUkTJ3eAUP6OxG Wc8ZlVSEMuXGzgX2N1UVNLP7/ff2zQQEwD2cOKWkFv68gaMRraDvyosMLP8n97RxOzpySdTKf pKloCcsM0ixVO7SK33MiKCHavxeFk7uyjqhL/cR0BGD9v5aZpNxM8Tqk+UUh/H1LJr8c= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1556 Lines: 43 The probe and remove callbacks of the platform driver are marked __init and __exit, respectively. However, this is not a correct way to annotate them, as it will result in those sections to be discarded at link time or after boot, while we can actually call them again based on manual unbinding, or deferred probing. Kbuild warns about the problem: WARNING: drivers/rtc/rtc-asm9260.o(.data+0x0): Section mismatch in reference from the variable asm9260_rtc_driver to the function .init.text:asm9260_rtc_probe() This removes the annotations, so we no longer branch into missing code and avoid the warning. Signed-off-by: Arnd Bergmann Fixes: 125e550fd257 ("rtc: add Alphascale asm9260 driver") --- drivers/rtc/rtc-asm9260.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-asm9260.c b/drivers/rtc/rtc-asm9260.c index 14e08c4c1a01..355fdb97a006 100644 --- a/drivers/rtc/rtc-asm9260.c +++ b/drivers/rtc/rtc-asm9260.c @@ -255,7 +255,7 @@ static const struct rtc_class_ops asm9260_rtc_ops = { .alarm_irq_enable = asm9260_alarm_irq_enable, }; -static int __init asm9260_rtc_probe(struct platform_device *pdev) +static int asm9260_rtc_probe(struct platform_device *pdev) { struct asm9260_rtc_priv *priv; struct device *dev = &pdev->dev; @@ -323,7 +323,7 @@ err_return: return ret; } -static int __exit asm9260_rtc_remove(struct platform_device *pdev) +static int asm9260_rtc_remove(struct platform_device *pdev) { struct asm9260_rtc_priv *priv = platform_get_drvdata(pdev); -- 2.7.0