lkml.org 
[lkml]   [2009]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Use formatting of module name in SUNRPC
On Wed, 27 May 2009, 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;
> }

Trond, are you planning to take this one through your tree?

Thanks,

--
Jiri Kosina
SUSE Labs



\
 
 \ /
  Last update: 2009-06-23 10:57    [W:0.314 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site