drivers:staging/media:Use ARRAY_SIZE() for the size calculation of the array
Subsystems (4)
PATCH 1/1 drivers:staging/media:Use ARRAY_SIZE() for the size calculation of the array
Signed-off-by Allen Pais <[email protected]>
--- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c +1 -1
@@ -451,7 +451,7 @@ static enum ia_css_frame_format yuv422_copy_formats[] = { IA_CSS_FRAME_FORMAT_YUYV }; -#define array_length (array) (sizeof(array)/sizeof(array[0])) +#define array_length (array) (ARRAY_SIZE(array))/* Verify whether the selected output format is can be produced * by the copy binary given the stream format.
Signature · 1 line
2.7.4
You need a changelog.
Quoted 10 lines · Allen Pais
Signed-off-by Allen Pais <[email protected]>--- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c +0
-0
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c static enum ia_css_frame_format yuv422_copy_formats[] = { · line 454
Quoted 5 lines
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c +1
-1@@ -451,7 +451,7 @@ static enum ia_css_frame_format yuv422_copy_formats[] = { IA_CSS_FRAME_FORMAT_YUYV }; -#define array_length (array) (sizeof(array)/sizeof(array[0])) +#define array_length (array) (ARRAY_SIZE(array))
Just get rid of this array_length macro and use ARRAY_SIZE() directly.
regards,
dan carpenter
Quoted 6 lines
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c static enum ia_css_frame_format yuv422_copy_formats[] = { · line 454
Quoted 3 lines
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c +1
-1-#define array_length (array) (sizeof(array)/sizeof(array[0])) +#define array_length (array) (ARRAY_SIZE(array))Just get rid of this
array_lengthmacro and useARRAY_SIZE()directly.
Sure.
- Allen
Also change the subject prefix to: [media] atomisp: so it's:
Subject: [PATCH v2] [media] atomisp: Use ARRAY_SIZE() instead of open coding it
regards,
dan carpenter