[PATCH 056/493] edac: remove use of __devexit_p

Borislav Petkov bp at alien8.de
Fri Nov 23 21:06:35 EST 2012


On Thu, Nov 22, 2012 at 10:22:22AM -0800, Greg KH wrote:
> On Thu, Nov 22, 2012 at 02:44:51PM +0100, Borislav Petkov wrote:
> > On Mon, Nov 19, 2012 at 01:20:05PM -0500, Bill Pemberton wrote:
> > > CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
> > > needed.
> > 
> > Erm, I don't understand. __devexit_p is defined also for modules not
> > only for CONFIG_HOTPLUG:
> > 
> > #if defined(MODULE) || defined(CONFIG_HOTPLUG)
> > #define __devexit_p(x) x
> > #else
> > #define __devexit_p(x) NULL
> > #endif
> > 
> > AFAICT, we cannot remove it yet no?
> 
> If MODULE is defined, it defaults to nothing.  And now that
> CONFIG_HOTPLUG is always set to Y, this always defaults to nothing.

Huh, if MODULE is defined, __devexit_p(x) evaluates to the function name
'x' itself, AFAICT.

So, if MODULE is defined and we have a reference from retained sections
to a discarded section (I'm rereading the comment over __devexit_p in
<include/linux/init.h> btw) then we'll get linker errors so we'd still
need the ifdef thing, no?

What am I missing?

Thanks.

-- 
Regards/Gruss,
Boris.


More information about the Linuxppc-dev mailing list