[PATCH v2 1/5] powerpc/cell: drop unused iic_get_irq_host()

Arnd Bergmann arnd at arndb.de
Fri Sep 9 17:42:06 AEST 2016


On Friday, September 9, 2016 10:43:33 AM CEST Daniel Axtens wrote:
> Hi Arnd,
> 
> > I'm currently experimenting with a patch that adds -Wmissing-declaration to
> > the normal kernel CFLAGS for everyone, and fixing up the warnings I get with
> > that on ARM.
> >
> > Are you looking at all the powerpc specific code? If we can catch all the
> > existing warnings for some of the major architectures, we can hopefully
> > enable this in the mainline kernel at some point so we don't need sparse
> > for it any more.
> 
> At the moment I'm just trying to squash sparse warnings on powerpc. This
> particular catch came from making something static via a dodgy python
> script and then Andrew finding it was EXPORTed. Removing the EXPORT
> threw the warning - so it's a bit more complex than just a sparse
> warning.

I think we just need to pick one of these three cases each time
we see the warning:

- if it's used elsewhere, include the correct header
- if it's not used at all, remove the function
- if it's only used in the same file, make it static.
- if it's exported, decide whether to add a declaration in a
  header or remove the function along with the export.

> I think powerpc has the missing prototype warnings enabled and -Werror
> as well.

All architectures have -Wstrict-prototypes enabled, but not
-Wmissing-prototypes, -Wmissing-declarations or
-Wmissing-variable-declarations, which are similar to what sparse
does.

	Arnd


More information about the Linuxppc-dev mailing list