Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752561AbbGMJqz (ORCPT ); Mon, 13 Jul 2015 05:46:55 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:8608 "EHLO imgpgp01.kl.imgtec.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752501AbbGMJqx (ORCPT ); Mon, 13 Jul 2015 05:46:53 -0400 X-PGP-Universal: processed; by imgpgp01.kl.imgtec.org on Mon, 13 Jul 2015 10:46:52 +0100 Message-ID: <55A38910.1050509@imgtec.com> Date: Mon, 13 Jul 2015 10:46:56 +0100 From: James Hogan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Bjorn Helgaas , Ralf Baechle CC: Andrew Bresticker , , Subject: Re: [PATCH 2/9] MIPS: Remove "weak" from platform_maar_init() declaration References: <20150712230402.11177.11848.stgit@bhelgaas-glaptop2.roam.corp.google.com> <20150712231104.11177.69594.stgit@bhelgaas-glaptop2.roam.corp.google.com> In-Reply-To: <20150712231104.11177.69594.stgit@bhelgaas-glaptop2.roam.corp.google.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5mbjVbu3C0Bk9sL1dv0FGw6dsdFu9DBwJ" X-Originating-IP: [192.168.154.110] X-ESG-ENCRYPT-TAG: f107b6f Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2966 Lines: 85 --5mbjVbu3C0Bk9sL1dv0FGw6dsdFu9DBwJ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 13/07/15 00:11, Bjorn Helgaas wrote: > Weak header file declarations are error-prone because they make every > definition weak, and the linker chooses one based on link order (see > 10629d711ed7 ("PCI: Remove __weak annotation from pcibios_get_phb_of_no= de > decl")). >=20 > platform_maar_init() is defined in: >=20 > - arch/mips/mm/init.c (where it is marked "weak") > - arch/mips/mti-malta/malta-memory.c (without annotation) >=20 > The "weak" attribute on the platform_maar_init() extern declaration app= lies > to the platform-specific definition in arch/mips/mti-malta/malta-memory= =2Ec, > so both definitions are weak, and which one we get depends on link orde= r. >=20 > Remove the "weak" attribute from the declaration. That makes the malta= > definition strong, so it will always be preferred if it is present. >=20 > Signed-off-by: Bjorn Helgaas > CC: linux-mips@linux-mips.org Reviewed-by: James Hogan Cheers James > --- > arch/mips/include/asm/maar.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/arch/mips/include/asm/maar.h b/arch/mips/include/asm/maar.= h > index 6c62b0f..b02891f 100644 > --- a/arch/mips/include/asm/maar.h > +++ b/arch/mips/include/asm/maar.h > @@ -26,7 +26,7 @@ > * > * Return: The number of MAAR pairs configured. > */ > -unsigned __weak platform_maar_init(unsigned num_pairs); > +unsigned platform_maar_init(unsigned num_pairs); > =20 > /** > * write_maar_pair() - write to a pair of MAARs >=20 --5mbjVbu3C0Bk9sL1dv0FGw6dsdFu9DBwJ 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 iQIcBAEBAgAGBQJVo4kQAAoJEGwLaZPeOHZ62RoP/0wwb6YKeRJOHCKsPi3rEGyn zzmjVwU1TzK+wGjr1E4ZWy8+omHEcF2OUhFPOJpb27SPiOwwJ3IwO3EEnAnkrrqK udcsljy7O3L4yYqkiJbHZwDrIbJ9iHRWDyzFATMD3AII11cPv7XisbFUtIDbnD0V EDV3qK+1m0msrCNruZp2u+nau5m9hhUQZr2KDnKb6AB5IHDdn/THP2+smcXpL1E3 BUXDs4+6cq8RnIHPUZnhAT68JBfa6CCbU9tQ4Sd0bCiCSXeCIXmsV4R03uJDj3Ws QOR8WZmw/MT66F9/5IGl22WXe3Unvc4ITPVyAbH+AJN2Z+SFldXLBzEPFrun1iR3 U4iEGMgrqit4VCHsw9Ctkmkphe+MNvMvbNtAWJh2QbFwOyhbAzU7+WoCPJRu3YIy EEFXSpFkZhdDvEhlV5fCks8KnvzgcD4w4ukByEFQ08eeTOYPVJy1yklWm2o4lSBT PUOteNS/Zs7eydiV5Vwwd0Xp8CXpfeayOhB+REjYhZUm4iPdwNeOEuWwuXQVUgzD QOa4pVmFQV1uoyt3llzEcW2olf/W+pGdr7gov1TI0AlQnsSCM8QXngnERVEKxT5k ckKfqjgdIsiogalsfrpPUVvSoxOxZRzj6dtVsHHJUgMBsmAaqvhuflWo6qBne/VJ 9nOM0uE60EKsO9k363Y/ =iXWp -----END PGP SIGNATURE----- --5mbjVbu3C0Bk9sL1dv0FGw6dsdFu9DBwJ-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/