From: Prajval Chaudhary <prajvalchaudhari733@gmail.com>
To: gregkh@linuxfoundation.org, hansg@kernel.org, mchehab@kernel.org
Cc: andy@kernel.org, sakari.ailus@linux.intel.com,
linux-staging@lists.linux.dev, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org,
Prajval Chaudhary <prajvalchaudhari733@gmail.com>
Subject: [PATCH] staging: media: atomisp: use sizeof(*pointer) in vzalloc
Date: Sat, 18 Jul 2026 23:12:03 +0530 [thread overview]
Message-ID: <20260718174203.21591-1-prajvalchaudhari733@gmail.com> (raw)
Fix checkpatch style warnings by replacing explicit 'sizeof(struct ...)'
types with 'sizeof(*pointer)' inside vzalloc allocations. This aligns
the code with modern kernel coding style standards and ensures the
allocations automatically adapt if the pointer's structure type changes
in the future.
Signed-off-by: Prajval Chaudhary <prajvalchaudhari733@gmail.com>
---
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c b/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
index 0ee52637ea30..ea49ebe2da5c 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
@@ -2873,7 +2873,7 @@ int atomisp_css_get_ctc_table(struct atomisp_sub_device *asd,
return -EINVAL;
}
- tab = vzalloc(sizeof(struct ia_css_ctc_table));
+ tab = vzalloc(sizeof(*tab));
if (!tab)
return -ENOMEM;
@@ -2901,7 +2901,7 @@ int atomisp_css_get_gamma_table(struct atomisp_sub_device *asd,
return -EINVAL;
}
- tab = vzalloc(sizeof(struct ia_css_gamma_table));
+ tab = vzalloc(sizeof(*tab));
if (!tab)
return -ENOMEM;
--
2.34.1
next reply other threads:[~2026-07-18 17:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-18 17:42 Prajval Chaudhary [this message]
2026-07-19 7:59 ` [PATCH] staging: media: atomisp: use sizeof(*pointer) in vzalloc Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260718174203.21591-1-prajvalchaudhari733@gmail.com \
--to=prajvalchaudhari733@gmail.com \
--cc=andy@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox