From: Shobhit Kukreti Date: Thu, 27 Jun 2019 05:31:18 +0000 (-0700) Subject: staging: erofs: Replace kzalloc(struct ..) with kzalloc(*ptr) X-Git-Tag: v5.4-rc1~602^2~134 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a9f69bd555ccfa64e3460ed7c5321e1f1c34536d;p=platform%2Fkernel%2Flinux-rpi.git staging: erofs: Replace kzalloc(struct ..) with kzalloc(*ptr) Resolve checkpatch warning: Prefer kzalloc(sizeof(*ptr)...) over kzalloc(sizeof(struct ..) Signed-off-by: Shobhit Kukreti Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c index cadbcc11702a..54494412eba4 100644 --- a/drivers/staging/erofs/super.c +++ b/drivers/staging/erofs/super.c @@ -383,7 +383,7 @@ static int erofs_read_super(struct super_block *sb, goto err; } - sbi = kzalloc(sizeof(struct erofs_sb_info), GFP_KERNEL); + sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); if (unlikely(!sbi)) { err = -ENOMEM; goto err; diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c index 316382d33783..f0dab81ff816 100644 --- a/drivers/staging/erofs/unzip_vle.c +++ b/drivers/staging/erofs/unzip_vle.c @@ -1263,8 +1263,7 @@ jobqueue_init(struct super_block *sb, goto out; } - iosb = kvzalloc(sizeof(struct z_erofs_vle_unzip_io_sb), - GFP_KERNEL | __GFP_NOFAIL); + iosb = kvzalloc(sizeof(*iosb), GFP_KERNEL | __GFP_NOFAIL); DBG_BUGON(!iosb); /* initialize fields in the allocated descriptor */