On Wed, 2008-02-20 at 09:23 -0800, Joe Perches wrote:
> On Wed, 2008-02-20 at 12:02 -0500, Trond Myklebust wrote:
> > > #ifdef DEBUG
> > > #define some_print_wrapper(fmt, arg...) \
> > > do { if (0) printk(KERN_DEBUG fmt, ##arg); } while (0)
> > > #else
> > > #define some_print_wrapper(fmt
On Wed, 2008-02-20 at 12:02 -0500, Trond Myklebust wrote:
> > #ifdef DEBUG
> > #define some_print_wrapper(fmt, arg...) \
> > do { if (0) printk(KERN_DEBUG fmt, ##arg); } while (0)
> > #else
> > #define some_print_wrapper(fmt, arg...) \
> > printk(KERN_DEBUG fmt, ##arg)
> > #endif
> Have
On Wed, 2008-02-20 at 08:36 -0800, Joe Perches wrote:
> On Wed, 2008-02-20 at 16:35 +0100, Patrick McHardy wrote:
> > Alternatively change the dprintk macro to behave similar like
> > pr_debug() and mark things like svc_print_addr() __pure, which
> > has the advantage that is still performs format
On Wed, 2008-02-20 at 19:27 +0300, Pavel Emelyanov wrote:
> Patrick McHardy wrote:
> > Joe Perches wrote:
> >> On Wed, 2008-02-20 at 07:29 -0800, Joe Perches wrote:
> >>
> >>> fs/nfsd/nfsproc.c: char buf[RPC_MAX_ADDRBUFLEN];
> >>> Perhaps there should be a DECLARE_RPC_BUF(buf) macr
On Wed, 2008-02-20 at 16:35 +0100, Patrick McHardy wrote:
> Alternatively change the dprintk macro to behave similar like
> pr_debug() and mark things like svc_print_addr() __pure, which
> has the advantage that is still performs format checking even
> if debugging is disabled.
I think it's better
Patrick McHardy wrote:
> Joe Perches wrote:
>> On Wed, 2008-02-20 at 07:29 -0800, Joe Perches wrote:
>>
>>> fs/nfsd/nfsproc.c: char buf[RPC_MAX_ADDRBUFLEN];
>>> Perhaps there should be a DECLARE_RPC_BUF(buf) macro?
>>> #define DECLARE_RPC_BUF(var) char var[MAC_BUF_SIZE] __maybe_unus
> Sigh... Why is that better than a strait declaration with attribute?
If at some point there's a gcc'ism to remove a maybe_unused
variable from the stack declaration, you only have change
the macro.
cheers, Joe
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of
Joe Perches wrote:
> On Wed, 2008-02-20 at 17:02 +0300, Pavel Emelyanov wrote:
>> There are tree places, which declare the char buf[...] on the stack
>> to push it later into dprintk(). Since the dprintk sometimes (if the
>> CONFIG_SYSCTL=n) becomes an empty do { } while (0) stub, these buffers
>>
Joe Perches wrote:
On Wed, 2008-02-20 at 07:29 -0800, Joe Perches wrote:
fs/nfsd/nfsproc.c: char buf[RPC_MAX_ADDRBUFLEN];
Perhaps there should be a DECLARE_RPC_BUF(buf) macro?
#define DECLARE_RPC_BUF(var) char var[MAC_BUF_SIZE] __maybe_unused
Make that:
#define DECLARE_RP
On Wed, 2008-02-20 at 07:29 -0800, Joe Perches wrote:
> fs/nfsd/nfsproc.c: char buf[RPC_MAX_ADDRBUFLEN];
> Perhaps there should be a DECLARE_RPC_BUF(buf) macro?
> #define DECLARE_RPC_BUF(var) char var[MAC_BUF_SIZE] __maybe_unused
Make that:
#define DECLARE_RPC_BUF(var) char var[RPC_M
On Wed, 2008-02-20 at 17:02 +0300, Pavel Emelyanov wrote:
> There are tree places, which declare the char buf[...] on the stack
> to push it later into dprintk(). Since the dprintk sometimes (if the
> CONFIG_SYSCTL=n) becomes an empty do { } while (0) stub, these buffers
> cause gcc to produce app
There are tree places, which declare the char buf[...] on the stack
to push it later into dprintk(). Since the dprintk sometimes (if the
CONFIG_SYSCTL=n) becomes an empty do { } while (0) stub, these buffers
cause gcc to produce appropriate warnings.
Mark them as __maybe_unused.
Signed-off-by: P
12 matches
Mail list logo