2010-04-27 21:17:37

by Andrew Morton

[permalink] [raw]
Subject: [patch 1/1] sunrpc: use formatting of module name in SUNRPC

From: Alex Riesen <[email protected]>

gcc-4.3.3 produces the warning:
"format not a string literal and no format arguments"

Signed-off-by: Alex Riesen <[email protected]>
Cc: Trond Myklebust <[email protected]>
Cc: Chuck Lever <[email protected]>
Cc: David S. Miller <[email protected]>
Acked-by: Tom Talpey <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

net/sunrpc/xprt.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff -puN net/sunrpc/xprt.c~sunrpc-use-formatting-of-module-name-in-sunrpc net/sunrpc/xprt.c
--- a/net/sunrpc/xprt.c~sunrpc-use-formatting-of-module-name-in-sunrpc
+++ a/net/sunrpc/xprt.c
@@ -165,7 +165,6 @@ EXPORT_SYMBOL_GPL(xprt_unregister_transp
int xprt_load_transport(const char *transport_name)
{
struct xprt_class *t;
- char module_name[sizeof t->name + 5];
int result;

result = 0;
@@ -177,9 +176,7 @@ int xprt_load_transport(const char *tran
}
}
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;
}
_


2010-04-28 07:40:38

by Alex Riesen

[permalink] [raw]
Subject: Re: [patch 1/1] sunrpc: use formatting of module name in SUNRPC

On Tue, Apr 27, 2010 at 23:15, <[email protected]> wrote:
> From: Alex Riesen <[email protected]>
>
> gcc-4.3.3 produces the warning:
> =C2=A0"format not a string literal and no format arguments"
>
> Signed-off-by: Alex Riesen <[email protected]>
> Cc: Trond Myklebust <[email protected]>
> Cc: Chuck Lever <[email protected]>
> Cc: David S. Miller <[email protected]>
> Acked-by: Tom Talpey <[email protected]>
> Signed-off-by: Andrew Morton <[email protected]>
> ---
>
> =C2=A0net/sunrpc/xprt.c | =C2=A0 =C2=A05 +----
> =C2=A01 file changed, 1 insertion(+), 4 deletions(-)
>

This is one tough little patch... 2 years and counting...

2010-04-28 14:42:12

by Andrew Morton

[permalink] [raw]
Subject: Re: [patch 1/1] sunrpc: use formatting of module name in SUNRPC

On Wed, 28 Apr 2010 09:40:36 +0200 Alex Riesen <[email protected]> wrote:

> On Tue, Apr 27, 2010 at 23:15, <[email protected]> wrote:
> > From: Alex Riesen <[email protected]>
> >
> > gcc-4.3.3 produces the warning:
> > __"format not a string literal and no format arguments"
> >
> > Signed-off-by: Alex Riesen <[email protected]>
> > Cc: Trond Myklebust <[email protected]>
> > Cc: Chuck Lever <[email protected]>
> > Cc: David S. Miller <[email protected]>
> > Acked-by: Tom Talpey <[email protected]>
> > Signed-off-by: Andrew Morton <[email protected]>
> > ---
> >
> > __net/sunrpc/xprt.c | __ __5 +----
> > __1 file changed, 1 insertion(+), 4 deletions(-)
> >
>
> This is one tough little patch... 2 years and counting...

heh. I've only had it since June '09.

I'll merge it into 2.6.35-rc1.

2010-04-28 19:49:11

by Alex Riesen

[permalink] [raw]
Subject: Re: [patch 1/1] sunrpc: use formatting of module name in SUNRPC

On Wed, Apr 28, 2010 at 13:39, Andrew Morton <[email protected]=
> wrote:
> On Wed, 28 Apr 2010 09:40:36 +0200 Alex Riesen <[email protected]> w=
rote:
>> > __net/sunrpc/xprt.c | __ __5 +----
>> > __1 file changed, 1 insertion(+), 4 deletions(-)
>> >
>>
>> This is one tough little patch... 2 years and counting...
>
> heh. =C2=A0I've only had it since June '09.
>
> I'll merge it into 2.6.35-rc1.
>

That's because I was overly pessimistic. gcc-4.3.3 only exists since
24 Jan, 2009.
I just have the change (and other request_module name formatting patche=
s)
in my trees already for quite some time...