| 7866701c | 20-Oct-2023 |
Uwe Kleine-König <[email protected]> |
crypto: aspeed-hace - Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to d
crypto: aspeed-hace - Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove().
Trivially convert this driver from always returning zero in the remove callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Andrew Jeffery <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| d33a6a3f | 13-Aug-2023 |
Herbert Xu <[email protected]> |
crypto: aspeed - Remove non-standard sha512 algorithms
Algorithms must never be added to a driver unless there is a generic implementation. These truncated versions of sha512 slipped through. Remov
crypto: aspeed - Remove non-standard sha512 algorithms
Algorithms must never be added to a driver unless there is a generic implementation. These truncated versions of sha512 slipped through. Remove them as they are useless.
Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| e9040736 | 19-Jan-2023 |
ye xingchen <[email protected]> |
crypto: aspeed - Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactl
crypto: aspeed - Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does.
Signed-off-by: ye xingchen <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| f104b216 | 10-Jan-2023 |
Gustavo A. R. Silva <[email protected]> |
crypto: aspeed - Replace zero-length array with flexible-array member
Zero-length arrays are deprecated[1] and we are moving towards adopting C99 flexible-array members instead. So, replace zero-len
crypto: aspeed - Replace zero-length array with flexible-array member
Zero-length arrays are deprecated[1] and we are moving towards adopting C99 flexible-array members instead. So, replace zero-length array declaration in struct aspeed_sham_ctx with flex-array member.
This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [2].
Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays [1] Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [2] Link: https://github.com/KSPP/linux/issues/78 Signed-off-by: Gustavo A. R. Silva <[email protected]> Reviewed-by: Neal Liu <[email protected]> Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| 70513e1d | 20-Sep-2022 |
YueHaibing <[email protected]> |
crypto: aspeed - Fix check for platform_get_irq() errors
The platform_get_irq() function returns negative on error and positive non-zero values on success. It never returns zero, but if it did then
crypto: aspeed - Fix check for platform_get_irq() errors
The platform_get_irq() function returns negative on error and positive non-zero values on success. It never returns zero, but if it did then treat that as a success.
Also remove redundant dev_err() print as platform_get_irq() already prints an error.
Fixes: 108713a713c7 ("crypto: aspeed - Add HACE hash driver") Signed-off-by: YueHaibing <[email protected]> Reviewed-by: Neal Liu <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| dc377e01 | 30-Aug-2022 |
Sun Ke <[email protected]> |
crypto: aspeed - fix return value check in aspeed_hace_probe()
In case of error, the function devm_ioremap_resource() returns ERR_PTR() not NULL. The NULL test in the return value check must be repl
crypto: aspeed - fix return value check in aspeed_hace_probe()
In case of error, the function devm_ioremap_resource() returns ERR_PTR() not NULL. The NULL test in the return value check must be replaced with IS_ERR().
Fixes: 108713a713c7 ("crypto: aspeed - Add HACE hash driver") Signed-off-by: Sun Ke <[email protected]> Reviewed-by: Neal Liu<[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|
| aa450316 | 07-Sep-2022 |
Neal Liu <[email protected]> |
crypto: aspeed: fix format unexpected build warning
This fixes the following similar build warning when enabling compile test:
aspeed-hace-hash.c:188:9: warning: format '%x' expects argument of typ
crypto: aspeed: fix format unexpected build warning
This fixes the following similar build warning when enabling compile test:
aspeed-hace-hash.c:188:9: warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
Reported-by: kernel test robot <[email protected]> Signed-off-by: Neal Liu <[email protected]> Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
show more ...
|