CC: [email protected] CC: [email protected] TO: Corentin Labbe <[email protected]> CC: Herbert Xu <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 729e3d091984487f7aa1ebfabfe594e5b317ed0f commit: f08fcced6d0017c39cb6eccb571290867119d049 crypto: allwinner - Add sun8i-ss cryptographic offloader date: 11 months ago :::::: branch date: 29 hours ago :::::: commit date: 11 months ago compiler: powerpc-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> cppcheck warnings: (new ones prefixed by >>) >> drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c:56:8: warning: Variable >> 'in_sg' is reassigned a value before the old one has been used. >> [redundantAssignment] in_sg = areq->src; ^ drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c:24:0: note: Variable 'in_sg' is reassigned a value before the old one has been used. struct scatterlist *in_sg = areq->src; ^ drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c:56:8: note: Variable 'in_sg' is reassigned a value before the old one has been used. in_sg = areq->src; ^ >> drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c:57:9: warning: Variable >> 'out_sg' is reassigned a value before the old one has been used. >> [redundantAssignment] out_sg = areq->dst; ^ drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c:25:0: note: Variable 'out_sg' is reassigned a value before the old one has been used. struct scatterlist *out_sg = areq->dst; ^ drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c:57:9: note: Variable 'out_sg' is reassigned a value before the old one has been used. out_sg = areq->dst; ^ # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f08fcced6d0017c39cb6eccb571290867119d049 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout f08fcced6d0017c39cb6eccb571290867119d049 vim +/in_sg +56 drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c f08fcced6d0017 Corentin Labbe 2019-10-25 21 f08fcced6d0017 Corentin Labbe 2019-10-25 22 static bool sun8i_ss_need_fallback(struct skcipher_request *areq) f08fcced6d0017 Corentin Labbe 2019-10-25 23 { f08fcced6d0017 Corentin Labbe 2019-10-25 24 struct scatterlist *in_sg = areq->src; f08fcced6d0017 Corentin Labbe 2019-10-25 25 struct scatterlist *out_sg = areq->dst; f08fcced6d0017 Corentin Labbe 2019-10-25 26 struct scatterlist *sg; f08fcced6d0017 Corentin Labbe 2019-10-25 27 f08fcced6d0017 Corentin Labbe 2019-10-25 28 if (areq->cryptlen == 0 || areq->cryptlen % 16) f08fcced6d0017 Corentin Labbe 2019-10-25 29 return true; f08fcced6d0017 Corentin Labbe 2019-10-25 30 f08fcced6d0017 Corentin Labbe 2019-10-25 31 if (sg_nents(areq->src) > 8 || sg_nents(areq->dst) > 8) f08fcced6d0017 Corentin Labbe 2019-10-25 32 return true; f08fcced6d0017 Corentin Labbe 2019-10-25 33 f08fcced6d0017 Corentin Labbe 2019-10-25 34 sg = areq->src; f08fcced6d0017 Corentin Labbe 2019-10-25 35 while (sg) { f08fcced6d0017 Corentin Labbe 2019-10-25 36 if ((sg->length % 16) != 0) f08fcced6d0017 Corentin Labbe 2019-10-25 37 return true; f08fcced6d0017 Corentin Labbe 2019-10-25 38 if ((sg_dma_len(sg) % 16) != 0) f08fcced6d0017 Corentin Labbe 2019-10-25 39 return true; f08fcced6d0017 Corentin Labbe 2019-10-25 40 if (!IS_ALIGNED(sg->offset, 16)) f08fcced6d0017 Corentin Labbe 2019-10-25 41 return true; f08fcced6d0017 Corentin Labbe 2019-10-25 42 sg = sg_next(sg); f08fcced6d0017 Corentin Labbe 2019-10-25 43 } f08fcced6d0017 Corentin Labbe 2019-10-25 44 sg = areq->dst; f08fcced6d0017 Corentin Labbe 2019-10-25 45 while (sg) { f08fcced6d0017 Corentin Labbe 2019-10-25 46 if ((sg->length % 16) != 0) f08fcced6d0017 Corentin Labbe 2019-10-25 47 return true; f08fcced6d0017 Corentin Labbe 2019-10-25 48 if ((sg_dma_len(sg) % 16) != 0) f08fcced6d0017 Corentin Labbe 2019-10-25 49 return true; f08fcced6d0017 Corentin Labbe 2019-10-25 50 if (!IS_ALIGNED(sg->offset, 16)) f08fcced6d0017 Corentin Labbe 2019-10-25 51 return true; f08fcced6d0017 Corentin Labbe 2019-10-25 52 sg = sg_next(sg); f08fcced6d0017 Corentin Labbe 2019-10-25 53 } f08fcced6d0017 Corentin Labbe 2019-10-25 54 f08fcced6d0017 Corentin Labbe 2019-10-25 55 /* SS need same numbers of SG (with same length) for source and destination */ f08fcced6d0017 Corentin Labbe 2019-10-25 @56 in_sg = areq->src; f08fcced6d0017 Corentin Labbe 2019-10-25 @57 out_sg = areq->dst; f08fcced6d0017 Corentin Labbe 2019-10-25 58 while (in_sg && out_sg) { f08fcced6d0017 Corentin Labbe 2019-10-25 59 if (in_sg->length != out_sg->length) f08fcced6d0017 Corentin Labbe 2019-10-25 60 return true; f08fcced6d0017 Corentin Labbe 2019-10-25 61 in_sg = sg_next(in_sg); f08fcced6d0017 Corentin Labbe 2019-10-25 62 out_sg = sg_next(out_sg); f08fcced6d0017 Corentin Labbe 2019-10-25 63 } f08fcced6d0017 Corentin Labbe 2019-10-25 64 if (in_sg || out_sg) f08fcced6d0017 Corentin Labbe 2019-10-25 65 return true; f08fcced6d0017 Corentin Labbe 2019-10-25 66 return false; f08fcced6d0017 Corentin Labbe 2019-10-25 67 } f08fcced6d0017 Corentin Labbe 2019-10-25 68 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected] _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
