Re: [RFC][PATCH 0/4] SunRPC/NFS: Use no_printk() in

From: David Howells
Date: Thu Sep 26 2013 - 11:27:57 EST


J. Bruce Fields <bfields@xxxxxxxxxxxx> wrote:

> > Here's a series of patches to make SunRPC/NFS use no_printk() to implement
> > its null dfprintk() macro (ie. when RPC_DEBUG is disabled). This prevents
> > 'unused variable' errors from occurring when a variable is set only for
> > use in debugging statements and renders RPC/NFS_IFDEBUG unnecessary.
>
> Does this patch series fix any actual warnings? Or does it just change
> the way that we prevent the warnings?

It fixes some unused variable warnings introduced by NFS FS-Cache patches that
I have (a variable is set up and only passed to dfprintk() a couple of times).

I could change those patches to do something different, but I think changing
dfprintk() is actually the right solution as it will catch errors introduced
into dfprintk() calls that are currently reduced to do{}while(0) by the
preprocessor rather than letting the compiler chew on them and then reducing
them to nothing with the optimiser.

David
--
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/