Re: [PATCH] drivers:uio:fix section mismatch in uio_pdrv_genirq.c

Hans J. Koch
2011-08-22T14:20:21Z

[Added linux-mips to Cc:]

On Mon, Aug 22, 2011 at 08:50:41PM +0800, Wanlong Gao wrote:
> On Mon, 2011-08-22 at 14:03 +0200, Hans J. Koch wrote:
> > On Sat, Aug 20, 2011 at 12:12:07PM +0800, Wanlong Gao wrote:
> > > From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
> > >
> > > Remove the __devinitconst to fix the section mismatch.
> > >
> > > WARNING: drivers/uio/built-in.o(.data+0x2e8): Section mismatch in
> > > reference from the variable uio_pdrv_genirq to the variable
> >
> > Hmm, I don't see that section mismatch here when I do a
> > make CONFIG_DEBUG_SECTION_MISMATCH=y. How do you produce that?
>
> I produced in arch of mips like
> make O=../latest ARCH=mips CROSS_COMILE=mips-linux-

That seems to be a MIPS specific problem. It was tested OK on arm and x86.

>
> >
> > > .devinit.rodata:uio_of_genirq_match
> > > The variable uio_pdrv_genirq references
> > > the variable __devinitconst uio_of_genirq_match
> > > If the reference is valid then annotate the
> > > variable with __init* or __refdata (see linux/init.h) or name the
> > > variable:
> > > *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one,
> > > *_console
> >
> > Is just removing the __devinitconst really the best solution?
> >
> > Thanks,
> > Hans
>
> Do you have any better suggestions?

No, maybe the MIPS guys can shed some light on it.

Thanks,
Hans

>
> Thanks
> -Wanlong Gao
>
> >
> > >
> > > Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
> > > ---
> > > drivers/uio/uio_pdrv_genirq.c | 2 +-
> > > 1 files changed, 1 insertions(+), 1 deletions(-)
> > >
> > > diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
> > > index bae96d2..0b2ed71 100644
> > > --- a/drivers/uio/uio_pdrv_genirq.c
> > > +++ b/drivers/uio/uio_pdrv_genirq.c
> > > @@ -253,7 +253,7 @@ static const struct dev_pm_ops uio_pdrv_genirq_dev_pm_ops = {
> > > };
> > >
> > > #ifdef CONFIG_OF
> > > -static const struct of_device_id __devinitconst uio_of_genirq_match[] = {
> > > +static const struct of_device_id uio_of_genirq_match[] = {
> > > { /* empty for now */ },
> > > };
> > > MODULE_DEVICE_TABLE(of, uio_of_genirq_match);
> > > --
> > > 1.7.4.1
> > >
> > >
>
>
>