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

From: David S. Miller
Date: Wed Nov 23 2005 - 19:52:52 EST


From: Linus Torvalds <torvalds@xxxxxxxx>
Date: Wed, 23 Nov 2005 15:29:53 -0800 (PST)

> Add a new "__smp_only__" thing, and do something like
>
> #ifdef CONFIG_SMP
> #define __smp_only__
> #else
> #define __smp_only \
> __attribute__((__unused__, section("discard")))
> #endif
>
> (Yeah, I didn't look up the section syntax, because I'm lazy, but you get
> the point - put it explicitly in some section that will be thrown away,
> and that we can make the build-checking tools verify isn't linked to).

If we mark it correctly, the linker will not even try to link it in to
the final object, and we'll get a flat out link failure.

Yes, something like this would be great.
-
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/