Re: [PATCH] pci/msi: Use #ifdefs instead of weak functions

From: Jesse Barnes
Date: Fri Feb 13 2009 - 16:14:04 EST


On Sunday, January 18, 2009 4:31 pm Michael Ellerman wrote:
> Weak functions aren't all they're cracked up to be. They lead to
> incorrect binaries with some toolchains, they require us to have empty
> functions we otherwise wouldn't, and the unused code is not elided
> (as of gcc 4.3.2 anyway).
>
> So replace the weak MSI arch hooks with the #define foo foo idiom. We no
> longer need empty versions of arch_setup/teardown_msi_irq().
>
> This is less source (by 1 line!), and results in smaller binaries too:
>
> text data bss dec hex filename
> 9354300 1693916 678424 11726640 b2ef30 build/powerpc/vmlinux-before
> 9354052 1693852 678424 11726328 b2edf8 build/powerpc/vmlinux-after
>
> Also smaller on x86_64 and arm (iop13xx).
>
> Signed-off-by: Michael Ellerman <michael@xxxxxxxxxxxxxx>

Applied to my linux-next branch, thanks Michael.


--
Jesse Barnes, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/