diff options
author | Alex Porosanu <alexandru.porosanu@freescale.com> | 2013-08-14 11:56:45 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-08-21 07:08:36 -0400 |
commit | 514df2816ffb176c76c344f7d1b83e79a490e4d0 (patch) | |
tree | ed6533d71b0ed1674d0e8d2834f613fe020065d5 /drivers/crypto | |
parent | edb6f29464afc65fc73767540b854abf63ae7144 (diff) |
crypto: caam - replace xstr macro with __stringify
CAAM driver contains one macro (xstr) used for printing
the line location in a file where a memdump is done. This patch
replaces the xstr macro with the already existing __stringify
macro that performs the same function.
Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/caam/caamalg.c | 78 | ||||
-rw-r--r-- | drivers/crypto/caam/caamhash.c | 68 | ||||
-rw-r--r-- | drivers/crypto/caam/key_gen.c | 6 |
3 files changed, 77 insertions, 75 deletions
diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index 7a9052c44238..7c63b72ecd75 100644 --- a/drivers/crypto/caam/caamalg.c +++ b/drivers/crypto/caam/caamalg.c | |||
@@ -82,8 +82,6 @@ | |||
82 | 82 | ||
83 | #ifdef DEBUG | 83 | #ifdef DEBUG |
84 | /* for print_hex_dumps with line references */ | 84 | /* for print_hex_dumps with line references */ |
85 | #define xstr(s) str(s) | ||
86 | #define str(s) #s | ||
87 | #define debug(format, arg...) printk(format, arg) | 85 | #define debug(format, arg...) printk(format, arg) |
88 | #else | 86 | #else |
89 | #define debug(format, arg...) | 87 | #define debug(format, arg...) |
@@ -283,7 +281,7 @@ static int aead_set_sh_desc(struct crypto_aead *aead) | |||
283 | return -ENOMEM; | 281 | return -ENOMEM; |
284 | } | 282 | } |
285 | #ifdef DEBUG | 283 | #ifdef DEBUG |
286 | print_hex_dump(KERN_ERR, "aead enc shdesc@"xstr(__LINE__)": ", | 284 | print_hex_dump(KERN_ERR, "aead enc shdesc@"__stringify(__LINE__)": ", |
287 | DUMP_PREFIX_ADDRESS, 16, 4, desc, | 285 | DUMP_PREFIX_ADDRESS, 16, 4, desc, |
288 | desc_bytes(desc), 1); | 286 | desc_bytes(desc), 1); |
289 | #endif | 287 | #endif |
@@ -351,7 +349,7 @@ static int aead_set_sh_desc(struct crypto_aead *aead) | |||
351 | return -ENOMEM; | 349 | return -ENOMEM; |
352 | } | 350 | } |
353 | #ifdef DEBUG | 351 | #ifdef DEBUG |
354 | print_hex_dump(KERN_ERR, "aead dec shdesc@"xstr(__LINE__)": ", | 352 | print_hex_dump(KERN_ERR, "aead dec shdesc@"__stringify(__LINE__)": ", |
355 | DUMP_PREFIX_ADDRESS, 16, 4, desc, | 353 | DUMP_PREFIX_ADDRESS, 16, 4, desc, |
356 | desc_bytes(desc), 1); | 354 | desc_bytes(desc), 1); |
357 | #endif | 355 | #endif |
@@ -434,7 +432,7 @@ static int aead_set_sh_desc(struct crypto_aead *aead) | |||
434 | return -ENOMEM; | 432 | return -ENOMEM; |
435 | } | 433 | } |
436 | #ifdef DEBUG | 434 | #ifdef DEBUG |
437 | print_hex_dump(KERN_ERR, "aead givenc shdesc@"xstr(__LINE__)": ", | 435 | print_hex_dump(KERN_ERR, "aead givenc shdesc@"__stringify(__LINE__)": ", |
438 | DUMP_PREFIX_ADDRESS, 16, 4, desc, | 436 | DUMP_PREFIX_ADDRESS, 16, 4, desc, |
439 | desc_bytes(desc), 1); | 437 | desc_bytes(desc), 1); |
440 | #endif | 438 | #endif |
@@ -498,7 +496,7 @@ static int aead_setkey(struct crypto_aead *aead, | |||
498 | keylen, enckeylen, authkeylen); | 496 | keylen, enckeylen, authkeylen); |
499 | printk(KERN_ERR "split_key_len %d split_key_pad_len %d\n", | 497 | printk(KERN_ERR "split_key_len %d split_key_pad_len %d\n", |
500 | ctx->split_key_len, ctx->split_key_pad_len); | 498 | ctx->split_key_len, ctx->split_key_pad_len); |
501 | print_hex_dump(KERN_ERR, "key in @"xstr(__LINE__)": ", | 499 | print_hex_dump(KERN_ERR, "key in @"__stringify(__LINE__)": ", |
502 | DUMP_PREFIX_ADDRESS, 16, 4, key, keylen, 1); | 500 | DUMP_PREFIX_ADDRESS, 16, 4, key, keylen, 1); |
503 | #endif | 501 | #endif |
504 | 502 | ||
@@ -517,7 +515,7 @@ static int aead_setkey(struct crypto_aead *aead, | |||
517 | return -ENOMEM; | 515 | return -ENOMEM; |
518 | } | 516 | } |
519 | #ifdef DEBUG | 517 | #ifdef DEBUG |
520 | print_hex_dump(KERN_ERR, "ctx.key@"xstr(__LINE__)": ", | 518 | print_hex_dump(KERN_ERR, "ctx.key@"__stringify(__LINE__)": ", |
521 | DUMP_PREFIX_ADDRESS, 16, 4, ctx->key, | 519 | DUMP_PREFIX_ADDRESS, 16, 4, ctx->key, |
522 | ctx->split_key_pad_len + enckeylen, 1); | 520 | ctx->split_key_pad_len + enckeylen, 1); |
523 | #endif | 521 | #endif |
@@ -547,7 +545,7 @@ static int ablkcipher_setkey(struct crypto_ablkcipher *ablkcipher, | |||
547 | u32 *desc; | 545 | u32 *desc; |
548 | 546 | ||
549 | #ifdef DEBUG | 547 | #ifdef DEBUG |
550 | print_hex_dump(KERN_ERR, "key in @"xstr(__LINE__)": ", | 548 | print_hex_dump(KERN_ERR, "key in @"__stringify(__LINE__)": ", |
551 | DUMP_PREFIX_ADDRESS, 16, 4, key, keylen, 1); | 549 | DUMP_PREFIX_ADDRESS, 16, 4, key, keylen, 1); |
552 | #endif | 550 | #endif |
553 | 551 | ||
@@ -596,7 +594,8 @@ static int ablkcipher_setkey(struct crypto_ablkcipher *ablkcipher, | |||
596 | return -ENOMEM; | 594 | return -ENOMEM; |
597 | } | 595 | } |
598 | #ifdef DEBUG | 596 | #ifdef DEBUG |
599 | print_hex_dump(KERN_ERR, "ablkcipher enc shdesc@"xstr(__LINE__)": ", | 597 | print_hex_dump(KERN_ERR, |
598 | "ablkcipher enc shdesc@"__stringify(__LINE__)": ", | ||
600 | DUMP_PREFIX_ADDRESS, 16, 4, desc, | 599 | DUMP_PREFIX_ADDRESS, 16, 4, desc, |
601 | desc_bytes(desc), 1); | 600 | desc_bytes(desc), 1); |
602 | #endif | 601 | #endif |
@@ -641,7 +640,8 @@ static int ablkcipher_setkey(struct crypto_ablkcipher *ablkcipher, | |||
641 | } | 640 | } |
642 | 641 | ||
643 | #ifdef DEBUG | 642 | #ifdef DEBUG |
644 | print_hex_dump(KERN_ERR, "ablkcipher dec shdesc@"xstr(__LINE__)": ", | 643 | print_hex_dump(KERN_ERR, |
644 | "ablkcipher dec shdesc@"__stringify(__LINE__)": ", | ||
645 | DUMP_PREFIX_ADDRESS, 16, 4, desc, | 645 | DUMP_PREFIX_ADDRESS, 16, 4, desc, |
646 | desc_bytes(desc), 1); | 646 | desc_bytes(desc), 1); |
647 | #endif | 647 | #endif |
@@ -778,13 +778,13 @@ static void aead_encrypt_done(struct device *jrdev, u32 *desc, u32 err, | |||
778 | aead_unmap(jrdev, edesc, req); | 778 | aead_unmap(jrdev, edesc, req); |
779 | 779 | ||
780 | #ifdef DEBUG | 780 | #ifdef DEBUG |
781 | print_hex_dump(KERN_ERR, "assoc @"xstr(__LINE__)": ", | 781 | print_hex_dump(KERN_ERR, "assoc @"__stringify(__LINE__)": ", |
782 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->assoc), | 782 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->assoc), |
783 | req->assoclen , 1); | 783 | req->assoclen , 1); |
784 | print_hex_dump(KERN_ERR, "dstiv @"xstr(__LINE__)": ", | 784 | print_hex_dump(KERN_ERR, "dstiv @"__stringify(__LINE__)": ", |
785 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->src) - ivsize, | 785 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->src) - ivsize, |
786 | edesc->src_nents ? 100 : ivsize, 1); | 786 | edesc->src_nents ? 100 : ivsize, 1); |
787 | print_hex_dump(KERN_ERR, "dst @"xstr(__LINE__)": ", | 787 | print_hex_dump(KERN_ERR, "dst @"__stringify(__LINE__)": ", |
788 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->src), | 788 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->src), |
789 | edesc->src_nents ? 100 : req->cryptlen + | 789 | edesc->src_nents ? 100 : req->cryptlen + |
790 | ctx->authsize + 4, 1); | 790 | ctx->authsize + 4, 1); |
@@ -812,10 +812,10 @@ static void aead_decrypt_done(struct device *jrdev, u32 *desc, u32 err, | |||
812 | offsetof(struct aead_edesc, hw_desc)); | 812 | offsetof(struct aead_edesc, hw_desc)); |
813 | 813 | ||
814 | #ifdef DEBUG | 814 | #ifdef DEBUG |
815 | print_hex_dump(KERN_ERR, "dstiv @"xstr(__LINE__)": ", | 815 | print_hex_dump(KERN_ERR, "dstiv @"__stringify(__LINE__)": ", |
816 | DUMP_PREFIX_ADDRESS, 16, 4, req->iv, | 816 | DUMP_PREFIX_ADDRESS, 16, 4, req->iv, |
817 | ivsize, 1); | 817 | ivsize, 1); |
818 | print_hex_dump(KERN_ERR, "dst @"xstr(__LINE__)": ", | 818 | print_hex_dump(KERN_ERR, "dst @"__stringify(__LINE__)": ", |
819 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->dst), | 819 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->dst), |
820 | req->cryptlen, 1); | 820 | req->cryptlen, 1); |
821 | #endif | 821 | #endif |
@@ -835,7 +835,7 @@ static void aead_decrypt_done(struct device *jrdev, u32 *desc, u32 err, | |||
835 | err = -EBADMSG; | 835 | err = -EBADMSG; |
836 | 836 | ||
837 | #ifdef DEBUG | 837 | #ifdef DEBUG |
838 | print_hex_dump(KERN_ERR, "iphdrout@"xstr(__LINE__)": ", | 838 | print_hex_dump(KERN_ERR, "iphdrout@"__stringify(__LINE__)": ", |
839 | DUMP_PREFIX_ADDRESS, 16, 4, | 839 | DUMP_PREFIX_ADDRESS, 16, 4, |
840 | ((char *)sg_virt(req->assoc) - sizeof(struct iphdr)), | 840 | ((char *)sg_virt(req->assoc) - sizeof(struct iphdr)), |
841 | sizeof(struct iphdr) + req->assoclen + | 841 | sizeof(struct iphdr) + req->assoclen + |
@@ -843,7 +843,7 @@ static void aead_decrypt_done(struct device *jrdev, u32 *desc, u32 err, | |||
843 | ctx->authsize + 36, 1); | 843 | ctx->authsize + 36, 1); |
844 | if (!err && edesc->sec4_sg_bytes) { | 844 | if (!err && edesc->sec4_sg_bytes) { |
845 | struct scatterlist *sg = sg_last(req->src, edesc->src_nents); | 845 | struct scatterlist *sg = sg_last(req->src, edesc->src_nents); |
846 | print_hex_dump(KERN_ERR, "sglastout@"xstr(__LINE__)": ", | 846 | print_hex_dump(KERN_ERR, "sglastout@"__stringify(__LINE__)": ", |
847 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(sg), | 847 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(sg), |
848 | sg->length + ctx->authsize + 16, 1); | 848 | sg->length + ctx->authsize + 16, 1); |
849 | } | 849 | } |
@@ -876,10 +876,10 @@ static void ablkcipher_encrypt_done(struct device *jrdev, u32 *desc, u32 err, | |||
876 | } | 876 | } |
877 | 877 | ||
878 | #ifdef DEBUG | 878 | #ifdef DEBUG |
879 | print_hex_dump(KERN_ERR, "dstiv @"xstr(__LINE__)": ", | 879 | print_hex_dump(KERN_ERR, "dstiv @"__stringify(__LINE__)": ", |
880 | DUMP_PREFIX_ADDRESS, 16, 4, req->info, | 880 | DUMP_PREFIX_ADDRESS, 16, 4, req->info, |
881 | edesc->src_nents > 1 ? 100 : ivsize, 1); | 881 | edesc->src_nents > 1 ? 100 : ivsize, 1); |
882 | print_hex_dump(KERN_ERR, "dst @"xstr(__LINE__)": ", | 882 | print_hex_dump(KERN_ERR, "dst @"__stringify(__LINE__)": ", |
883 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->src), | 883 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->src), |
884 | edesc->dst_nents > 1 ? 100 : req->nbytes, 1); | 884 | edesc->dst_nents > 1 ? 100 : req->nbytes, 1); |
885 | #endif | 885 | #endif |
@@ -911,10 +911,10 @@ static void ablkcipher_decrypt_done(struct device *jrdev, u32 *desc, u32 err, | |||
911 | } | 911 | } |
912 | 912 | ||
913 | #ifdef DEBUG | 913 | #ifdef DEBUG |
914 | print_hex_dump(KERN_ERR, "dstiv @"xstr(__LINE__)": ", | 914 | print_hex_dump(KERN_ERR, "dstiv @"__stringify(__LINE__)": ", |
915 | DUMP_PREFIX_ADDRESS, 16, 4, req->info, | 915 | DUMP_PREFIX_ADDRESS, 16, 4, req->info, |
916 | ivsize, 1); | 916 | ivsize, 1); |
917 | print_hex_dump(KERN_ERR, "dst @"xstr(__LINE__)": ", | 917 | print_hex_dump(KERN_ERR, "dst @"__stringify(__LINE__)": ", |
918 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->src), | 918 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->src), |
919 | edesc->dst_nents > 1 ? 100 : req->nbytes, 1); | 919 | edesc->dst_nents > 1 ? 100 : req->nbytes, 1); |
920 | #endif | 920 | #endif |
@@ -945,16 +945,16 @@ static void init_aead_job(u32 *sh_desc, dma_addr_t ptr, | |||
945 | #ifdef DEBUG | 945 | #ifdef DEBUG |
946 | debug("assoclen %d cryptlen %d authsize %d\n", | 946 | debug("assoclen %d cryptlen %d authsize %d\n", |
947 | req->assoclen, req->cryptlen, authsize); | 947 | req->assoclen, req->cryptlen, authsize); |
948 | print_hex_dump(KERN_ERR, "assoc @"xstr(__LINE__)": ", | 948 | print_hex_dump(KERN_ERR, "assoc @"__stringify(__LINE__)": ", |
949 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->assoc), | 949 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->assoc), |
950 | req->assoclen , 1); | 950 | req->assoclen , 1); |
951 | print_hex_dump(KERN_ERR, "presciv@"xstr(__LINE__)": ", | 951 | print_hex_dump(KERN_ERR, "presciv@"__stringify(__LINE__)": ", |
952 | DUMP_PREFIX_ADDRESS, 16, 4, req->iv, | 952 | DUMP_PREFIX_ADDRESS, 16, 4, req->iv, |
953 | edesc->src_nents ? 100 : ivsize, 1); | 953 | edesc->src_nents ? 100 : ivsize, 1); |
954 | print_hex_dump(KERN_ERR, "src @"xstr(__LINE__)": ", | 954 | print_hex_dump(KERN_ERR, "src @"__stringify(__LINE__)": ", |
955 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->src), | 955 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->src), |
956 | edesc->src_nents ? 100 : req->cryptlen, 1); | 956 | edesc->src_nents ? 100 : req->cryptlen, 1); |
957 | print_hex_dump(KERN_ERR, "shrdesc@"xstr(__LINE__)": ", | 957 | print_hex_dump(KERN_ERR, "shrdesc@"__stringify(__LINE__)": ", |
958 | DUMP_PREFIX_ADDRESS, 16, 4, sh_desc, | 958 | DUMP_PREFIX_ADDRESS, 16, 4, sh_desc, |
959 | desc_bytes(sh_desc), 1); | 959 | desc_bytes(sh_desc), 1); |
960 | #endif | 960 | #endif |
@@ -1023,15 +1023,15 @@ static void init_aead_giv_job(u32 *sh_desc, dma_addr_t ptr, | |||
1023 | #ifdef DEBUG | 1023 | #ifdef DEBUG |
1024 | debug("assoclen %d cryptlen %d authsize %d\n", | 1024 | debug("assoclen %d cryptlen %d authsize %d\n", |
1025 | req->assoclen, req->cryptlen, authsize); | 1025 | req->assoclen, req->cryptlen, authsize); |
1026 | print_hex_dump(KERN_ERR, "assoc @"xstr(__LINE__)": ", | 1026 | print_hex_dump(KERN_ERR, "assoc @"__stringify(__LINE__)": ", |
1027 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->assoc), | 1027 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->assoc), |
1028 | req->assoclen , 1); | 1028 | req->assoclen , 1); |
1029 | print_hex_dump(KERN_ERR, "presciv@"xstr(__LINE__)": ", | 1029 | print_hex_dump(KERN_ERR, "presciv@"__stringify(__LINE__)": ", |
1030 | DUMP_PREFIX_ADDRESS, 16, 4, req->iv, ivsize, 1); | 1030 | DUMP_PREFIX_ADDRESS, 16, 4, req->iv, ivsize, 1); |
1031 | print_hex_dump(KERN_ERR, "src @"xstr(__LINE__)": ", | 1031 | print_hex_dump(KERN_ERR, "src @"__stringify(__LINE__)": ", |
1032 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->src), | 1032 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->src), |
1033 | edesc->src_nents > 1 ? 100 : req->cryptlen, 1); | 1033 | edesc->src_nents > 1 ? 100 : req->cryptlen, 1); |
1034 | print_hex_dump(KERN_ERR, "shrdesc@"xstr(__LINE__)": ", | 1034 | print_hex_dump(KERN_ERR, "shrdesc@"__stringify(__LINE__)": ", |
1035 | DUMP_PREFIX_ADDRESS, 16, 4, sh_desc, | 1035 | DUMP_PREFIX_ADDRESS, 16, 4, sh_desc, |
1036 | desc_bytes(sh_desc), 1); | 1036 | desc_bytes(sh_desc), 1); |
1037 | #endif | 1037 | #endif |
@@ -1084,10 +1084,10 @@ static void init_ablkcipher_job(u32 *sh_desc, dma_addr_t ptr, | |||
1084 | int len, sec4_sg_index = 0; | 1084 | int len, sec4_sg_index = 0; |
1085 | 1085 | ||
1086 | #ifdef DEBUG | 1086 | #ifdef DEBUG |
1087 | print_hex_dump(KERN_ERR, "presciv@"xstr(__LINE__)": ", | 1087 | print_hex_dump(KERN_ERR, "presciv@"__stringify(__LINE__)": ", |
1088 | DUMP_PREFIX_ADDRESS, 16, 4, req->info, | 1088 | DUMP_PREFIX_ADDRESS, 16, 4, req->info, |
1089 | ivsize, 1); | 1089 | ivsize, 1); |
1090 | print_hex_dump(KERN_ERR, "src @"xstr(__LINE__)": ", | 1090 | print_hex_dump(KERN_ERR, "src @"__stringify(__LINE__)": ", |
1091 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->src), | 1091 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->src), |
1092 | edesc->src_nents ? 100 : req->nbytes, 1); | 1092 | edesc->src_nents ? 100 : req->nbytes, 1); |
1093 | #endif | 1093 | #endif |
@@ -1245,7 +1245,7 @@ static int aead_encrypt(struct aead_request *req) | |||
1245 | init_aead_job(ctx->sh_desc_enc, ctx->sh_desc_enc_dma, edesc, req, | 1245 | init_aead_job(ctx->sh_desc_enc, ctx->sh_desc_enc_dma, edesc, req, |
1246 | all_contig, true); | 1246 | all_contig, true); |
1247 | #ifdef DEBUG | 1247 | #ifdef DEBUG |
1248 | print_hex_dump(KERN_ERR, "aead jobdesc@"xstr(__LINE__)": ", | 1248 | print_hex_dump(KERN_ERR, "aead jobdesc@"__stringify(__LINE__)": ", |
1249 | DUMP_PREFIX_ADDRESS, 16, 4, edesc->hw_desc, | 1249 | DUMP_PREFIX_ADDRESS, 16, 4, edesc->hw_desc, |
1250 | desc_bytes(edesc->hw_desc), 1); | 1250 | desc_bytes(edesc->hw_desc), 1); |
1251 | #endif | 1251 | #endif |
@@ -1279,7 +1279,7 @@ static int aead_decrypt(struct aead_request *req) | |||
1279 | return PTR_ERR(edesc); | 1279 | return PTR_ERR(edesc); |
1280 | 1280 | ||
1281 | #ifdef DEBUG | 1281 | #ifdef DEBUG |
1282 | print_hex_dump(KERN_ERR, "dec src@"xstr(__LINE__)": ", | 1282 | print_hex_dump(KERN_ERR, "dec src@"__stringify(__LINE__)": ", |
1283 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->src), | 1283 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->src), |
1284 | req->cryptlen, 1); | 1284 | req->cryptlen, 1); |
1285 | #endif | 1285 | #endif |
@@ -1288,7 +1288,7 @@ static int aead_decrypt(struct aead_request *req) | |||
1288 | init_aead_job(ctx->sh_desc_dec, | 1288 | init_aead_job(ctx->sh_desc_dec, |
1289 | ctx->sh_desc_dec_dma, edesc, req, all_contig, false); | 1289 | ctx->sh_desc_dec_dma, edesc, req, all_contig, false); |
1290 | #ifdef DEBUG | 1290 | #ifdef DEBUG |
1291 | print_hex_dump(KERN_ERR, "aead jobdesc@"xstr(__LINE__)": ", | 1291 | print_hex_dump(KERN_ERR, "aead jobdesc@"__stringify(__LINE__)": ", |
1292 | DUMP_PREFIX_ADDRESS, 16, 4, edesc->hw_desc, | 1292 | DUMP_PREFIX_ADDRESS, 16, 4, edesc->hw_desc, |
1293 | desc_bytes(edesc->hw_desc), 1); | 1293 | desc_bytes(edesc->hw_desc), 1); |
1294 | #endif | 1294 | #endif |
@@ -1435,7 +1435,7 @@ static int aead_givencrypt(struct aead_givcrypt_request *areq) | |||
1435 | return PTR_ERR(edesc); | 1435 | return PTR_ERR(edesc); |
1436 | 1436 | ||
1437 | #ifdef DEBUG | 1437 | #ifdef DEBUG |
1438 | print_hex_dump(KERN_ERR, "giv src@"xstr(__LINE__)": ", | 1438 | print_hex_dump(KERN_ERR, "giv src@"__stringify(__LINE__)": ", |
1439 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->src), | 1439 | DUMP_PREFIX_ADDRESS, 16, 4, sg_virt(req->src), |
1440 | req->cryptlen, 1); | 1440 | req->cryptlen, 1); |
1441 | #endif | 1441 | #endif |
@@ -1444,7 +1444,7 @@ static int aead_givencrypt(struct aead_givcrypt_request *areq) | |||
1444 | init_aead_giv_job(ctx->sh_desc_givenc, | 1444 | init_aead_giv_job(ctx->sh_desc_givenc, |
1445 | ctx->sh_desc_givenc_dma, edesc, req, contig); | 1445 | ctx->sh_desc_givenc_dma, edesc, req, contig); |
1446 | #ifdef DEBUG | 1446 | #ifdef DEBUG |
1447 | print_hex_dump(KERN_ERR, "aead jobdesc@"xstr(__LINE__)": ", | 1447 | print_hex_dump(KERN_ERR, "aead jobdesc@"__stringify(__LINE__)": ", |
1448 | DUMP_PREFIX_ADDRESS, 16, 4, edesc->hw_desc, | 1448 | DUMP_PREFIX_ADDRESS, 16, 4, edesc->hw_desc, |
1449 | desc_bytes(edesc->hw_desc), 1); | 1449 | desc_bytes(edesc->hw_desc), 1); |
1450 | #endif | 1450 | #endif |
@@ -1544,7 +1544,7 @@ static struct ablkcipher_edesc *ablkcipher_edesc_alloc(struct ablkcipher_request | |||
1544 | edesc->iv_dma = iv_dma; | 1544 | edesc->iv_dma = iv_dma; |
1545 | 1545 | ||
1546 | #ifdef DEBUG | 1546 | #ifdef DEBUG |
1547 | print_hex_dump(KERN_ERR, "ablkcipher sec4_sg@"xstr(__LINE__)": ", | 1547 | print_hex_dump(KERN_ERR, "ablkcipher sec4_sg@"__stringify(__LINE__)": ", |
1548 | DUMP_PREFIX_ADDRESS, 16, 4, edesc->sec4_sg, | 1548 | DUMP_PREFIX_ADDRESS, 16, 4, edesc->sec4_sg, |
1549 | sec4_sg_bytes, 1); | 1549 | sec4_sg_bytes, 1); |
1550 | #endif | 1550 | #endif |
@@ -1573,7 +1573,7 @@ static int ablkcipher_encrypt(struct ablkcipher_request *req) | |||
1573 | init_ablkcipher_job(ctx->sh_desc_enc, | 1573 | init_ablkcipher_job(ctx->sh_desc_enc, |
1574 | ctx->sh_desc_enc_dma, edesc, req, iv_contig); | 1574 | ctx->sh_desc_enc_dma, edesc, req, iv_contig); |
1575 | #ifdef DEBUG | 1575 | #ifdef DEBUG |
1576 | print_hex_dump(KERN_ERR, "ablkcipher jobdesc@"xstr(__LINE__)": ", | 1576 | print_hex_dump(KERN_ERR, "ablkcipher jobdesc@"__stringify(__LINE__)": ", |
1577 | DUMP_PREFIX_ADDRESS, 16, 4, edesc->hw_desc, | 1577 | DUMP_PREFIX_ADDRESS, 16, 4, edesc->hw_desc, |
1578 | desc_bytes(edesc->hw_desc), 1); | 1578 | desc_bytes(edesc->hw_desc), 1); |
1579 | #endif | 1579 | #endif |
@@ -1611,7 +1611,7 @@ static int ablkcipher_decrypt(struct ablkcipher_request *req) | |||
1611 | ctx->sh_desc_dec_dma, edesc, req, iv_contig); | 1611 | ctx->sh_desc_dec_dma, edesc, req, iv_contig); |
1612 | desc = edesc->hw_desc; | 1612 | desc = edesc->hw_desc; |
1613 | #ifdef DEBUG | 1613 | #ifdef DEBUG |
1614 | print_hex_dump(KERN_ERR, "ablkcipher jobdesc@"xstr(__LINE__)": ", | 1614 | print_hex_dump(KERN_ERR, "ablkcipher jobdesc@"__stringify(__LINE__)": ", |
1615 | DUMP_PREFIX_ADDRESS, 16, 4, edesc->hw_desc, | 1615 | DUMP_PREFIX_ADDRESS, 16, 4, edesc->hw_desc, |
1616 | desc_bytes(edesc->hw_desc), 1); | 1616 | desc_bytes(edesc->hw_desc), 1); |
1617 | #endif | 1617 | #endif |
diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c index 77ad2b68f8f3..aa65c6e0c430 100644 --- a/drivers/crypto/caam/caamhash.c +++ b/drivers/crypto/caam/caamhash.c | |||
@@ -89,8 +89,6 @@ | |||
89 | 89 | ||
90 | #ifdef DEBUG | 90 | #ifdef DEBUG |
91 | /* for print_hex_dumps with line references */ | 91 | /* for print_hex_dumps with line references */ |
92 | #define xstr(s) str(s) | ||
93 | #define str(s) #s | ||
94 | #define debug(format, arg...) printk(format, arg) | 92 | #define debug(format, arg...) printk(format, arg) |
95 | #else | 93 | #else |
96 | #define debug(format, arg...) | 94 | #define debug(format, arg...) |
@@ -329,7 +327,8 @@ static int ahash_set_sh_desc(struct crypto_ahash *ahash) | |||
329 | return -ENOMEM; | 327 | return -ENOMEM; |
330 | } | 328 | } |
331 | #ifdef DEBUG | 329 | #ifdef DEBUG |
332 | print_hex_dump(KERN_ERR, "ahash update shdesc@"xstr(__LINE__)": ", | 330 | print_hex_dump(KERN_ERR, |
331 | "ahash update shdesc@"__stringify(__LINE__)": ", | ||
333 | DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); | 332 | DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); |
334 | #endif | 333 | #endif |
335 | 334 | ||
@@ -347,7 +346,8 @@ static int ahash_set_sh_desc(struct crypto_ahash *ahash) | |||
347 | return -ENOMEM; | 346 | return -ENOMEM; |
348 | } | 347 | } |
349 | #ifdef DEBUG | 348 | #ifdef DEBUG |
350 | print_hex_dump(KERN_ERR, "ahash update first shdesc@"xstr(__LINE__)": ", | 349 | print_hex_dump(KERN_ERR, |
350 | "ahash update first shdesc@"__stringify(__LINE__)": ", | ||
351 | DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); | 351 | DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); |
352 | #endif | 352 | #endif |
353 | 353 | ||
@@ -364,7 +364,7 @@ static int ahash_set_sh_desc(struct crypto_ahash *ahash) | |||
364 | return -ENOMEM; | 364 | return -ENOMEM; |
365 | } | 365 | } |
366 | #ifdef DEBUG | 366 | #ifdef DEBUG |
367 | print_hex_dump(KERN_ERR, "ahash final shdesc@"xstr(__LINE__)": ", | 367 | print_hex_dump(KERN_ERR, "ahash final shdesc@"__stringify(__LINE__)": ", |
368 | DUMP_PREFIX_ADDRESS, 16, 4, desc, | 368 | DUMP_PREFIX_ADDRESS, 16, 4, desc, |
369 | desc_bytes(desc), 1); | 369 | desc_bytes(desc), 1); |
370 | #endif | 370 | #endif |
@@ -382,7 +382,7 @@ static int ahash_set_sh_desc(struct crypto_ahash *ahash) | |||
382 | return -ENOMEM; | 382 | return -ENOMEM; |
383 | } | 383 | } |
384 | #ifdef DEBUG | 384 | #ifdef DEBUG |
385 | print_hex_dump(KERN_ERR, "ahash finup shdesc@"xstr(__LINE__)": ", | 385 | print_hex_dump(KERN_ERR, "ahash finup shdesc@"__stringify(__LINE__)": ", |
386 | DUMP_PREFIX_ADDRESS, 16, 4, desc, | 386 | DUMP_PREFIX_ADDRESS, 16, 4, desc, |
387 | desc_bytes(desc), 1); | 387 | desc_bytes(desc), 1); |
388 | #endif | 388 | #endif |
@@ -401,7 +401,8 @@ static int ahash_set_sh_desc(struct crypto_ahash *ahash) | |||
401 | return -ENOMEM; | 401 | return -ENOMEM; |
402 | } | 402 | } |
403 | #ifdef DEBUG | 403 | #ifdef DEBUG |
404 | print_hex_dump(KERN_ERR, "ahash digest shdesc@"xstr(__LINE__)": ", | 404 | print_hex_dump(KERN_ERR, |
405 | "ahash digest shdesc@"__stringify(__LINE__)": ", | ||
405 | DUMP_PREFIX_ADDRESS, 16, 4, desc, | 406 | DUMP_PREFIX_ADDRESS, 16, 4, desc, |
406 | desc_bytes(desc), 1); | 407 | desc_bytes(desc), 1); |
407 | #endif | 408 | #endif |
@@ -462,9 +463,9 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, const u8 *key_in, | |||
462 | LDST_SRCDST_BYTE_CONTEXT); | 463 | LDST_SRCDST_BYTE_CONTEXT); |
463 | 464 | ||
464 | #ifdef DEBUG | 465 | #ifdef DEBUG |
465 | print_hex_dump(KERN_ERR, "key_in@"xstr(__LINE__)": ", | 466 | print_hex_dump(KERN_ERR, "key_in@"__stringify(__LINE__)": ", |
466 | DUMP_PREFIX_ADDRESS, 16, 4, key_in, *keylen, 1); | 467 | DUMP_PREFIX_ADDRESS, 16, 4, key_in, *keylen, 1); |
467 | print_hex_dump(KERN_ERR, "jobdesc@"xstr(__LINE__)": ", | 468 | print_hex_dump(KERN_ERR, "jobdesc@"__stringify(__LINE__)": ", |
468 | DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); | 469 | DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); |
469 | #endif | 470 | #endif |
470 | 471 | ||
@@ -477,7 +478,8 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, const u8 *key_in, | |||
477 | wait_for_completion_interruptible(&result.completion); | 478 | wait_for_completion_interruptible(&result.completion); |
478 | ret = result.err; | 479 | ret = result.err; |
479 | #ifdef DEBUG | 480 | #ifdef DEBUG |
480 | print_hex_dump(KERN_ERR, "digested key@"xstr(__LINE__)": ", | 481 | print_hex_dump(KERN_ERR, |
482 | "digested key@"__stringify(__LINE__)": ", | ||
481 | DUMP_PREFIX_ADDRESS, 16, 4, key_in, | 483 | DUMP_PREFIX_ADDRESS, 16, 4, key_in, |
482 | digestsize, 1); | 484 | digestsize, 1); |
483 | #endif | 485 | #endif |
@@ -528,7 +530,7 @@ static int ahash_setkey(struct crypto_ahash *ahash, | |||
528 | #ifdef DEBUG | 530 | #ifdef DEBUG |
529 | printk(KERN_ERR "split_key_len %d split_key_pad_len %d\n", | 531 | printk(KERN_ERR "split_key_len %d split_key_pad_len %d\n", |
530 | ctx->split_key_len, ctx->split_key_pad_len); | 532 | ctx->split_key_len, ctx->split_key_pad_len); |
531 | print_hex_dump(KERN_ERR, "key in @"xstr(__LINE__)": ", | 533 | print_hex_dump(KERN_ERR, "key in @"__stringify(__LINE__)": ", |
532 | DUMP_PREFIX_ADDRESS, 16, 4, key, keylen, 1); | 534 | DUMP_PREFIX_ADDRESS, 16, 4, key, keylen, 1); |
533 | #endif | 535 | #endif |
534 | 536 | ||
@@ -543,7 +545,7 @@ static int ahash_setkey(struct crypto_ahash *ahash, | |||
543 | return -ENOMEM; | 545 | return -ENOMEM; |
544 | } | 546 | } |
545 | #ifdef DEBUG | 547 | #ifdef DEBUG |
546 | print_hex_dump(KERN_ERR, "ctx.key@"xstr(__LINE__)": ", | 548 | print_hex_dump(KERN_ERR, "ctx.key@"__stringify(__LINE__)": ", |
547 | DUMP_PREFIX_ADDRESS, 16, 4, ctx->key, | 549 | DUMP_PREFIX_ADDRESS, 16, 4, ctx->key, |
548 | ctx->split_key_pad_len, 1); | 550 | ctx->split_key_pad_len, 1); |
549 | #endif | 551 | #endif |
@@ -636,11 +638,11 @@ static void ahash_done(struct device *jrdev, u32 *desc, u32 err, | |||
636 | kfree(edesc); | 638 | kfree(edesc); |
637 | 639 | ||
638 | #ifdef DEBUG | 640 | #ifdef DEBUG |
639 | print_hex_dump(KERN_ERR, "ctx@"xstr(__LINE__)": ", | 641 | print_hex_dump(KERN_ERR, "ctx@"__stringify(__LINE__)": ", |
640 | DUMP_PREFIX_ADDRESS, 16, 4, state->caam_ctx, | 642 | DUMP_PREFIX_ADDRESS, 16, 4, state->caam_ctx, |
641 | ctx->ctx_len, 1); | 643 | ctx->ctx_len, 1); |
642 | if (req->result) | 644 | if (req->result) |
643 | print_hex_dump(KERN_ERR, "result@"xstr(__LINE__)": ", | 645 | print_hex_dump(KERN_ERR, "result@"__stringify(__LINE__)": ", |
644 | DUMP_PREFIX_ADDRESS, 16, 4, req->result, | 646 | DUMP_PREFIX_ADDRESS, 16, 4, req->result, |
645 | digestsize, 1); | 647 | digestsize, 1); |
646 | #endif | 648 | #endif |
@@ -674,11 +676,11 @@ static void ahash_done_bi(struct device *jrdev, u32 *desc, u32 err, | |||
674 | kfree(edesc); | 676 | kfree(edesc); |
675 | 677 | ||
676 | #ifdef DEBUG | 678 | #ifdef DEBUG |
677 | print_hex_dump(KERN_ERR, "ctx@"xstr(__LINE__)": ", | 679 | print_hex_dump(KERN_ERR, "ctx@"__stringify(__LINE__)": ", |
678 | DUMP_PREFIX_ADDRESS, 16, 4, state->caam_ctx, | 680 | DUMP_PREFIX_ADDRESS, 16, 4, state->caam_ctx, |
679 | ctx->ctx_len, 1); | 681 | ctx->ctx_len, 1); |
680 | if (req->result) | 682 | if (req->result) |
681 | print_hex_dump(KERN_ERR, "result@"xstr(__LINE__)": ", | 683 | print_hex_dump(KERN_ERR, "result@"__stringify(__LINE__)": ", |
682 | DUMP_PREFIX_ADDRESS, 16, 4, req->result, | 684 | DUMP_PREFIX_ADDRESS, 16, 4, req->result, |
683 | digestsize, 1); | 685 | digestsize, 1); |
684 | #endif | 686 | #endif |
@@ -712,11 +714,11 @@ static void ahash_done_ctx_src(struct device *jrdev, u32 *desc, u32 err, | |||
712 | kfree(edesc); | 714 | kfree(edesc); |
713 | 715 | ||
714 | #ifdef DEBUG | 716 | #ifdef DEBUG |
715 | print_hex_dump(KERN_ERR, "ctx@"xstr(__LINE__)": ", | 717 | print_hex_dump(KERN_ERR, "ctx@"__stringify(__LINE__)": ", |
716 | DUMP_PREFIX_ADDRESS, 16, 4, state->caam_ctx, | 718 | DUMP_PREFIX_ADDRESS, 16, 4, state->caam_ctx, |
717 | ctx->ctx_len, 1); | 719 | ctx->ctx_len, 1); |
718 | if (req->result) | 720 | if (req->result) |
719 | print_hex_dump(KERN_ERR, "result@"xstr(__LINE__)": ", | 721 | print_hex_dump(KERN_ERR, "result@"__stringify(__LINE__)": ", |
720 | DUMP_PREFIX_ADDRESS, 16, 4, req->result, | 722 | DUMP_PREFIX_ADDRESS, 16, 4, req->result, |
721 | digestsize, 1); | 723 | digestsize, 1); |
722 | #endif | 724 | #endif |
@@ -750,11 +752,11 @@ static void ahash_done_ctx_dst(struct device *jrdev, u32 *desc, u32 err, | |||
750 | kfree(edesc); | 752 | kfree(edesc); |
751 | 753 | ||
752 | #ifdef DEBUG | 754 | #ifdef DEBUG |
753 | print_hex_dump(KERN_ERR, "ctx@"xstr(__LINE__)": ", | 755 | print_hex_dump(KERN_ERR, "ctx@"__stringify(__LINE__)": ", |
754 | DUMP_PREFIX_ADDRESS, 16, 4, state->caam_ctx, | 756 | DUMP_PREFIX_ADDRESS, 16, 4, state->caam_ctx, |
755 | ctx->ctx_len, 1); | 757 | ctx->ctx_len, 1); |
756 | if (req->result) | 758 | if (req->result) |
757 | print_hex_dump(KERN_ERR, "result@"xstr(__LINE__)": ", | 759 | print_hex_dump(KERN_ERR, "result@"__stringify(__LINE__)": ", |
758 | DUMP_PREFIX_ADDRESS, 16, 4, req->result, | 760 | DUMP_PREFIX_ADDRESS, 16, 4, req->result, |
759 | digestsize, 1); | 761 | digestsize, 1); |
760 | #endif | 762 | #endif |
@@ -850,7 +852,7 @@ static int ahash_update_ctx(struct ahash_request *req) | |||
850 | append_seq_out_ptr(desc, state->ctx_dma, ctx->ctx_len, 0); | 852 | append_seq_out_ptr(desc, state->ctx_dma, ctx->ctx_len, 0); |
851 | 853 | ||
852 | #ifdef DEBUG | 854 | #ifdef DEBUG |
853 | print_hex_dump(KERN_ERR, "jobdesc@"xstr(__LINE__)": ", | 855 | print_hex_dump(KERN_ERR, "jobdesc@"__stringify(__LINE__)": ", |
854 | DUMP_PREFIX_ADDRESS, 16, 4, desc, | 856 | DUMP_PREFIX_ADDRESS, 16, 4, desc, |
855 | desc_bytes(desc), 1); | 857 | desc_bytes(desc), 1); |
856 | #endif | 858 | #endif |
@@ -869,9 +871,9 @@ static int ahash_update_ctx(struct ahash_request *req) | |||
869 | *next_buflen = last_buflen; | 871 | *next_buflen = last_buflen; |
870 | } | 872 | } |
871 | #ifdef DEBUG | 873 | #ifdef DEBUG |
872 | print_hex_dump(KERN_ERR, "buf@"xstr(__LINE__)": ", | 874 | print_hex_dump(KERN_ERR, "buf@"__stringify(__LINE__)": ", |
873 | DUMP_PREFIX_ADDRESS, 16, 4, buf, *buflen, 1); | 875 | DUMP_PREFIX_ADDRESS, 16, 4, buf, *buflen, 1); |
874 | print_hex_dump(KERN_ERR, "next buf@"xstr(__LINE__)": ", | 876 | print_hex_dump(KERN_ERR, "next buf@"__stringify(__LINE__)": ", |
875 | DUMP_PREFIX_ADDRESS, 16, 4, next_buf, | 877 | DUMP_PREFIX_ADDRESS, 16, 4, next_buf, |
876 | *next_buflen, 1); | 878 | *next_buflen, 1); |
877 | #endif | 879 | #endif |
@@ -935,7 +937,7 @@ static int ahash_final_ctx(struct ahash_request *req) | |||
935 | digestsize); | 937 | digestsize); |
936 | 938 | ||
937 | #ifdef DEBUG | 939 | #ifdef DEBUG |
938 | print_hex_dump(KERN_ERR, "jobdesc@"xstr(__LINE__)": ", | 940 | print_hex_dump(KERN_ERR, "jobdesc@"__stringify(__LINE__)": ", |
939 | DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); | 941 | DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); |
940 | #endif | 942 | #endif |
941 | 943 | ||
@@ -1014,7 +1016,7 @@ static int ahash_finup_ctx(struct ahash_request *req) | |||
1014 | digestsize); | 1016 | digestsize); |
1015 | 1017 | ||
1016 | #ifdef DEBUG | 1018 | #ifdef DEBUG |
1017 | print_hex_dump(KERN_ERR, "jobdesc@"xstr(__LINE__)": ", | 1019 | print_hex_dump(KERN_ERR, "jobdesc@"__stringify(__LINE__)": ", |
1018 | DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); | 1020 | DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); |
1019 | #endif | 1021 | #endif |
1020 | 1022 | ||
@@ -1084,7 +1086,7 @@ static int ahash_digest(struct ahash_request *req) | |||
1084 | digestsize); | 1086 | digestsize); |
1085 | 1087 | ||
1086 | #ifdef DEBUG | 1088 | #ifdef DEBUG |
1087 | print_hex_dump(KERN_ERR, "jobdesc@"xstr(__LINE__)": ", | 1089 | print_hex_dump(KERN_ERR, "jobdesc@"__stringify(__LINE__)": ", |
1088 | DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); | 1090 | DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); |
1089 | #endif | 1091 | #endif |
1090 | 1092 | ||
@@ -1138,7 +1140,7 @@ static int ahash_final_no_ctx(struct ahash_request *req) | |||
1138 | edesc->src_nents = 0; | 1140 | edesc->src_nents = 0; |
1139 | 1141 | ||
1140 | #ifdef DEBUG | 1142 | #ifdef DEBUG |
1141 | print_hex_dump(KERN_ERR, "jobdesc@"xstr(__LINE__)": ", | 1143 | print_hex_dump(KERN_ERR, "jobdesc@"__stringify(__LINE__)": ", |
1142 | DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); | 1144 | DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); |
1143 | #endif | 1145 | #endif |
1144 | 1146 | ||
@@ -1226,7 +1228,7 @@ static int ahash_update_no_ctx(struct ahash_request *req) | |||
1226 | map_seq_out_ptr_ctx(desc, jrdev, state, ctx->ctx_len); | 1228 | map_seq_out_ptr_ctx(desc, jrdev, state, ctx->ctx_len); |
1227 | 1229 | ||
1228 | #ifdef DEBUG | 1230 | #ifdef DEBUG |
1229 | print_hex_dump(KERN_ERR, "jobdesc@"xstr(__LINE__)": ", | 1231 | print_hex_dump(KERN_ERR, "jobdesc@"__stringify(__LINE__)": ", |
1230 | DUMP_PREFIX_ADDRESS, 16, 4, desc, | 1232 | DUMP_PREFIX_ADDRESS, 16, 4, desc, |
1231 | desc_bytes(desc), 1); | 1233 | desc_bytes(desc), 1); |
1232 | #endif | 1234 | #endif |
@@ -1248,9 +1250,9 @@ static int ahash_update_no_ctx(struct ahash_request *req) | |||
1248 | *next_buflen = 0; | 1250 | *next_buflen = 0; |
1249 | } | 1251 | } |
1250 | #ifdef DEBUG | 1252 | #ifdef DEBUG |
1251 | print_hex_dump(KERN_ERR, "buf@"xstr(__LINE__)": ", | 1253 | print_hex_dump(KERN_ERR, "buf@"__stringify(__LINE__)": ", |
1252 | DUMP_PREFIX_ADDRESS, 16, 4, buf, *buflen, 1); | 1254 | DUMP_PREFIX_ADDRESS, 16, 4, buf, *buflen, 1); |
1253 | print_hex_dump(KERN_ERR, "next buf@"xstr(__LINE__)": ", | 1255 | print_hex_dump(KERN_ERR, "next buf@"__stringify(__LINE__)": ", |
1254 | DUMP_PREFIX_ADDRESS, 16, 4, next_buf, | 1256 | DUMP_PREFIX_ADDRESS, 16, 4, next_buf, |
1255 | *next_buflen, 1); | 1257 | *next_buflen, 1); |
1256 | #endif | 1258 | #endif |
@@ -1319,7 +1321,7 @@ static int ahash_finup_no_ctx(struct ahash_request *req) | |||
1319 | digestsize); | 1321 | digestsize); |
1320 | 1322 | ||
1321 | #ifdef DEBUG | 1323 | #ifdef DEBUG |
1322 | print_hex_dump(KERN_ERR, "jobdesc@"xstr(__LINE__)": ", | 1324 | print_hex_dump(KERN_ERR, "jobdesc@"__stringify(__LINE__)": ", |
1323 | DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); | 1325 | DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); |
1324 | #endif | 1326 | #endif |
1325 | 1327 | ||
@@ -1412,7 +1414,7 @@ static int ahash_update_first(struct ahash_request *req) | |||
1412 | map_seq_out_ptr_ctx(desc, jrdev, state, ctx->ctx_len); | 1414 | map_seq_out_ptr_ctx(desc, jrdev, state, ctx->ctx_len); |
1413 | 1415 | ||
1414 | #ifdef DEBUG | 1416 | #ifdef DEBUG |
1415 | print_hex_dump(KERN_ERR, "jobdesc@"xstr(__LINE__)": ", | 1417 | print_hex_dump(KERN_ERR, "jobdesc@"__stringify(__LINE__)": ", |
1416 | DUMP_PREFIX_ADDRESS, 16, 4, desc, | 1418 | DUMP_PREFIX_ADDRESS, 16, 4, desc, |
1417 | desc_bytes(desc), 1); | 1419 | desc_bytes(desc), 1); |
1418 | #endif | 1420 | #endif |
@@ -1436,7 +1438,7 @@ static int ahash_update_first(struct ahash_request *req) | |||
1436 | sg_copy(next_buf, req->src, req->nbytes); | 1438 | sg_copy(next_buf, req->src, req->nbytes); |
1437 | } | 1439 | } |
1438 | #ifdef DEBUG | 1440 | #ifdef DEBUG |
1439 | print_hex_dump(KERN_ERR, "next buf@"xstr(__LINE__)": ", | 1441 | print_hex_dump(KERN_ERR, "next buf@"__stringify(__LINE__)": ", |
1440 | DUMP_PREFIX_ADDRESS, 16, 4, next_buf, | 1442 | DUMP_PREFIX_ADDRESS, 16, 4, next_buf, |
1441 | *next_buflen, 1); | 1443 | *next_buflen, 1); |
1442 | #endif | 1444 | #endif |
diff --git a/drivers/crypto/caam/key_gen.c b/drivers/crypto/caam/key_gen.c index 87138d2adb5f..ea2e406610eb 100644 --- a/drivers/crypto/caam/key_gen.c +++ b/drivers/crypto/caam/key_gen.c | |||
@@ -95,9 +95,9 @@ int gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, | |||
95 | LDST_CLASS_2_CCB | FIFOST_TYPE_SPLIT_KEK); | 95 | LDST_CLASS_2_CCB | FIFOST_TYPE_SPLIT_KEK); |
96 | 96 | ||
97 | #ifdef DEBUG | 97 | #ifdef DEBUG |
98 | print_hex_dump(KERN_ERR, "ctx.key@"xstr(__LINE__)": ", | 98 | print_hex_dump(KERN_ERR, "ctx.key@"__stringify(__LINE__)": ", |
99 | DUMP_PREFIX_ADDRESS, 16, 4, key_in, keylen, 1); | 99 | DUMP_PREFIX_ADDRESS, 16, 4, key_in, keylen, 1); |
100 | print_hex_dump(KERN_ERR, "jobdesc@"xstr(__LINE__)": ", | 100 | print_hex_dump(KERN_ERR, "jobdesc@"__stringify(__LINE__)": ", |
101 | DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); | 101 | DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc), 1); |
102 | #endif | 102 | #endif |
103 | 103 | ||
@@ -110,7 +110,7 @@ int gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, | |||
110 | wait_for_completion_interruptible(&result.completion); | 110 | wait_for_completion_interruptible(&result.completion); |
111 | ret = result.err; | 111 | ret = result.err; |
112 | #ifdef DEBUG | 112 | #ifdef DEBUG |
113 | print_hex_dump(KERN_ERR, "ctx.key@"xstr(__LINE__)": ", | 113 | print_hex_dump(KERN_ERR, "ctx.key@"__stringify(__LINE__)": ", |
114 | DUMP_PREFIX_ADDRESS, 16, 4, key_out, | 114 | DUMP_PREFIX_ADDRESS, 16, 4, key_out, |
115 | split_key_pad_len, 1); | 115 | split_key_pad_len, 1); |
116 | #endif | 116 | #endif |