All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Use formatting of module name in crypto API
@ 2009-05-27 17:51 Alex Riesen
  2009-06-02  4:13 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Riesen @ 2009-05-27 17:51 UTC (permalink / raw)
  To: trivial; +Cc: linux-kernel, Herbert Xu

Besdies, for the old code, gcc-4.3.3 produced this warning:
  "format not a string literal and no format arguments"

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 crypto/api.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/crypto/api.c b/crypto/api.c
index fd2545d..fe98517 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -217,14 +217,11 @@ struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask)
 
 	alg = crypto_alg_lookup(name, type, mask);
 	if (!alg) {
-		char tmp[CRYPTO_MAX_ALG_NAME];
-
-		request_module(name);
+		request_module("%s", name);
 
 		if (!((type ^ CRYPTO_ALG_NEED_FALLBACK) & mask &
-		      CRYPTO_ALG_NEED_FALLBACK) &&
-		    snprintf(tmp, sizeof(tmp), "%s-all", name) < sizeof(tmp))
-			request_module(tmp);
+		      CRYPTO_ALG_NEED_FALLBACK))
+			request_module("%s-all", name);
 
 		alg = crypto_alg_lookup(name, type, mask);
 	}
-- 
1.6.3.1.197.g41544


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Use formatting of module name in crypto API
  2009-05-27 17:51 [PATCH] Use formatting of module name in crypto API Alex Riesen
@ 2009-06-02  4:13 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2009-06-02  4:13 UTC (permalink / raw)
  To: Alex Riesen; +Cc: trivial, linux-kernel

On Wed, May 27, 2009 at 07:51:39PM +0200, Alex Riesen wrote:
> Besdies, for the old code, gcc-4.3.3 produced this warning:
>   "format not a string literal and no format arguments"
> 
> Signed-off-by: Alex Riesen <raa.lkml@gmail.com>

Applied to cryptodev.  Thanks!
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-02  4:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-27 17:51 [PATCH] Use formatting of module name in crypto API Alex Riesen
2009-06-02  4:13 ` Herbert Xu

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.