lkml.org 
[lkml]   [2005]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [NET]: Shut up warnings in net/core/flow.c
From
From: Linus Torvalds <torvalds@osdl.org>
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-24 01:55    [W:0.043 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site