lkml.org 
[lkml]   [2005]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [NET]: Shut up warnings in net/core/flow.c


On Wed, 23 Nov 2005, David S. Miller wrote:
>
> 1) Mark all IPI functions with ifdef CONFIG_SMP, or
> 2) Mark them with __attribute__((__unused__))) which is what
> the net/core/flow.c case does

We could certainly do some of both.

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).

How does that feel? It would waste a bit of compiler time to even look at
the function, but at least it wouldn't warn, and they'd get thrown away
_without_ having to rely on a smart compiler.

Quite frankly, every time we rely on some really smart gcc feature, we're
burnt.

Linus
-
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: 2009-11-18 23:46    [W:0.051 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site