]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
crypto: caam - Kill SPRINTFCAT() with fire
authorMarek Vasut <marex@denx.de>
Thu, 24 Apr 2014 18:05:20 +0000 (20:05 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 8 May 2014 13:58:10 +0000 (21:58 +0800)
This macro is just like an encyclopedia of string handling done wrong.
This must die. This is so wrong on so many levels.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/error.c

index 66a7461cf9aed888ed5fa0c41f98aad54bf4e81a..7ed2e4fb3c15f50ca1491192014107922313bfab 100644 (file)
@@ -158,16 +158,6 @@ static const char * const rng_err_id_list[] = {
        "Secure key generation",
 };
 
-#define SPRINTFCAT(str, format, param, max_alloc)              \
-{                                                              \
-       char *tmp;                                              \
-                                                               \
-       tmp = kmalloc(sizeof(format) + max_alloc, GFP_ATOMIC);  \
-       sprintf(tmp, format, param);                            \
-       strcat(str, tmp);                                       \
-       kfree(tmp);                                             \
-}
-
 static void report_ccb_status(struct device *jrdev, u32 status,
                              const char *error, char *__outstr)
 {