Re: [PATCH 00/11] Add support for RaspberryPi RP1 PCI device using a DT overlay

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > > WARNING: externs should be avoided in .c files
> > > #331: FILE: drivers/misc/rp1/rp1-pci.c:58:
> > > +extern char __dtbo_rp1_pci_begin[];
> > > 
> > > True, but in this case we don't have a symbol that should be exported to other
> > > translation units, it just needs to be referenced inside the driver and
> > > consumed locally. Hence it would be better to place the extern in .c file.
> >  
> > Did you try making it static.
> 
> The dtso is compiled into an obj and linked with the driver which is in
> a different transaltion unit. I'm not aware on other ways to include that
> symbol without declaring it extern (the exception being some hackery 
> trick that compile the dtso into a .c file to be included into the driver
> main source file). 
> Or probably I'm not seeing what you are proposing, could you please elaborate
> on that?

Sorry, i jumped to the wrong conclusion. Often it is missing static
keyword which causes warnings. However, you say it needs to be global
scope.

Reading the warning again:

> > > WARNING: externs should be avoided in .c files

It is wanting you to put it in a .h file, which then gets
included by the two users.

	Andrew




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux