staging: media: atomisp: indentation cleanup per directory
Subsystems (4)
v8 cover staging: media: atomisp: indentation cleanup per directory
This patch series focuses on cleaning up indentation (spaces, tabs) in the AtomISP driver under drivers/staging/media/atomisp/pci/isp/kernels/.
Following previous discussions, this version:
- Applies only indentation-related changes
- Touches a limited number of files to keep the series reviewable
- Splits patches by subdirectory to improve traceability and clarity
- Does not include any clang-format output or automated rewrites
- Leaves all non-indentation checkpatch.pl warnings or errors untouched
There is no functional logic change.
---
Changes in v8:
- Reorganized cleanup by subdirectory (one commit per directory)
- Focused only on indentation fixes (spaces, tabs)
- Removed all clang-format involvement
- No functional changes
- Link to v7: https://lore.kernel.org/all/[email protected]/
Changes in v7:
- Split previous monolithic patch into multiple smaller patches
- Applied clang-format to entire driver excluding i2c directory
- Fixed checkpatch.pl-reported ERRORs (parentheses in macros, unnecessary return parentheses, zero-initialized globals, spaces after unary minus)
- Left WARNINGS untouched for future cleanup
- No functional logic changes
- Link to v6: https://lore.kernel.org/r/[email protected]
Changes in v6:
- Applied clang-format across the entire AtomISP driver
- Fixed all checkpatch.pl-reported ERRORs
- Added explanation of tooling and scope
- No functional logic modified
- Moved 'Suggested-by' and 'Link' tags above Signed-off-by
- Link to v5: https://lore.kernel.org/r/[email protected]
Changes in v5:
- Replaced space-based indentation with tabs in output_1.0 directory
- Used checkpatch.pl and grep to identify formatting issues
- No functional changes made
- This patch is now focused solely on tab/space issues
- Link to v4: https://lore.kernel.org/r/[email protected]
Changes in v4:
- Moved assignment operator '=' to the same line for static struct definitions
- Remove unnecessary line breaks in function definitions
- Update commit message to reflect all the coding style fixes
- Link to v3: https://lore.kernel.org/r/[email protected]
Changes in v3:
- Removed extra spaces between type and asterisk (e.g., *to) in function declarations, as pointed out by Andy Shevchenko
- Update commit message to reflect all the coding style fixes
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Fix patch subject prefix to "staging: media: atomisp:" to comply with media CI style.
- No other functional changes.
- Link to v1: https://lore.kernel.org/r/[email protected]
Thanks for your previous feedback.
Best regards,
LiangCheng Wang <[email protected]>
---
LiangCheng Wang (3):
staging: media: atomisp: fix indentation in aa
staging: media: atomisp: fix indentation in anr
staging: media: atomisp: fix indentation in bh
.../pci/isp/kernels/aa/aa_2/ia_css_aa2_types.h | 2 +- .../pci/isp/kernels/anr/anr_1.0/ia_css_anr.host.c | 29 +++++++++------------- .../pci/isp/kernels/anr/anr_1.0/ia_css_anr.host.h | 17 ++++++------- .../pci/isp/kernels/anr/anr_1.0/ia_css_anr_types.h | 4 +-- .../pci/isp/kernels/anr/anr_2/ia_css_anr2.host.c | 12 ++++----- .../pci/isp/kernels/anr/anr_2/ia_css_anr2.host.h | 11 ++++---- .../pci/isp/kernels/bh/bh_2/ia_css_bh.host.c | 18 ++++++-------- .../pci/isp/kernels/bh/bh_2/ia_css_bh.host.h | 12 ++++----- .../pci/isp/kernels/bh/bh_2/ia_css_bh_types.h | 14 +++++------ 9 files changed, 52 insertions(+), 67 deletions(-)
---
base-commit: 4c06e63b92038fadb566b652ec3ec04e228931e8
change-id: 20250704-new_atomisp-e73f471f3078
Best regards,
Signature · 1 line
LiangCheng Wang <[email protected]>
PATCH v8 1/3 staging: media: atomisp: fix indentation in aa
This patch fixes tab/space indentation issues in aa following kernel coding style guidelines.
No functional logic changes were made.
--- .../staging/media/atomisp/pci/isp/kernels/aa/aa_2/ia_css_aa2_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/atomisp/pci/isp/kernels/aa/aa_2/ia_css_aa2_types.h +1 -1
@@ -30,7 +30,7 @@* ISP2: BAA2 is used. */ struct ia_css_aa_config { -u16 strength;/** Strength of the filter. +u16 strength;/** Strength of the filter. u0.13, [0,8191], default/ineffective 0 */ };
Signature · 1 line
2.43.0
Re: [PATCH v8 1/3] staging: media: atomisp: fix indentation in aa
Quoted 5 lines · LiangCheng Wang
This patch fixes tab/space indentation issues in aa following kernel coding style guidelines.
No functional logic changes were made.
...
drivers/staging/media/atomisp/pci/isp/kernels/aa/aa_2/ia_css_aa2_types.h line 36
Quoted 8 lines
* ISP2: BAA2 is used.
*/
structia_css_aa_config{drivers/staging/media/atomisp/pci/isp/kernels/aa/aa_2/ia_css_aa2_types.h +1
-1-u16 strength;/** Strength of the filter. +u16 strength;/** Strength of the filter. u0.13, [0,8191], default/ineffective 0 */ };
This seems to be a kernel-doc format. Instead of fixing this, move the description of the field to the top comment and make sure it follows kernel-doc. In such case the change will be much more useful.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Re: [PATCH v8 1/3] staging: media: atomisp: fix indentation in aa
In reply to LiangCheng WangIn the subject "aa" is weird and confusing. Say "ia_css_aa_config" instead.
regards,
dan carpenter
PATCH v8 2/3 staging: media: atomisp: fix indentation in anr
In reply to LiangCheng WangThis patch fixes tab/space indentation issues in anr following kernel coding style guidelines.
No functional logic changes were made.
--- .../pci/isp/kernels/anr/anr_1.0/ia_css_anr.host.c | 29 +++++++++------------- .../pci/isp/kernels/anr/anr_1.0/ia_css_anr.host.h | 17 ++++++------- .../pci/isp/kernels/anr/anr_1.0/ia_css_anr_types.h | 4 +-- .../pci/isp/kernels/anr/anr_2/ia_css_anr2.host.c | 12 ++++----- .../pci/isp/kernels/anr/anr_2/ia_css_anr2.host.h | 11 ++++---- 5 files changed, 31 insertions(+), 42 deletions(-)
drivers/staging/media/atomisp/pci/isp/kernels/anr/anr_1.0/ia_css_anr.host.c +12 -17
@@ -12,29 +12,25 @@const struct ia_css_anr_config default_anr_config = {10 , - { -0 ,3 ,1 ,2 ,3 ,6 ,4 ,5 ,1 ,4 ,2 ,3 ,2 ,5 ,3 ,4 , -0 ,3 ,1 ,2 ,3 ,6 ,4 ,5 ,1 ,4 ,2 ,3 ,2 ,5 ,3 ,4 , -0 ,3 ,1 ,2 ,3 ,6 ,4 ,5 ,1 ,4 ,2 ,3 ,2 ,5 ,3 ,4 , -0 ,3 ,1 ,2 ,3 ,6 ,4 ,5 ,1 ,4 ,2 ,3 ,2 ,5 ,3 ,4 - }, - {10 ,20 ,30 } + {0 ,3 ,1 ,2 ,3 ,6 ,4 ,5 ,1 ,4 ,2 ,3 ,2 ,5 ,3 ,4 , +0 ,3 ,1 ,2 ,3 ,6 ,4 ,5 ,1 ,4 ,2 ,3 ,2 ,5 ,3 ,4 , +0 ,3 ,1 ,2 ,3 ,6 ,4 ,5 ,1 ,4 ,2 ,3 ,2 ,5 ,3 ,4 , +0 ,3 ,1 ,2 ,3 ,6 ,4 ,5 ,1 ,4 ,2 ,3 ,2 ,5 ,3 ,4 }, + {10 ,20 ,30 } };void -ia_css_anr_encode ( -struct sh_css_isp_anr_params *to, -const struct ia_css_anr_config *from, -unsigned int size) +ia_css_anr_encode (struct sh_css_isp_anr_params *to, +const struct ia_css_anr_config *from, +unsigned int size) { (void )size; to->threshold = from->threshold; }void -ia_css_anr_dump ( -const struct sh_css_isp_anr_params *anr, -unsigned int level) +ia_css_anr_dump (const struct sh_css_isp_anr_params *anr, +unsigned int level) {if (!anr)return ;ia_css_debug_dtrace (level,"Advance Noise Reduction:\n" );
@@ -43,9 +39,8 @@ ia_css_anr_dump( }void -ia_css_anr_debug_dtrace ( -const struct ia_css_anr_config *config, -unsigned int level) +ia_css_anr_debug_dtrace (const struct ia_css_anr_config *config, +unsigned int level) { ia_css_debug_dtrace(level, "config.threshold=%d\n",
drivers/staging/media/atomisp/pci/isp/kernels/anr/anr_1.0/ia_css_anr.host.h +7 -10
@@ -13,19 +13,16 @@extern const struct ia_css_anr_config default_anr_config;void -ia_css_anr_encode ( -struct sh_css_isp_anr_params *to, -const struct ia_css_anr_config *from, -unsigned int size); +ia_css_anr_encode (struct sh_css_isp_anr_params *to, +const struct ia_css_anr_config *from, +unsigned int size);void -ia_css_anr_dump ( -const struct sh_css_isp_anr_params *anr, -unsigned int level); +ia_css_anr_dump (const struct sh_css_isp_anr_params *anr, +unsigned int level);void -ia_css_anr_debug_dtrace ( -const struct ia_css_anr_config *config,unsigned int level) -; +ia_css_anr_debug_dtrace (const struct ia_css_anr_config *config, +unsigned int level);#endif /* __IA_CSS_ANR_HOST_H */
drivers/staging/media/atomisp/pci/isp/kernels/anr/anr_1.0/ia_css_anr_types.h +2 -2
@@ -12,8 +12,8 @@*/ /* Application specific DMA settings */ -#define ANR_BPP 10 -#define ANR_ELEMENT_BITS ((CEIL_DIV(ANR_BPP, 8)) * 8) +#define ANR_BPP 10 +#define ANR_ELEMENT_BITS ((CEIL_DIV(ANR_BPP, 8)) * 8)/* Advanced Noise Reduction configuration. * This is also known as Low-Light.
drivers/staging/media/atomisp/pci/isp/kernels/anr/anr_2/ia_css_anr2.host.c +5 -7
@@ -11,10 +11,9 @@#include "ia_css_anr2.host.h" void -ia_css_anr2_vmem_encode ( -struct ia_css_isp_anr2_params *to, -const struct ia_css_anr_thres *from, -size_t size) +ia_css_anr2_vmem_encode (struct ia_css_isp_anr2_params *to, +const struct ia_css_anr_thres *from, +size_t size) {unsigned int i;
@@ -29,9 +28,8 @@ ia_css_anr2_vmem_encode( }void -ia_css_anr2_debug_dtrace ( -const struct ia_css_anr_thres *config, -unsigned int level) +ia_css_anr2_debug_dtrace (const struct ia_css_anr_thres *config, +unsigned int level) { (void )config; (void )level;
drivers/staging/media/atomisp/pci/isp/kernels/anr/anr_2/ia_css_anr2.host.h +5 -6
@@ -14,14 +14,13 @@#include "ia_css_anr2_table.host.h" void -ia_css_anr2_vmem_encode ( -struct ia_css_isp_anr2_params *to, -const struct ia_css_anr_thres *from, -size_t size); +ia_css_anr2_vmem_encode (struct ia_css_isp_anr2_params *to, +const struct ia_css_anr_thres *from, +size_t size);void -ia_css_anr2_debug_dtrace ( -const struct ia_css_anr_thres *config,unsigned int level) +ia_css_anr2_debug_dtrace (const struct ia_css_anr_thres *config, +unsigned int level) ;#endif /* __IA_CSS_ANR2_HOST_H */
Signature · 1 line
2.43.0
Re: [PATCH v8 2/3] staging: media: atomisp: fix indentation in anr
Quoted 5 lines · LiangCheng Wang
This patch fixes tab/space indentation issues in anr following kernel coding style guidelines.
No functional logic changes were made.
...
drivers/staging/media/atomisp/pci/isp/kernels/anr/anr_1.0/ia_css_anr.host.c line 18
Quoted 10 lines
drivers/staging/media/atomisp/pci/isp/kernels/anr/anr_1.0/ia_css_anr.host.c +4
-6- { -0 ,3 ,1 ,2 ,3 ,6 ,4 ,5 ,1 ,4 ,2 ,3 ,2 ,5 ,3 ,4 , -0 ,3 ,1 ,2 ,3 ,6 ,4 ,5 ,1 ,4 ,2 ,3 ,2 ,5 ,3 ,4 , -0 ,3 ,1 ,2 ,3 ,6 ,4 ,5 ,1 ,4 ,2 ,3 ,2 ,5 ,3 ,4 , -0 ,3 ,1 ,2 ,3 ,6 ,4 ,5 ,1 ,4 ,2 ,3 ,2 ,5 ,3 ,4 - }, + {0 ,3 ,1 ,2 ,3 ,6 ,4 ,5 ,1 ,4 ,2 ,3 ,2 ,5 ,3 ,4 , +0 ,3 ,1 ,2 ,3 ,6 ,4 ,5 ,1 ,4 ,2 ,3 ,2 ,5 ,3 ,4 , +0 ,3 ,1 ,2 ,3 ,6 ,4 ,5 ,1 ,4 ,2 ,3 ,2 ,5 ,3 ,4 , + 0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4 },
This change is not okay. Please, leave the curly braces on their own lines.
drivers/staging/media/atomisp/pci/isp/kernels/anr/anr_1.0/ia_css_anr.host.c line 19
Quoted 2 lines
drivers/staging/media/atomisp/pci/isp/kernels/anr/anr_1.0/ia_css_anr.host.c +1
-1- {10, 20, 30} + { 10, 20, 30 }
This is okay, but also makes sense to add a trailing comma.
...
drivers/staging/media/atomisp/pci/isp/kernels/anr/anr_1.0/ia_css_anr.host.h line 18
Quoted 8 lines
void
drivers/staging/media/atomisp/pci/isp/kernels/anr/anr_1.0/ia_css_anr.host.h +3
-4-ia_css_anr_encode ( - struct sh_css_isp_anr_params *to, - const struct ia_css_anr_config *from, - unsigned int size); +ia_css_anr_encode(struct sh_css_isp_anr_params *to, + const struct ia_css_anr_config *from, + unsigned int size);
Don't we want to have something like
void ia_css_anr_encode(struct sh_css_isp_anr_params *to,
const struct ia_css_anr_config *from, unsigned int size);
?
Ditto for other similar cases.
...
drivers/staging/media/atomisp/pci/isp/kernels/anr/anr_1.0/ia_css_anr_types.h line 16
Quoted 5 lines
/* Application specific DMA settings */
drivers/staging/media/atomisp/pci/isp/kernels/anr/anr_1.0/ia_css_anr_types.h +2
-2-#define ANR_BPP 10 -#define ANR_ELEMENT_BITS ((CEIL_DIV(ANR_BPP, 8)) * 8) +#define ANR_BPP 10 +#define ANR_ELEMENT_BITS ((CEIL_DIV(ANR_BPP, 8)) * 8)
Doesn't look like a good change.
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH v8 3/3 staging: media: atomisp: fix indentation in bh
In reply to LiangCheng WangThis patch fixes tab/space indentation issues in bh following kernel coding style guidelines.
No functional logic changes were made.
--- .../atomisp/pci/isp/kernels/bh/bh_2/ia_css_bh.host.c | 18 ++++++++---------- .../atomisp/pci/isp/kernels/bh/bh_2/ia_css_bh.host.h | 12 +++++------- .../atomisp/pci/isp/kernels/bh/bh_2/ia_css_bh_types.h | 14 +++++++------- 3 files changed, 20 insertions(+), 24 deletions(-)
drivers/staging/media/atomisp/pci/isp/kernels/bh/bh_2/ia_css_bh.host.c +8 -10
@@ -13,9 +13,8 @@#include "ia_css_bh.host.h" void -ia_css_bh_hmem_decode ( -struct ia_css_3a_rgby_output *out_ptr, -const struct ia_css_bh_table *hmem_buf) +ia_css_bh_hmem_decode (struct ia_css_3a_rgby_output *out_ptr, +const struct ia_css_bh_table *hmem_buf) {int i;
@@ -38,18 +37,17 @@ ia_css_bh_hmem_decode( }void -ia_css_bh_encode ( -struct sh_css_isp_bh_params *to, -const struct ia_css_3a_config *from, -unsigned int size) +ia_css_bh_encode (struct sh_css_isp_bh_params *to, +const struct ia_css_3a_config *from, +unsigned int size) { (void )size;/* coefficients to calculate Y */ to->y_coef_r = -uDIGIT_FITTING (from->ae_y_coef_r,16 ,SH_CSS_AE_YCOEF_SHIFT ); +uDIGIT_FITTING (from->ae_y_coef_r,16 ,SH_CSS_AE_YCOEF_SHIFT ); to->y_coef_g = -uDIGIT_FITTING (from->ae_y_coef_g,16 ,SH_CSS_AE_YCOEF_SHIFT ); +uDIGIT_FITTING (from->ae_y_coef_g,16 ,SH_CSS_AE_YCOEF_SHIFT ); to->y_coef_b = -uDIGIT_FITTING (from->ae_y_coef_b,16 ,SH_CSS_AE_YCOEF_SHIFT ); +uDIGIT_FITTING (from->ae_y_coef_b,16 ,SH_CSS_AE_YCOEF_SHIFT ); }
drivers/staging/media/atomisp/pci/isp/kernels/bh/bh_2/ia_css_bh.host.h +5 -7
@@ -11,14 +11,12 @@#include "s3a/s3a_1.0/ia_css_s3a_types.h" void -ia_css_bh_hmem_decode ( -struct ia_css_3a_rgby_output *out_ptr, -const struct ia_css_bh_table *hmem_buf); +ia_css_bh_hmem_decode (struct ia_css_3a_rgby_output *out_ptr, +const struct ia_css_bh_table *hmem_buf);void -ia_css_bh_encode ( -struct sh_css_isp_bh_params *to, -const struct ia_css_3a_config *from, -unsigned int size); +ia_css_bh_encode (struct sh_css_isp_bh_params *to, +const struct ia_css_3a_config *from, +unsigned int size);#endif /* __IA_CSS_BH_HOST_H */
drivers/staging/media/atomisp/pci/isp/kernels/bh/bh_2/ia_css_bh_types.h +7 -7
@@ -10,14 +10,14 @@/* Number of elements in the BH table. * Should be consistent with hmem.h */ -#define IA_CSS_HMEM_BH_TABLE_SIZE ISP_HIST_DEPTH -#define IA_CSS_HMEM_BH_UNIT_SIZE (ISP_HIST_DEPTH / ISP_HIST_COMPONENTS) +#define IA_CSS_HMEM_BH_TABLE_SIZE ISP_HIST_DEPTH +#define IA_CSS_HMEM_BH_UNIT_SIZE (ISP_HIST_DEPTH / ISP_HIST_COMPONENTS) -#define BH_COLOR_R (0) -#define BH_COLOR_G (1) -#define BH_COLOR_B (2) -#define BH_COLOR_Y (3) -#define BH_COLOR_NUM (4) +#define BH_COLOR_R (0) +#define BH_COLOR_G (1) +#define BH_COLOR_B (2) +#define BH_COLOR_Y (3) +#define BH_COLOR_NUM (4)/* BH table */ struct ia_css_bh_table {
Signature · 1 line
2.43.0
Re: [PATCH v8 3/3] staging: media: atomisp: fix indentation in bh
Quoted 5 lines · LiangCheng Wang
This patch fixes tab/space indentation issues in bh following kernel coding style guidelines.
No functional logic changes were made.
...
drivers/staging/media/atomisp/pci/isp/kernels/bh/bh_2/ia_css_bh.host.c line 17
Quoted 6 lines
void
drivers/staging/media/atomisp/pci/isp/kernels/bh/bh_2/ia_css_bh.host.c +2
-3-ia_css_bh_hmem_decode ( - struct ia_css_3a_rgby_output *out_ptr, - const struct ia_css_bh_table *hmem_buf) +ia_css_bh_hmem_decode(struct ia_css_3a_rgby_output *out_ptr, + const struct ia_css_bh_table *hmem_buf)
Same comment as per previous patch.
...
drivers/staging/media/atomisp/pci/isp/kernels/bh/bh_2/ia_css_bh.host.c ia_css_bh_hmem_decode( · line 51
Quoted 9 lines
to->y_coef_r =drivers/staging/media/atomisp/pci/isp/kernels/bh/bh_2/ia_css_bh.host.c +3
-3-uDIGIT_FITTING (from->ae_y_coef_r,16 ,SH_CSS_AE_YCOEF_SHIFT ); +uDIGIT_FITTING (from->ae_y_coef_r,16 ,SH_CSS_AE_YCOEF_SHIFT ); to->y_coef_g = -uDIGIT_FITTING (from->ae_y_coef_g,16 ,SH_CSS_AE_YCOEF_SHIFT ); +uDIGIT_FITTING (from->ae_y_coef_g,16 ,SH_CSS_AE_YCOEF_SHIFT ); to->y_coef_b = -uDIGIT_FITTING (from->ae_y_coef_b,16 ,SH_CSS_AE_YCOEF_SHIFT ); +uDIGIT_FITTING (from->ae_y_coef_b,16 ,SH_CSS_AE_YCOEF_SHIFT );
Not sure what's going on here. But I think this is just a churn.
...
Quoted 5 lines
drivers/staging/media/atomisp/pci/isp/kernels/bh/bh_2/ia_css_bh_types.h +2
-2-#define IA_CSS_HMEM_BH_TABLE_SIZE ISP_HIST_DEPTH -#define IA_CSS_HMEM_BH_UNIT_SIZE (ISP_HIST_DEPTH / ISP_HIST_COMPONENTS) +#define IA_CSS_HMEM_BH_TABLE_SIZE ISP_HIST_DEPTH +#define IA_CSS_HMEM_BH_UNIT_SIZE (ISP_HIST_DEPTH / ISP_HIST_COMPONENTS)
drivers/staging/media/atomisp/pci/isp/kernels/bh/bh_2/ia_css_bh_types.h line 20
Quoted 10 lines
drivers/staging/media/atomisp/pci/isp/kernels/bh/bh_2/ia_css_bh_types.h +5
-5-#define BH_COLOR_R (0) -#define BH_COLOR_G (1) -#define BH_COLOR_B (2) -#define BH_COLOR_Y (3) -#define BH_COLOR_NUM (4) +#define BH_COLOR_R (0) +#define BH_COLOR_G (1) +#define BH_COLOR_B (2) +#define BH_COLOR_Y (3) +#define BH_COLOR_NUM (4)
Doesn't look like a good change.
Signature · 2 lines
With Best Regards, Andy Shevchenko