Skip to content

Commit 8a82451

Browse files
saschahauerherbertx
authored andcommitted
crypto: caam - print messages in caam_dump_sg at debug level
caam_dump_sg() is only compiled in when DEBUG is defined, hence the messages are debug messages. Remove the @Level argument from caam_dump_sg() and print all messages at debug level. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 6e00550 commit 8a82451

5 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎drivers/crypto/caam/caamalg.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ static void skcipher_encrypt_done(struct device *jrdev, u32 *desc, u32 err,
10011001
DUMP_PREFIX_ADDRESS, 16, 4, req->iv,
10021002
edesc->src_nents > 1 ? 100 : ivsize, 1);
10031003

1004-
caam_dump_sg(KERN_ERR, "dst @" __stringify(__LINE__)": ",
1004+
caam_dump_sg("dst @" __stringify(__LINE__)": ",
10051005
DUMP_PREFIX_ADDRESS, 16, 4, req->dst,
10061006
edesc->dst_nents > 1 ? 100 : req->cryptlen, 1);
10071007

@@ -1028,7 +1028,7 @@ static void skcipher_decrypt_done(struct device *jrdev, u32 *desc, u32 err,
10281028

10291029
print_hex_dump_debug("dstiv @"__stringify(__LINE__)": ",
10301030
DUMP_PREFIX_ADDRESS, 16, 4, req->iv, ivsize, 1);
1031-
caam_dump_sg(KERN_ERR, "dst @" __stringify(__LINE__)": ",
1031+
caam_dump_sg("dst @" __stringify(__LINE__)": ",
10321032
DUMP_PREFIX_ADDRESS, 16, 4, req->dst,
10331033
edesc->dst_nents > 1 ? 100 : req->cryptlen, 1);
10341034

@@ -1236,7 +1236,7 @@ static void init_skcipher_job(struct skcipher_request *req,
12361236
dev_dbg(jrdev, "asked=%d, cryptlen%d\n",
12371237
(int)edesc->src_nents > 1 ? 100 : req->cryptlen, req->cryptlen);
12381238

1239-
caam_dump_sg(KERN_ERR, "src @" __stringify(__LINE__)": ",
1239+
caam_dump_sg("src @" __stringify(__LINE__)": ",
12401240
DUMP_PREFIX_ADDRESS, 16, 4, req->src,
12411241
edesc->src_nents > 1 ? 100 : req->cryptlen, 1);
12421242

@@ -1606,7 +1606,7 @@ static int aead_decrypt(struct aead_request *req)
16061606
u32 *desc;
16071607
int ret = 0;
16081608

1609-
caam_dump_sg(KERN_ERR, "dec src@" __stringify(__LINE__)": ",
1609+
caam_dump_sg("dec src@" __stringify(__LINE__)": ",
16101610
DUMP_PREFIX_ADDRESS, 16, 4, req->src,
16111611
req->assoclen + req->cryptlen, 1);
16121612

‎drivers/crypto/caam/caamalg_qi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,7 @@ static void skcipher_done(struct caam_drv_req *drv_req, u32 status)
12001200
print_hex_dump_debug("dstiv @" __stringify(__LINE__)": ",
12011201
DUMP_PREFIX_ADDRESS, 16, 4, req->iv,
12021202
edesc->src_nents > 1 ? 100 : ivsize, 1);
1203-
caam_dump_sg(KERN_ERR, "dst @" __stringify(__LINE__)": ",
1203+
caam_dump_sg("dst @" __stringify(__LINE__)": ",
12041204
DUMP_PREFIX_ADDRESS, 16, 4, req->dst,
12051205
edesc->dst_nents > 1 ? 100 : req->cryptlen, 1);
12061206

‎drivers/crypto/caam/caamalg_qi2.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@ static void skcipher_encrypt_done(void *cbk_ctx, u32 status)
13661366
print_hex_dump_debug("dstiv @" __stringify(__LINE__)": ",
13671367
DUMP_PREFIX_ADDRESS, 16, 4, req->iv,
13681368
edesc->src_nents > 1 ? 100 : ivsize, 1);
1369-
caam_dump_sg(KERN_DEBUG, "dst @" __stringify(__LINE__)": ",
1369+
caam_dump_sg("dst @" __stringify(__LINE__)": ",
13701370
DUMP_PREFIX_ADDRESS, 16, 4, req->dst,
13711371
edesc->dst_nents > 1 ? 100 : req->cryptlen, 1);
13721372

@@ -1404,7 +1404,7 @@ static void skcipher_decrypt_done(void *cbk_ctx, u32 status)
14041404
print_hex_dump_debug("dstiv @" __stringify(__LINE__)": ",
14051405
DUMP_PREFIX_ADDRESS, 16, 4, req->iv,
14061406
edesc->src_nents > 1 ? 100 : ivsize, 1);
1407-
caam_dump_sg(KERN_DEBUG, "dst @" __stringify(__LINE__)": ",
1407+
caam_dump_sg("dst @" __stringify(__LINE__)": ",
14081408
DUMP_PREFIX_ADDRESS, 16, 4, req->dst,
14091409
edesc->dst_nents > 1 ? 100 : req->cryptlen, 1);
14101410

‎drivers/crypto/caam/error.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#ifdef DEBUG
1414
#include <linux/highmem.h>
1515

16-
void caam_dump_sg(const char *level, const char *prefix_str, int prefix_type,
16+
void caam_dump_sg(const char *prefix_str, int prefix_type,
1717
int rowsize, int groupsize, struct scatterlist *sg,
1818
size_t tlen, bool ascii)
1919
{
@@ -35,15 +35,15 @@ void caam_dump_sg(const char *level, const char *prefix_str, int prefix_type,
3535

3636
buf = it_page + it->offset;
3737
len = min_t(size_t, tlen, it->length);
38-
print_hex_dump(level, prefix_str, prefix_type, rowsize,
39-
groupsize, buf, len, ascii);
38+
print_hex_dump_debug(prefix_str, prefix_type, rowsize,
39+
groupsize, buf, len, ascii);
4040
tlen -= len;
4141

4242
kunmap_atomic(it_page);
4343
}
4444
}
4545
#else
46-
void caam_dump_sg(const char *level, const char *prefix_str, int prefix_type,
46+
void caam_dump_sg(const char *prefix_str, int prefix_type,
4747
int rowsize, int groupsize, struct scatterlist *sg,
4848
size_t tlen, bool ascii)
4949
{}

‎drivers/crypto/caam/error.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void caam_strstatus(struct device *dev, u32 status, bool qi_v2);
1717
#define caam_jr_strstatus(jrdev, status) caam_strstatus(jrdev, status, false)
1818
#define caam_qi2_strstatus(qidev, status) caam_strstatus(qidev, status, true)
1919

20-
void caam_dump_sg(const char *level, const char *prefix_str, int prefix_type,
20+
void caam_dump_sg(const char *prefix_str, int prefix_type,
2121
int rowsize, int groupsize, struct scatterlist *sg,
2222
size_t tlen, bool ascii);
2323

0 commit comments

Comments
 (0)