[PATCH v2 06/35] crypto: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang --- Changes in v2: - Fix a typo in commit message (memset -> memcpy) drivers/crypto/caam/caampkc.c | 11 +++ drivers/crypto/virtio/virtio_crypto_algs.c | 4 +--- 2 files changed, 4 inserti

[PATCH 05/30] crypto: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup rather than using kmalloc/kzalloc + memset. Signed-off-by: Fuqian Huang --- drivers/crypto/caam/caampkc.c | 11 +++ drivers/crypto/virtio/virtio_crypto_algs.c | 4 +--- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/crypto/caam/caampkc.c b

[PATCH v2 05/27] crypto: remove memset after dma_alloc_coherent

2019-06-27 Thread Fuqian Huang
In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/crypto/amcc/crypto4xx_core.c | 1 - 1 file changed,

[PATCH 11/87] crypto: amcc: Remove call to memset after dma_alloc_coherent

2019-06-27 Thread Fuqian Huang
In commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- drivers/crypto/amcc/crypto4xx_core.c | 1