mmc: core: Calculate size from pointer
PATCH 1/1 mmc: core: Calculate size from pointer
Calculate the size from pointer instead of
struct to adhere to linux kernel coding style.
Issue reported by checkpatch.
This commit has no functional changes.
Signed-off-by Riyan Dhiman <[email protected]>
--- drivers/mmc/core/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/block.c +1 -1
@@ -2484,7 +2484,7 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,return ERR_PTR (devidx); } - md =kzalloc (sizeof (struct mmc_blk_data ),GFP_KERNEL ); + md =kzalloc (sizeof (*md),GFP_KERNEL );if (!md) { ret = -ENOMEM ; goto out;
Signature · 1 line
2.46.0
Quoted 9 lines · Riyan Dhiman
Calculate the size from pointer instead of
struct to adhere to linux kernel coding style.Issue reported by checkpatch.
This commit has no functional changes.
Signed-off-by Riyan Dhiman <[email protected]>
Applied for next, thanks!
Kind regards
Uffe
Quoted 20 lines
--- drivers/mmc/core/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mmc/core/block.c +1
-2@@ -2484,7 +2484,7 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,return ERR_PTR (devidx); } - md =kzalloc (sizeof (struct mmc_blk_data ),GFP_KERNEL ); + md =kzalloc (sizeof (*md),GFP_KERNEL );if (!md) { ret = -ENOMEM ; goto out; --2.46.0