mtd: spinand: Use 2-factor allocator calls
Subsystems (2)
PATCH 1/1 mtd: spinand: Use 2-factor allocator calls
As already done treewide, switch from open-coded multiplication to using 2-factor allocator helpers.
--- drivers/mtd/nand/spi/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/nand/spi/core.c +2 -2
@@ -159,9 +159,9 @@ static int spinand_init_cfg_cache(struct spinand_device *spinand)unsigned int target;int ret; - spinand->cfg_cache =devm_kzalloc (dev, -sizeof (*spinand->cfg_cache) * + spinand->cfg_cache =devm_kcalloc (dev, nand->memorg.ntargets, +sizeof (*spinand->cfg_cache),GFP_KERNEL );if (!spinand->cfg_cache)return -ENOMEM ;
Signature · 6 lines
2.17.1 -- Kees Cook Pixel Security
Miquel Raynal
maintainerHello,
Kees Cook <[email protected]> wrote on Wed, 4 Jul 2018 10:27:59 -0700:
Quoted 5 lines
As already done treewide, switch from open-coded multiplication to using 2-factor allocator helpers.
Signed-off-by Kees Cook <[email protected]>---
Indeed, we'll be more careful about this in the future.
As this code has not been merged upstream yet, do you mind if I squash this with the initial patch?
Thanks,
Miquèl
Quoted 8 lines · Miquel Raynal
Hello,
Kees Cook <[email protected]> wrote on Wed, 4 Jul 2018 10:27:59 -0700:
Quoted 3 lines
As already done treewide, switch from open-coded multiplication to using 2-factor allocator helpers.
Quoted 7 lines
Quoted 2 lines
Signed-off-by Kees Cook <[email protected]>---
Indeed, we'll be more careful about this in the future.
As this code has not been merged upstream yet, do you mind if I squash this with the initial patch?
Totally fine by me! Thanks! :)
-Kees
Signature · 2 lines
Kees Cook Pixel Security
Miquel Raynal
maintainerHi Kees,
Kees Cook <[email protected]> wrote on Wed, 4 Jul 2018 10:27:59 -0700:
Quoted 5 lines
As already done treewide, switch from open-coded multiplication to using 2-factor allocator helpers.
Signed-off-by Kees Cook <[email protected]>---
Merged with the original commit.
Thanks,
Miquèl