Message ID | 1473139963-7496-1-git-send-email-dja@axtens.net (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On 06/09/16 15:32, Daniel Axtens wrote: > Sparse checking revealed that it is no longer used. > There is an EXPORT_SYMBOL_GPL, but there's no header that > provides a prototype, so nothing should be using it anyway. > > Remove it. > > Signed-off-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
On Tuesday, September 6, 2016 3:32:39 PM CEST Daniel Axtens wrote: > Sparse checking revealed that it is no longer used. > There is an EXPORT_SYMBOL_GPL, but there's no header that > provides a prototype, so nothing should be using it anyway. > > Remove it. > > Signed-off-by: Daniel Axtens <dja@axtens.net> > Acked-by: Arnd Bergmann <arnd@arndb.de> Good catch! 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. Arnd
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 powerpc has the missing prototype warnings enabled and -Werror as well. Andrew Donellan was telling me there's a Coccinelle script that looks for things that are both static and EXPORTed - maybe that's worth following up on this point? Regards, Daniel
On 09/09/16 10:43, Daniel Axtens wrote: > Andrew Donellan was telling me there's a Coccinelle script that looks > for things that are both static and EXPORTed - maybe that's worth > following up on this point? https://github.com/coccinelle/coccinellery/blob/master/is_static/is_static.cocci
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
On Tue, 2016-06-09 at 05:32:39 UTC, Daniel Axtens wrote: > Sparse checking revealed that it is no longer used. > There is an EXPORT_SYMBOL_GPL, but there's no header that > provides a prototype, so nothing should be using it anyway. > > Remove it. > > Signed-off-by: Daniel Axtens <dja@axtens.net> > Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> > Acked-by: Arnd Bergmann <arnd@arndb.de> Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/bc42f1d9f5b31060a3c6b83983 cheers
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c index 9f609fc8d331..4d16b368b6f5 100644 --- a/arch/powerpc/platforms/cell/interrupt.c +++ b/arch/powerpc/platforms/cell/interrupt.c @@ -187,12 +187,6 @@ void iic_message_pass(int cpu, int msg) out_be64(&per_cpu(cpu_iic, cpu).regs->generate, (0xf - msg) << 4); } -struct irq_domain *iic_get_irq_host(int node) -{ - return iic_host; -} -EXPORT_SYMBOL_GPL(iic_get_irq_host); - static void iic_request_ipi(int msg) { int virq;
Sparse checking revealed that it is no longer used. There is an EXPORT_SYMBOL_GPL, but there's no header that provides a prototype, so nothing should be using it anyway. Remove it. Signed-off-by: Daniel Axtens <dja@axtens.net> --- arch/powerpc/platforms/cell/interrupt.c | 6 ------ 1 file changed, 6 deletions(-)