[PATCH v3 5/5] crypto: hisilicon/sgl - fix the sg buf unmap

2021-04-09 Thread Kai Ye
Add data cleared operation for sge data. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index 7f11e41..0572737 100644 --- a/drivers/crypto

[PATCH v3 0/5] bug fix and clear coding style

2021-04-09 Thread Kai Ye
ock size initialization. v2 -> v3: fix a sparse warning Kai Ye (5): crypto: hisilicon/sgl - add a comment for block size initialization crypto: hisilicon/sgl - delete unneeded variable initialization crypto: hisilicon/sgl - add some dfx logs crypto: hisilicon/sgl - fix the soft

[PATCH v3 4/5] crypto: hisilicon/sgl - fix the soft sg map to hardware sg

2021-04-09 Thread Kai Ye
The buffer of the hardware sge needs to be initialized by soft sgl. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index d04e551..7f11e41 100644 --- a/drivers/crypto

[PATCH v3 2/5] crypto: hisilicon/sgl - delete unneeded variable initialization

2021-04-09 Thread Kai Ye
Delete unneeded variable initialization Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index cf1629c..b8a811f 100644 --- a/drivers/crypto/hisilicon/sgl.c

[PATCH v3 1/5] crypto: hisilicon/sgl - add a comment for block size initialization

2021-04-09 Thread Kai Ye
This seems "32" and "31" is obfuscating, It might be better to add a comment, which explain it. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon

[PATCH v3 3/5] crypto: hisilicon/sgl - add some dfx logs

2021-04-09 Thread Kai Ye
Add some dfx logs in some abnormal exit situations. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index b8a811f..d04e551 100644

[PATCH 0/2] crypto: correct the use of print format

2021-04-08 Thread Kai Ye
According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Otherwise printk() might end up displaying negative numbers. Kai Ye (2): crypto/atmel - use the correct print format crypto: hisilicon/sec_drv

[PATCH 1/2] crypto/atmel - use the correct print format

2021-04-08 Thread Kai Ye
According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Signed-off-by: Kai Ye --- drivers/crypto/atmel-i2c.c | 2 +- drivers/crypto/atmel-sha.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions

[PATCH 2/2] crypto: hisilicon/sec_drv - use the correct print format

2021-04-08 Thread Kai Ye
According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sec/sec_drv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers

[PATCH] net/Bluetooth - use the correct print format

2021-04-06 Thread Kai Ye
Use the correct print format. Printing an unsigned int value should use %u instead of %d. For details, please read document: Documentation/core-api/printk-formats.rst Signed-off-by: Kai Ye --- net/bluetooth/l2cap_core.c | 16 1 file changed, 8 insertions(+), 8 deletions

[PATCH v2] crypto: hisilicon/qm - delete redundant code

2021-04-02 Thread Kai Ye
The "qdma" is a structure variable instead of actual data. This structure doesn't need to be zerod, The memset is useless and redundant. So delete it. Signed-off-by: Kai Ye --- Changes v1 -> v2: Re-edit the description. drivers/crypto/hisilicon/qm.c | 1 - 1 file changed, 1 dele

[PATCH] net/Bluetooth - delete unneeded variable initialization

2021-04-02 Thread Kai Ye
Delete unneeded variable initialization. Signed-off-by: Kai Ye --- net/bluetooth/6lowpan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c index cff4944..ee4b0ec 100644 --- a/net/bluetooth/6lowpan.c +++ b/net/bluetooth

[PATCH] crypto:hisilicon/sec - fixup checking the 3DES weak key

2021-04-01 Thread Kai Ye
skcipher: Add a verifying to check whether the triple DES key is weak. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sec2/sec_crypto.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/hisilicon/sec2/sec_crypto.c b/drivers/crypto/hisilicon

[PATCH] crypto: rockchip/rk3288_crypto_ahash - delete unneeded variable initialization

2021-03-31 Thread Kai Ye
Delete unneeded variable initialization Signed-off-by: Kai Ye --- drivers/crypto/rockchip/rk3288_crypto_ahash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/rockchip/rk3288_crypto_ahash.c b/drivers/crypto/rockchip/rk3288_crypto_ahash.c index 81befe7

[PATCH v2 5/5] crypto: hisilicon/sgl - fix the sg buf unmap

2021-03-31 Thread Kai Ye
Add data cleared operation for sge data. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index 7f11e41..101456b 100644 --- a/drivers/crypto

[PATCH v2 2/5] crypto: hisilicon/sgl - delete unneeded variable initialization

2021-03-31 Thread Kai Ye
Delete unneeded variable initialization Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index cf1629c..b8a811f 100644 --- a/drivers/crypto/hisilicon/sgl.c

[PATCH v2 4/5] crypto: hisilicon/sgl - fix the soft sg map to hardware sg

2021-03-31 Thread Kai Ye
The buffer of the hardware sge needs to be initialized by soft sgl. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index d04e551..7f11e41 100644 --- a/drivers/crypto

[PATCH v2 3/5] crypto: hisilicon/sgl - add some dfx logs

2021-03-31 Thread Kai Ye
Add some dfx logs in some abnormal exit situations. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index b8a811f..d04e551 100644

[PATCH v2 1/5] crypto: hisilicon/sgl - add a comment for block size initialization

2021-03-31 Thread Kai Ye
This seems "32" and "31" is obfuscating, It might be better to add a comment, which explain it. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon

[PATCH v2 0/5] bug fix and clear coding style

2021-03-31 Thread Kai Ye
ock size initialization. Kai Ye (5): crypto: hisilicon/sgl - add a comment for block size initialization crypto: hisilicon/sgl - delete unneeded variable initialization crypto: hisilicon/sgl - add some dfx logs crypto: hisilicon/sgl - fix the soft sg map to hardware sg crypto: hisilicon/

[PATCH v2 4/5] crypto: hisilicon/sgl - fix the soft sg map to hardware sg

2021-03-30 Thread Kai Ye
The buffer of the hardware sge needs to be initialized by soft sgl. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index 4bece3d..c618aaf 100644 --- a/drivers/crypto

[PATCH v2 0/5] bug fix and clear coding style

2021-03-30 Thread Kai Ye
fixup coding style such as magic number and unneeded variable initialization. Clear data operation in sg buf unmap, and other misc fix. Kai Ye (5): crypto: hisilicon/sgl - fixup coding style crypto: hisilicon/sgl - delete unneeded variable initialization crypto: hisilicon/sgl - add some dfx

[PATCH v2 2/5] crypto: hisilicon/sgl - delete unneeded variable initialization

2021-03-30 Thread Kai Ye
delete unneeded variable initialization Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index bd5ef40..b816e74 100644 --- a/drivers/crypto/hisilicon/sgl.c

[PATCH v2 3/5] crypto: hisilicon/sgl - add some dfx logs

2021-03-30 Thread Kai Ye
Add some dfx logs in some abnormal exit situations. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index b816e74..4bece3d 100644

[PATCH v2 1/5] crypto: hisilicon/sgl - fixup coding style

2021-03-30 Thread Kai Ye
use a macro replace of a magic number. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index 3bff639..bd5ef40 100644 --- a/drivers/crypto/hisilicon

[PATCH v2 5/5] crypto: hisilicon/sgl - fix the sg buf unmap

2021-03-30 Thread Kai Ye
Add clear data operation for sge data. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/sgl.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon/sgl.c b/drivers/crypto/hisilicon/sgl.c index c618aaf..7a58ab3 100644 --- a/drivers/crypto

[PATCH v3] uacce: delete unneeded variable initialization

2021-03-26 Thread Kai Ye
delete unneeded variable initialization. Signed-off-by: Kai Ye --- Changes v2 -> v3: re-edit the subject line. drivers/misc/uacce/uacce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index d07af4e..94843e0 100

[PATCH 3/3] crypto: stm32 - use memzero_explicit() for clearing data

2021-03-25 Thread Kai Ye
use memzero_explicit instead of memset to clear sensitive data Signed-off-by: Kai Ye --- drivers/crypto/stm32/stm32-cryp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/stm32/stm32-cryp.c b/drivers/crypto/stm32/stm32-cryp.c index 2a479317..c4297e80 100644

[PATCH 0/3] crypto: replace memset by memzero_explicit

2021-03-25 Thread Kai Ye
use memzero_explicit instead of memset to clear sensitive data, such as buffer or key. Kai Ye (3): crypto: atmel - use memzero_explicit() for clearing data crypto: qce - use memzero_explicit() for clearing data crypto: stm32 - use memzero_explicit() for clearing data drivers/crypto

[PATCH 1/3] crypto: atmel - use memzero_explicit() for clearing data

2021-03-25 Thread Kai Ye
use memzero_explicit instead of memset to clear sensitive data, such as key. Signed-off-by: Kai Ye --- drivers/crypto/atmel-sha.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c index 352d80c..4a08b2a 100644

[PATCH 2/3] crypto: qce - use memzero_explicit() for clearing data

2021-03-25 Thread Kai Ye
use memzero_explicit instead of memset to clear sensitive data. Signed-off-by: Kai Ye --- drivers/crypto/qce/sha.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/qce/sha.c b/drivers/crypto/qce/sha.c index 61c418c..cb9b3da 100644 --- a/drivers/crypto/qce/sha.c +++ b/drivers

[PATCH] crypto: hisilicon/qm - delete redundant code

2021-03-25 Thread Kai Ye
The memory not needed to clear that will be freed. and the memset is useless after the dma is freed. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/qm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index 13cb421..88a6c6f

[PATCH v2] uacce: delete not be needed variable initialization

2021-03-25 Thread Kai Ye
delete not be needed variable initialization. Signed-off-by: Kai Ye --- drivers/misc/uacce/uacce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index d07af4e..94843e0 100644 --- a/drivers/misc/uacce/uacce.c +++ b

[PATCH] uacce: fixup coding style

2021-03-24 Thread Kai Ye
delete invalid and redundant variable initialization. Signed-off-by: Kai Ye Reviewed-by: Zhou Wang --- drivers/misc/uacce/uacce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index d07af4e..94843e0 100644

[PATCH] mm: khugepaged - fix coding style

2021-03-22 Thread Kai Ye
fix checkpatch warning: spaces required around that '+'. Signed-off-by: Kai Ye --- mm/khugepaged.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 67ab391..f648c38 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -1236,7 +1236,7

[PATCH] crypto: testmgr - delete some redundant code

2021-02-22 Thread Kai Ye
Delete sg_data function, because sg_data function definition same as sg_virt(), so need to delete it and use sg_virt() replace to sg_data(). Signed-off-by: Kai Ye --- crypto/testmgr.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/crypto/testmgr.c b/crypto

[PATCH 1/3] crypto: hisilicon - add ZIP device using mode parameter

2021-01-04 Thread Kai Ye
Add 'uacce_mode' parameter for ZIP, which can be set as 0(default) or 1. '0' means ZIP is only registered to kernel crypto, and '1' means it's registered to both kernel crypto and UACCE. Signed-off-by: Kai Ye Reviewed-by: Zhou Wang Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/qm.c

[PATCH 2/3] crypto: hisilicon/hpre - register HPRE device to uacce

2021-01-04 Thread Kai Ye
Register HPRE device to uacce framework for user space. Signed-off-by: Kai Ye Reviewed-by: Zhou Wang Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/hpre/hpre_main.c | 54 +++ 1 file changed, 54 insertions(+) diff --git a/drivers/crypto/hisilicon/hpre

[PATCH 0/3] crypto: hisilicon - register device to uacce

2021-01-04 Thread Kai Ye
1. Add parameter of UACCE mode selection for ZIP. 2. Register SEC and HPRE devices to UACCE framework for user space drivers. Kai Ye (3): crypto: hisilicon - add ZIP device using mode parameter crypto: hisilicon/hpre - register HPRE device to uacce crypto: hisilicon/sec - register SEC

[PATCH 3/3] crypto: hisilicon/sec - register SEC device to uacce

2021-01-04 Thread Kai Ye
Register SEC device to uacce framework for user space. Signed-off-by: Kai Ye Reviewed-by: Zhou Wang Reviewed-by: Zaibo Xu --- drivers/crypto/hisilicon/sec2/sec_main.c | 39 +++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/hisilicon

[PATCH] crypto: hisilicon/qm - SVA bugfixed on Kunpeng920

2021-01-04 Thread Kai Ye
Kunpeng920 SEC/HPRE/ZIP cannot support running user space SVA and kernel Crypto at the same time. Therefore, the algorithms should not be registered to Crypto as user space SVA is enabled. Signed-off-by: Kai Ye Reviewed-by: Zaibo Xu Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 6

[RESEND PATCH v3 1/2] uacce: delete some redundant code.

2020-11-02 Thread Kai Ye
Delete some redundant code. Signed-off-by: Kai Ye Reviewed-by: Zhou Wang Reviewed-by: Jonathan Cameron Acked-by: Zhangfei Gao --- drivers/misc/uacce/uacce.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index 56dd98a

[RESEND PATCH v3 0/2] uacce: fix some coding styles

2020-11-02 Thread Kai Ye
From: y00501072 1. delete some redundant code. 2. modify the module author information. "Hisilicon" spelling is error. Changes v2 -> v3: Two things, splited to two patches. Changes v1 -> v2: deleted extra NULL pointer check in uacce_fops. Kai Ye (2): ua

[RESEND PATCH v3 2/2] uacce: modify the module author information.

2020-11-02 Thread Kai Ye
The spelling of "Hisilicon" is modified. Signed-off-by: Kai Ye Reviewed-by: Zhou Wang Reviewed-by: Jonathan Cameron Acked-by: Zhangfei Gao --- drivers/misc/uacce/uacce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/uacce/uacce.c b/drivers/

[PATCH v3 1/2] uacce: delete some redundant code.

2020-09-23 Thread Kai Ye
Delete some redundant code. Signed-off-by: Kai Ye Reviewed-by: Zhou Wang Reviewed-by: Jonathan Cameron Acked-by: Zhangfei Gao --- drivers/misc/uacce/uacce.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index 107028e

[PATCH v3 2/2] uacce: modify the module author information.

2020-09-23 Thread Kai Ye
The spelling of "Hisilicon" is modified. Signed-off-by: Kai Ye Reviewed-by: Zhou Wang Reviewed-by: Jonathan Cameron Acked-by: Zhangfei Gao --- drivers/misc/uacce/uacce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/uacce/uacce.c b/drivers/

[PATCH v3 0/2] uacce: fix some coding styles

2020-09-23 Thread Kai Ye
1. delete some redundant code. 2. modify the module author information. "Hisilicon" spelling is error. Changes v2 -> v3: Two things, splited to two patches. Changes v1 -> v2: deleted extra NULL pointer check in uacce_fops. Kai Ye (2): uacce: fix some codin

[PATCH] uacce: fix some coding styles

2020-09-13 Thread Kai Ye
1. delete some redundant code. 2. modify the module author information. Signed-off-by: Kai Ye Reviewed-by: Zhou Wang Acked-by: Zhangfei Gao --- Changes in V2: deleted extra NULL pointer check in uacce_fops. drivers/misc/uacce/uacce.c | 13 + 1 file changed, 1 insertion

[PATCH] uacce: fix some coding styles

2020-07-30 Thread Kai Ye
1. delete some redundant code. 2. modify the module author information. Signed-off-by: Kai Ye --- Changes in V2: deleted extra NULL pointer check in uacce_fops. drivers/misc/uacce/uacce.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/misc

[PATCH] uacce: fix some coding styles

2020-07-20 Thread Kai Ye
1. add some parameter check. 2. delete some redundant code. 3. modify the module author information. Signed-off-by: Kai Ye Reviewed-by: Zhou Wang --- drivers/misc/uacce/uacce.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/drivers/misc/uacce