crypto: ixp4xx - fix OF node reference leaks in init_ixp_crypto()init_ixp_crypto() calls of_parse_phandle_with_fixed_args() multipletimes, but does not release all the obtained refcounts. Fix it b
crypto: ixp4xx - fix OF node reference leaks in init_ixp_crypto()init_ixp_crypto() calls of_parse_phandle_with_fixed_args() multipletimes, but does not release all the obtained refcounts. Fix it by addingof_node_put() calls.This bug was found by an experimental static analysis tool that I amdeveloping.Fixes: 76f24b4f46b8 ("crypto: ixp4xx - Add device tree support")Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
crypto: drivers - Switch back to struct platform_driver::remove()After commit 0edb555a65d1 ("platform: Make platform_driver::remove()return void") .remove() is (again) the right callback to implem
crypto: drivers - Switch back to struct platform_driver::remove()After commit 0edb555a65d1 ("platform: Make platform_driver::remove()return void") .remove() is (again) the right callback to implement forplatform drivers.Convert all platform drivers below drivers/crypto to use .remove(), withthe eventual goal to drop struct platform_driver::remove_new(). As.remove() and .remove_new() have the same prototypes, conversion is doneby just changing the structure member name in the driver initializer.Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto: intel/ixp4xx-crypto - Convert to platform remove callback returning voidThe .remove() callback for a platform driver returns an int which makesmany driver authors wrongly assume it's possi
crypto: intel/ixp4xx-crypto - Convert to platform remove callback returning voidThe .remove() callback for a platform driver returns an int which makesmany driver authors wrongly assume it's possible to do error handling byreturning an error code. However the value returned is ignored (apartfrom emitting a warning) and this typically results in resource leaks.To improve here there is a quest to make the remove callback returnvoid. In the first step of this quest all drivers are converted to.remove_new(), which already returns void. Eventually after all driversare converted, .remove_new() will be renamed to .remove().Trivially convert this driver from always returning zero in the removecallback to the void returning variant.Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>Acked-by: Corentin Labbe <clabbe@baylibre.com>Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto: ixp4xx - silence uninitialized variable warningSmatch complains that "dma" is uninitialized if dma_pool_alloc() fails.This is true, but also harmless. Anyway, move the assignment after th
crypto: ixp4xx - silence uninitialized variable warningSmatch complains that "dma" is uninitialized if dma_pool_alloc() fails.This is true, but also harmless. Anyway, move the assignment after theerror checking to silence this warning.Fixes: 586d492f2856 ("crypto: ixp4xx - fix building wiht 64-bit dma_addr_t")Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>Reviewed-by: Arnd Bergmann <arnd@arndb.de>Acked-by: Linus Walleij <linus.walleij@linaro.org>Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto: ixp4xx - fix building wiht 64-bit dma_addr_tThe crypt_ctl structure must be exactly 64 bytes long to work correctly,and it has to be a power-of-two size to allow turning the64-bit divisio
crypto: ixp4xx - fix building wiht 64-bit dma_addr_tThe crypt_ctl structure must be exactly 64 bytes long to work correctly,and it has to be a power-of-two size to allow turning the64-bit division in crypt_phys2virt() into a shift operation, avoidingthe link failure:ERROR: modpost: "__aeabi_uldivmod" [drivers/crypto/intel/ixp4xx/ixp4xx_crypto.ko] undefined!The failure now shows up because the driver is available for compiletesting after the move, and a previous fix turned the more descriptiveBUILD_BUG_ON() into a link error.Change the variably-sized dma_addr_t into the expected 'u32' type that isneeded for the hardware, and reinstate the size check for all 32-bitarchitectures to simplify debugging if it hits again.Fixes: 1bc7fdbf2677 ("crypto: ixp4xx - Move driver to drivers/crypto/intel/ixp4xx")Signed-off-by: Arnd Bergmann <arnd@arndb.de>Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto: ixp4xx - Do not check word size when compile testingThe BUILD_BUG_ON preventing compilation on foreign architecturesshould be disabled when we're doing compile testing.Fixes: 1bc7fdbf267
crypto: ixp4xx - Do not check word size when compile testingThe BUILD_BUG_ON preventing compilation on foreign architecturesshould be disabled when we're doing compile testing.Fixes: 1bc7fdbf2677 ("crypto: ixp4xx - Move driver to...")Reported-by: kernel test robot <lkp@intel.com>Link: https://lore.kernel.org/oe-kbuild-all/202304061846.G6cpPXiQ-lkp@intel.com/Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto: ixp4xx - Move driver to drivers/crypto/intel/ixp4xxWith the growing number of Intel crypto drivers, it makes sense togroup them all into a single drivers/crypto/intel/ directory.Create a
crypto: ixp4xx - Move driver to drivers/crypto/intel/ixp4xxWith the growing number of Intel crypto drivers, it makes sense togroup them all into a single drivers/crypto/intel/ directory.Create a separate drivers/crypto/intel/ixp4xx directory and movedrivers/crypto/ixp4xx_crypto.c to it, along with a new Kconfig andMakefile to contain the config and make bits.Also add a COMPILE_TEST dependency to CRYPTO_DEV_IXP4XX so it can bemore easily compile-tested.Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>Acked-by: Corentin LABBE <clabbe@baylibre.com>Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>