Skip to content

Commit e22cdcf

Browse files
Marek Vasutherbertx
authored andcommitted
crypto: caam - Kill SPRINTFCAT() with fire
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>
1 parent 4f0fa52 commit e22cdcf

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

‎drivers/crypto/caam/error.c‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -158,16 +158,6 @@ static const char * const rng_err_id_list[] = {
158158
"Secure key generation",
159159
};
160160

161-
#define SPRINTFCAT(str, format, param, max_alloc) \
162-
{ \
163-
char *tmp; \
164-
\
165-
tmp = kmalloc(sizeof(format) + max_alloc, GFP_ATOMIC); \
166-
sprintf(tmp, format, param); \
167-
strcat(str, tmp); \
168-
kfree(tmp); \
169-
}
170-
171161
static void report_ccb_status(struct device *jrdev, u32 status,
172162
const char *error, char *__outstr)
173163
{

0 commit comments

Comments
 (0)