[PATCH -next] crypto: ixp4xx -: use DEFINE_SPINLOCK() for spinlock

2021-04-06 Thread Huang Guobin
From: Guobin Huang spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Guobin Huang --- drivers/crypto/ixp4xx_crypto.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git

[PATCH -next] crypto: geode -: use DEFINE_SPINLOCK() for spinlock

2021-04-06 Thread Huang Guobin
From: Guobin Huang spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Guobin Huang --- drivers/crypto/geode-aes.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/driver

[PATCH v2] lib: Verify array index is correct before using it

2020-07-28 Thread Huang Guobin
This code reads from the array before verifying that "c" is a valid index. Move test array offset code before use to fix it. Fixes: 2da572c959dd ("lib: add software 842 compression/decompression") Signed-off-by: Huang Guobin --- lib/842/842_compress.c | 9 +++-- 1 file c