Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965933AbcCPJd2 (ORCPT ); Wed, 16 Mar 2016 05:33:28 -0400 Received: from mout.gmx.net ([212.227.17.20]:58052 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751379AbcCPJd0 (ORCPT ); Wed, 16 Mar 2016 05:33:26 -0400 Subject: Re: [PATCH] rtc: asm9260: remove incorrect __init/__exit annotations To: Alexandre Belloni , Arnd Bergmann References: <1458078287-586232-1-git-send-email-arnd@arndb.de> <20160316093008.GB20227@piout.net> Cc: Alessandro Zummo , rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org From: Oleksij Rempel Message-ID: <56E92854.6060705@rempel-privat.de> Date: Wed, 16 Mar 2016 10:33:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160316093008.GB20227@piout.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vuJDFXtqKoTnh3HxbkX1Ak6OnEfWGJxx2" X-Provags-ID: V03:K0:Vuo86D6igEe8r33L2+WwvHPgWVBCTIIfxxRvR2udAlJfcRzZZrS hUX7TBCzIcSKCLPRXNFnPQtmO7TgS/hU3Xr17h1gWCz/1zQD8Rcj3YORxt8F7y/WSy88gga fV44zP9Rz8/jzmf/6dWFwRA/O49JQv+IrUWP+HFnixvSNOuhVIgCzhtvc8227T6QZwO3QL7 kGq7NMGU6e58nMlirYO9w== X-UI-Out-Filterresults: notjunk:1;V01:K0:+jAp6pW7324=:e0xoJL5LF1+uPzGlBQlid0 pOf5C2EeQQVF3RTPf4sokXXCIcwQvxfkn3TOpO41Nb55K93kwVU3cWjJ0Ti9Rl9bJSI41FN++ 9aGnkyplXU9mNeUqHhepgfa7DBuEKuoT4N44VaMF5xSdTg5g6GlQFOFMWYgurGr4im+/qtGxR 4eFrNGAOqK2ll8GKcXsFZZbBmMAyq4BhnWpLjwOxajHNfyeKTLYvXsM37LaVp46nCUOssRjrz /ugdlhguR1Izg1boVaXsgHcj24SiX9tHuLEzzn5JdgXPytM/IhLQjVixNp98g+vonXb+wZGDE 0/xT67C+dbdjDzHixLjqZ0FmupimSNhMZqeCxvRzWrzvBfFAhPNh/5Li4JU33MeXysKzvpxJf v4oMjOXSqay8BOKonFgfW/cozxD5MBFkP/9an1AmAeUKuQS5w+0h1F1MvKJ9kFdBPaOm0tAiw sG1E/+glGLEdZdAG8YvBPr4Rp5za1KLWiW6nuX5n5k0iQmfVAvNtzf5farIdgmS9VmGvtRU+X nKL8QH9MzZUJdIIl0ij9h8/pxSgPAhcb4HBJAVLkj4nNdyKlgKFwHDpAlQUsrmPIAgCr2gVGg hdWVzLyjIdFlEQt85TLHkompFrP6AjHwTAF+xzORpkO4CkO+/evYgKowZP1sYaRevQe7u9Skq jRd4MCXrDtMGYHv+qaErgVedwd0eaO7hmEdFcZl1dDgxTZ9SZSjkPjVNwmlF1xDTRFNs+RRAl gE2Gqo+RDrFsaseQWaz19PONIIpW4N0GIbFZjUNdApIP5UIKiZZqLHi5QPs= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3376 Lines: 103 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vuJDFXtqKoTnh3HxbkX1Ak6OnEfWGJxx2 Content-Type: multipart/mixed; boundary="q9BmlxwIi3sJSaUGuAeoa8HwG4Q2Agalg" From: Oleksij Rempel To: Alexandre Belloni , Arnd Bergmann Cc: Alessandro Zummo , rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org Message-ID: <56E92854.6060705@rempel-privat.de> Subject: Re: [PATCH] rtc: asm9260: remove incorrect __init/__exit annotations References: <1458078287-586232-1-git-send-email-arnd@arndb.de> <20160316093008.GB20227@piout.net> In-Reply-To: <20160316093008.GB20227@piout.net> --q9BmlxwIi3sJSaUGuAeoa8HwG4Q2Agalg Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Am 16.03.2016 um 10:30 schrieb Alexandre Belloni: > Hi, >=20 > On 15/03/2016 at 22:44:31 +0100, Arnd Bergmann wrote : >> The probe and remove callbacks of the platform driver are marked __ini= t >> and __exit, respectively. However, this is not a correct way to annota= te >> 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 ref= erence from the variable asm9260_rtc_driver to the function .init.text:as= m9260_rtc_probe() >> >=20 > I'm not sure why this was not caught before. I'm not building all the > platform but that one should have been easy to find... Sorry, i'm working on monolit kernel. Haven't seen this warning before :(= >> 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 = =3D { >> .alarm_irq_enable =3D asm9260_alarm_irq_enable, >> }; >> =20 >> -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 =3D &pdev->dev; >> @@ -323,7 +323,7 @@ err_return: >> return ret; >> } >> =20 >> -static int __exit asm9260_rtc_remove(struct platform_device *pdev) >> +static int asm9260_rtc_remove(struct platform_device *pdev) >> { >> struct asm9260_rtc_priv *priv =3D platform_get_drvdata(pdev); >> =20 >> --=20 >> 2.7.0 >> >=20 --=20 Regards, Oleksij --q9BmlxwIi3sJSaUGuAeoa8HwG4Q2Agalg-- --vuJDFXtqKoTnh3HxbkX1Ak6OnEfWGJxx2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iF4EAREIAAYFAlbpKFkACgkQHwImuRkmbWlinQD/ZkxW/8Bu1Y/OSnl/WxOJ8J/N kbvk0TB+Qsismu9PAdcBAI1XYEgpDyy2VkqgMrNU9qJ3hAncTjbzQO/4uzP50GH4 =HD5V -----END PGP SIGNATURE----- --vuJDFXtqKoTnh3HxbkX1Ak6OnEfWGJxx2--