From: "J. Bruce Fields" <bfields@fieldses.org>
To: Russell King <rmk@arm.linux.org.uk>
Cc: "J. Bruce Fields" <bfields@redhat.com>,
linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Commit 7032a3dd9 (svcrpc: demote some printks to a dprintk) adds warnings
Date: Tue, 8 Jan 2013 16:28:16 -0500 [thread overview]
Message-ID: <20130108212816.GA24572@fieldses.org> (raw)
In-Reply-To: <20130108121300.GA2251@flint.arm.linux.org.uk>
On Tue, Jan 08, 2013 at 12:13:00PM +0000, Russell King wrote:
> Bruce,
>
> Your commit below causes a new build warning in the kernel:
>
> net/sunrpc/svc.c: In function 'svc_printk':
> net/sunrpc/svc.c:1050:7: warning: unused variable 'buf'
>
> which affects all ARM builds; it is the only warning in a lot of cases.
> Please can you resolve this new warning using whatever method you feel
> is most appropriate, thanks.
Bah, these "unused variable" warnings for buffers unused in the
!RPC_DEBUG case keep popping up.
I guess I'll commit the following for 3.9.
--b.
commit 31e815406973ef86e2e42a36086d65afb8f4e396
Author: J. Bruce Fields <bfields@redhat.com>
Date: Tue Jan 8 16:22:15 2013 -0500
svcrpc: silence "unused variable" warning in !RPC_DEBUG case
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index dbf12ac..b9ba2a8 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -1042,6 +1042,7 @@ static void svc_unregister(const struct svc_serv *serv, struct net *net)
/*
* dprintk the given error with the address of the client that caused it.
*/
+#ifdef RPC_DEBUG
static __printf(2, 3)
void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...)
{
@@ -1058,6 +1059,9 @@ void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...)
va_end(args);
}
+#else
+static __printf(2,3) void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...) {}
+#endif
/*
* Common routine for processing the RPC request.
prev parent reply other threads:[~2013-01-08 21:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-08 12:13 Commit 7032a3dd9 (svcrpc: demote some printks to a dprintk) adds warnings Russell King
2013-01-08 21:28 ` J. Bruce Fields [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130108212816.GA24572@fieldses.org \
--to=bfields@fieldses.org \
--cc=bfields@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox