[PATCH] leds: provide helper to register "leds-gpio" devices
Russell King - ARM Linux
linux at arm.linux.org.uk
Tue Apr 19 19:24:20 EDT 2011
On Tue, Apr 19, 2011 at 04:19:13PM -0700, Andrew Morton wrote:
> On Tue, 5 Apr 2011 17:33:39 +0100
> Russell King - ARM Linux <linux at arm.linux.org.uk> wrote:
> > On Tue, Apr 05, 2011 at 10:37:35AM +0200, Uwe Kleine-K__nig wrote:
> > > +struct platform_device *__init gpio_led_register_device(
> > > + const struct gpio_led_platform_data *pdata);
> > Please don't add __init annotations to declarations.
> A year or so ago we had to *add* an __init to a declaration, because
> one architecture was generating a short-mode-addressing relative branch
> to the callee, assuming the target was in the same section as the call
> site. When the linker went to resolve the branch, it discovered that
> the target was in fact in a different section and was too far away to
> be able to use the short-mode addressing. IIRC, that architecture was
I'm not aware of ARM ever requiring that. If it was, we'd have to add
a heck of a lot of those annotations. And those annotations don't tell
the compiler that it might be far away.
We _do_ have a problem if someone decides to include a big ramdisk or
initramfs image in the discarded section, which is something I have a
patch kicking around to completely change the vmlinux layout to resolve.
That's taking something of a low priority at the moment though as we've
been turned upside down by Linus...
More information about the linux-arm-kernel