staging: media: atomisp: use sizeof(*pointer) in vzalloc
Subsystems (4)
PATCH 1/1 staging: media: atomisp: use sizeof(*pointer) in vzalloc
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.
--- drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +2 -2
@@ -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 ;
Signature · 1 line
2.34.1
Quoted 6 lines · Prajval Chaudhary
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.
Unneeded churn. Is it for some kind of training session?
There are more desired activities that newbies can perform against this driver.
Signature · 2 lines
With Best Regards, Andy Shevchenko