Skip to contentSkip to conversation

sunrpc: use formatting of module name in SUNRPC

PATCH In review [email protected] 1 participant 1 message Feb 2, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 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"

---

 net/sunrpc/xprt.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
net/sunrpc/xprt.c renamed from net/sunrpc/xprt.c~sunrpc-use-formatting-of-module-name-in-sunrpc +1 -4
diff -puN net/sunrpc/xprt.c~sunrpc-use-formatting-of-module-name-in-sunrpc 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;
 }

_