From: Tom Talpey <tmtalpey@gmail.com>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: trivial@kernel.org, linux-kernel@vger.kernel.org,
Trond Myklebust <Trond.Myklebust@netapp.com>
Subject: Re: [PATCH] Use formatting of module name in SUNRPC
Date: Tue, 02 Jun 2009 13:41:54 -0400 [thread overview]
Message-ID: <4A256462.10600@gmail.com> (raw)
In-Reply-To: <20090527175955.GB8969@blimp.localdomain>
On 5/27/2009 1:59 PM, Alex Riesen wrote:
> Besides, the old code caused gcc-4.3.3 to produce the warning:
> "format not a string literal and no format arguments"
>
> Signed-off-by: Alex Riesen<raa.lkml@gmail.com>
> ---
> net/sunrpc/xprt.c | 5 +----
> 1 files changed, 1 insertions(+), 4 deletions(-)
>
> diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
> index 06ca058..82f62fd 100644
> --- a/net/sunrpc/xprt.c
> +++ b/net/sunrpc/xprt.c
> @@ -162,7 +162,6 @@ EXPORT_SYMBOL_GPL(xprt_unregister_transport);
> int xprt_load_transport(const char *transport_name)
> {
> struct xprt_class *t;
> - char module_name[sizeof t->name + 5];
> int result;
>
> result = 0;
> @@ -174,9 +173,7 @@ int xprt_load_transport(const char *transport_name)
> }
> }
> spin_unlock(&xprt_list_lock);
> - strcpy(module_name, "xprt");
> - strncat(module_name, transport_name, sizeof t->name);
> - result = request_module(module_name);
> + result = request_module("xprt%s", transport_name);
> out:
> return result;
> }
Never saw the warning while compiling, but I'm fine with the
proposed change, besides, it's cleaner. Ack.
Tom.
next prev parent reply other threads:[~2009-06-02 17:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-27 17:59 [PATCH] Use formatting of module name in SUNRPC Alex Riesen
2009-06-02 17:41 ` Tom Talpey [this message]
2009-06-23 8:55 ` Jiri Kosina
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=4A256462.10600@gmail.com \
--to=tmtalpey@gmail.com \
--cc=Trond.Myklebust@netapp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=raa.lkml@gmail.com \
--cc=trivial@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.