From: Wei Yongjun
GCC reports build error as following:
x86_64-linux-gnu-ld: drivers/crypto/hisilicon/hpre/hpre_crypto.o: in function
`hpre_ecdh_set_secret':
hpre_crypto.c:(.text+0x269c): undefined reference to `crypto_ecdh_decode_key'
Fix it by selecting CRYPTO_ECDH.
Reported-by:
Fix to return negative error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: 885743324513 ("crypto: keembay - Add support for Keem Bay OCS AES/SM4")
Reported-by: Hulk Robot
Signed-off-by: Wei Yongjun
---
drivers/crypto/keembay/keemb
Fix to return negative error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: 472b0cd3 ("crypto: keembay - Add Keem Bay OCS HCU driver")
Reported-by: Hulk Robot
Signed-off-by: Wei Yongjun
---
drivers/crypto/keembay/keembay-ocs-
It's not necessary to free memory allocated with devm_kzalloc
and using kfree leads to a double free.
Fixes: 190873a0ea45 ("crypto: ingenic - Add hardware RNG for Ingenic JZ4780 and
X1000")
Reported-by: Hulk Robot
Signed-off-by: Wei Yongjun
---
drivers/char/hw_random/in
PTR_ERR should access the value just tested by IS_ERR, otherwise
the wrong error code will be returned.
Fixes: 7694b6ca649f ("crypto: sa2ul - Add crypto driver")
Reported-by: Hulk Robot
Signed-off-by: Wei Yongjun
---
drivers/crypto/sa2ul.c | 2 +-
1 file changed, 1 insertion(+),
Fix to return negative error code -ENOMEM from kmalloc() error handling
case instead of 0, as done elsewhere in this function.
Fixes: f1774cb8956a ("X.509: parse public key parameters from x509 for
akcipher")
Signed-off-by: Wei Yongjun
---
crypto/asymmetric_keys/public_key.c | 2
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: 34aba2c45024 ("cxgb4/chcr : Register to tls add and del callback")
Reported-by: Hulk Robot
Signed-off-by: Wei Yongjun
---
drivers/crypto/chelsio/chcr_ktls.c | 3 +
Fix to return negative error code -ENOMEM from the kzalloc error handling
case instead of 0, as done elsewhere in this function.
Fixes: db07cd26ac6a ("crypto: drbg - add FIPS 140-2 CTRNG for noise source")
Signed-off-by: Wei Yongjun
---
crypto/drbg.c | 4 +++-
1 file changed, 3 insert
When using single_open() for opening, single_release() should be
used instead of seq_release(), otherwise there is a memory leak.
Fixes: 09ae5d37e093 ("crypto: zip - Add Compression/Decompression statistics")
Signed-off-by: Wei Yongjun
---
drivers/crypto/cavium/zip/zip_main.c | 3 +
Fixes the following sparse warning:
drivers/char/hw_random/optee-rng.c:265:35: warning:
symbol 'optee_rng_id_table' was not declared. Should it be static?
Fixes: 5fe8b1cc6a03 ("hwrng: add OP-TEE based rng driver")
Signed-off-by: Wei Yongjun
---
drivers/char/hw_random/o
crypto: mxs-dcp - Fix SHA null hashes and output length")
Signed-off-by: Wei Yongjun
---
drivers/crypto/mxs-dcp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
index 849a81e..4e6ff32 100644
--- a/drivers/crypto/mxs-
Fixes the following sparse warning:
drivers/crypto/ccp/psp-dev.c:444:5: warning:
symbol 'sev_get_firmware' was not declared. Should it be static?
Fixes: e93720606efd ("crypto: ccp - Allow SEV firmware to be chosen based on
Family and Model")
Signed-off-by: Wei Yongjun
---
Fixes the following sparse warning:
drivers/crypto/ccp/psp-dev.c:444:5: warning:
symbol 'sev_get_firmware' was not declared. Should it be static?
Signed-off-by: Wei Yongjun
---
drivers/crypto/ccp/psp-dev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/driv
Fixes the following sparse warning:
drivers/crypto/hisilicon/sec/sec_algs.c:396:5: warning:
symbol 'sec_send_request' was not declared. Should it be static?
Fixes: 915e4e8413da ("crypto: hisilicon - SEC security accelerator driver")
Signed-off-by: Wei Yongjun
---
drivers/
Add the missing unlock before return from function
safexcel_ahash_send_req() in the error handling case.
Fixes: cff9a17545a3 ("crypto: inside-secure - move cache result dma mapping to
request")
Signed-off-by: Wei Yongjun
---
drivers/crypto/inside-secure/safexcel_hash.c | 4 +++-
1 fi
Fixes the following sparse warnings:
drivers/char/hw_random/imx-rngc.c:303:1: warning:
symbol 'imx_rngc_pm_ops' was not declared. Should it be static?
Signed-off-by: Wei Yongjun
---
drivers/char/hw_random/imx-rngc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.
Signed-off-by: Wei Yongjun
---
drivers/crypto/stm32/stm32-cryp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/crypto/stm32/stm32-cryp.c
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.
Signed-off-by: Wei Yongjun
---
drivers/char/hw_random/bcm2835-rng.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/char/hw_random/bcm2835
devm_ioremap_resource() already checks if the resource is NULL, so
remove the unnecessary platform_get_resource() error check.
Signed-off-by: Wei Yongjun
---
drivers/crypto/axis/artpec6_crypto.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/crypto/axis/artpec6_crypto.c
b
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.
Signed-off-by: Wei Yongjun
---
drivers/staging/ccree/cc_driver.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/ccree/cc_driver.c
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.
Signed-off-by: Wei Yongjun
---
drivers/char/hw_random/exynos-trng.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/char/hw_random/exynos
From: Wei Yongjun
The module alias information passed to MODULE_DEVICE_TABLE()
should use stm32_dt_ids instead of undefined sti_dt_ids.
Fixes: b51dbe90912a ("crypto: stm32 - Support for STM32 CRC32 crypto module")
Signed-off-by: Wei Yongjun
---
drivers/crypto/stm32/stm32_crc32.c
From: Wei Yongjun
Fix to return error code -ENOMEM from the kmem_cache_create() error
handling case instead of 0(err is 0 here), as done elsewhere in this
function.
Fixes: 67c2315def06 ("crypto: caam - add Queue Interface (QI) backend support")
Signed-off-by: Wei Yongjun
---
driv
From: Wei Yongjun
Fix to return error code -ENOMEM from the akcipher_request_alloc()
error handling case instead of 0.
Signed-off-by: Wei Yongjun
---
crypto/asymmetric_keys/public_key.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/crypto/asymmetric_keys
From: Wei Yongjun
Fixes the following sparse warning:
drivers/crypto/mediatek/mtk-platform.c:585:27: warning:
symbol 'of_crypto_id' was not declared. Should it be static?
Signed-off-by: Wei Yongjun
---
drivers/crypto/mediatek/mtk-platform.c | 2 +-
1 file changed, 1 insertion(+),
From: Wei Yongjun
Since clk_prepare_enable() is used to get trng->clk, we should
use clk_disable_unprepare() to release it for the error path.
Signed-off-by: Wei Yongjun
---
drivers/char/hw_random/atmel-rng.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/c
From: Wei Yongjun
There is no need to have the 'struct atmel_aes_dev *aes_dd' variable
static since new value always be assigned before use it.
Signed-off-by: Wei Yongjun
---
drivers/crypto/atmel-aes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cr
From: Wei Yongjun
Fixes the following sparse warning:
drivers/crypto/ccp/ccp-dev.c:44:6: warning:
symbol 'ccp_error_codes' was not declared. Should it be static?
Signed-off-by: Wei Yongjun
---
drivers/crypto/ccp/ccp-dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
di
From: Wei Yongjun
Fix to return error code -EINVAL from the invalid alg ivsize error
handling case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun
---
crypto/gcm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crypto/gcm.c b/crypto/gcm.c
From: Wei Yongjun
Fix the retrn value check which testing the wrong variable
in ccp_dmaengine_register().
Fixes: 58ea8abf4904 ("crypto: ccp - Register the CCP as a DMA resource")
Signed-off-by: Wei Yongjun
---
drivers/crypto/ccp/ccp-dmaengine.c | 2 +-
1 file changed, 1 inser
From: Wei Yongjun
In case of error, the function devm_ioremap() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check should
be replaced with NULL test.
Fixes: 6e9b5e76882c ("hwrng: geode - Migrate to managed API")
Signed-off-by: Wei Yongjun
---
dr
From: Wei Yongjun
In case of error, the function devm_kzalloc() or devm_ioport_map()
return NULL pointer not ERR_PTR(). The IS_ERR() test in the return
value check should be replaced with NULL test.
Fixes: 31b2a73c9c5f ("hwrng: amd - Migrate to managed API")
Signed-off-by: W
From: Wei Yongjun
Using kmem_cache_zalloc() instead of kmem_cache_alloc() and memset().
Signed-off-by: Wei Yongjun
---
drivers/crypto/ccp/ccp-dmaengine.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-dmaengine.c
b/drivers/crypto/ccp/ccp
From: Wei Yongjun
Fix to return error code -ENOMEM from the crypto_engine_alloc_init()
error handling case instead of 0, as done elsewhere in this function.
Fixes: 0529900a01cb ("crypto: omap-aes - Support crypto engine framework")
Signed-off-by: Wei Yongjun
---
drivers/crypto/omap
From: Wei Yongjun
Fix to return error code -ENOMEM from the crypto_engine_alloc_init()
error handling case instead of 0, as done elsewhere in this function.
Fixes: f1b77aaca85a ("crypto: omap-des - Integrate with the crypto
engine framework")
Signed-off-by: Wei Yongjun
---
drivers/c
From: Wei Yongjun
Fix the missing clk_disable_unprepare() before return
from st_rng_probe() in the error handling case.
Signed-off-by: Wei Yongjun
---
drivers/char/hw_random/st-rng.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/char/hw_random/st-rng.c b/drivers/char/hw_random
From: Wei Yongjun
Fixes the following sparse warning:
drivers/crypto/chelsio/chcr_algo.c:593:5: warning:
symbol 'cxgb4_is_crypto_q_full' was not declared. Should it be static?
Signed-off-by: Wei Yongjun
---
v1 -> v2: cc netdev maillist
---
drivers/crypto/chelsio/chcr_algo.c |
Hi Herbert,
On 08/24/2016 09:06 PM, Herbert Xu wrote:
> On Mon, Aug 22, 2016 at 04:11:18PM +0000, Wei Yongjun wrote:
>> From: Wei Yongjun
>>
>> Fixes the following sparse warning:
>>
>> drivers/crypto/chelsio/chcr_algo.c:593:5: warning:
>> symbol
From: Wei Yongjun
Fixes the following sparse warning:
drivers/crypto/chelsio/chcr_algo.c:593:5: warning:
symbol 'cxgb4_is_crypto_q_full' was not declared. Should it be static?
Signed-off-by: Wei Yongjun
---
drivers/crypto/chelsio/chcr_algo.c | 2 +-
1 file changed, 1 inser
Fix to return a negative error code from the error handling
case instead of 0.
Signed-off-by: Wei Yongjun
---
crypto/drbg.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/crypto/drbg.c b/crypto/drbg.c
index edf3ce0..fb33f7d 100644
--- a/crypto/drbg.c
+++ b
Add the missing unlock before return from function sun4i_hash()
in the error handling case.
Fixes: 477d9b2e591b ("crypto: sun4i-ss - unify update/final function")
Signed-off-by: Wei Yongjun
---
v1 -> v2: goto release_ss as LABBE Corentin's suggestion
---
drivers/crypto/sunxi-
Add the missing unlock before return from function sun4i_hash()
in the error handling case.
Fixes: 477d9b2e591b ("crypto: sun4i-ss - unify update/final function")
Signed-off-by: Wei Yongjun
---
drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 1 +
1 file changed, 1 insertion(+)
diff --git
Fixes the following sparse warning:
drivers/crypto/ccp/ccp-dev.c:62:14: warning:
symbol 'ccp_increment_unit_ordinal' was not declared. Should it be static?
Signed-off-by: Wei Yongjun
---
drivers/crypto/ccp/ccp-dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
From: Wei Yongjun
Fixes the following sparse warning:
drivers/crypto/mxs-dcp.c:103:1: warning:
symbol 'global_mutex' was not declared. Should it be static?
Signed-off-by: Wei Yongjun
---
drivers/crypto/mxs-dcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
From: Wei Yongjun
free_irq() expects the same device identity that was passed
to request_irq(), otherwise the IRQ is not freed.
Signed-off-by: Wei Yongjun
---
drivers/crypto/hifn_795x.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/hifn_795x.c b
From: Wei Yongjun
Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.
Signed-off-by: Wei Yongjun
---
drivers/crypto/ux500/hash/hash_core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/crypto/ux500/hash
From: Wei Yongjun
clk_put(dd->aes_clk) will dereference an error-valued pointer since the
dd->aes_clk is a ERR_PTR() value. The correct check is call clk_put()
if !IS_ERR(dd->aes_clk).
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-of
From: Wei Yongjun
Add the missing unlock on the error handling path in function
tegra_aes_get_random() and tegra_aes_rng_reset().
Signed-off-by: Wei Yongjun
---
drivers/crypto/tegra-aes.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/tegra-aes.c b
From: Wei Yongjun
Convert cpu_to_be16(be16_to_cpu(E1) + E2) to use be16_add_cpu().
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun
---
drivers/crypto/talitos.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
From: Wei Yongjun
From: Wei Yongjun
Remove duplicated include.
Signed-off-by: Wei Yongjun
---
drivers/crypto/atmel-aes.c | 5 -
drivers/crypto/atmel-sha.c | 5 -
drivers/crypto/atmel-tdes.c | 5 -
3 files changed, 15 deletions(-)
diff --git a/drivers/crypto/atmel-aes.c b
50 matches
Mail list logo