Re: [NET]: Shut up warnings in net/core/flow.c

From: David S. Miller
Date: Wed Nov 23 2005 - 16:24:12 EST


From: Arjan van de Ven <arjan@xxxxxxxxxxxxx>
Date: Wed, 23 Nov 2005 10:11:24 +0100

> it can.. but only if we start using -ffunction-sections in the CFLAGS
> (or make all of these functions static I suppose and reenable
> -funit-at-a-time, which can be done for gcc 4.x only)

I actually just scanned the tree, and outside of files that
only get built on CONFIG_SMP (namely, arch/${ARCH}/kernel/smp{,boot}.c)
the IPI functions were %99 marked static already and the remaining
%1 should be marked static. The cases in that %1 group are:

arch/mips/sibyte/sb1250/prom.c:prom_cpu0_exit()
arch/powerpc/kernel/machine_kexec_64.c:kexec_smp_down()

And as stated, those two can just be marked static right now.

So we could very easily remove the CONFIG_SMP ifdefs, but the
-funit-at-a-time requirement to get gcc to not emit unused static
functions is very unfortunate.

Even tricks like marking the IPI function "inline" don't work since
we're taking the address of the function.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/