Skip to content

media: s2255: Coding style cleanup

Lei Huang linux-media lkml 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest17 patches 0 repliesNew
  2. v116 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17media: s2255: Rename CamelCase goto labels to snake_casedrivers/media/usb/s2255/s2255drv.c+19 -190 replies
2/17media: s2255: Rename remaining CamelCase identifiers to snake_casedrivers/media/usb/s2255/s2255drv.c+70 -690 replies
3/17media: s2255: Remove unnecessary spaces after castsdrivers/media/usb/s2255/s2255drv.c+8 -80 replies
4/17media: s2255: Use consistent braces on all arms of if/else statementsdrivers/media/usb/s2255/s2255drv.c+11 -80 replies
5/17media: s2255: Replace NULL comparisons with ! notationdrivers/media/usb/s2255/s2255drv.c+15 -150 replies
6/17media: s2255: Fix alignment to match open parenthesisdrivers/media/usb/s2255/s2255drv.c+18 -180 replies
7/17media: s2255: Remove multiple blank lines and before close bracesdrivers/media/usb/s2255/s2255drv.c+0 -120 replies
8/17media: s2255: Add blank lines after function/struct/enum declarationsdrivers/media/usb/s2255/s2255drv.c+2 -00 replies
9/17media: s2255: Add spaces around multiplication operatorsdrivers/media/usb/s2255/s2255drv.c+1 -10 replies
10/17media: s2255: Remove unnecessary parentheses around conditionsdrivers/media/usb/s2255/s2255drv.c+12 -120 replies
11/17media: s2255: Parenthesize macro argument to avoid precedence issuesdrivers/media/usb/s2255/s2255drv.c+1 -10 replies
12/17media: s2255: Add blank lines after variable declarationsdrivers/media/usb/s2255/s2255drv.c+22 -00 replies
13/17media: s2255: Fix block comment style to kernel formatdrivers/media/usb/s2255/s2255drv.c+26 -240 replies
14/17media: s2255: Remove unnecessary return statements from void functionsdrivers/media/usb/s2255/s2255drv.c+0 -70 replies
15/17media: s2255: Remove unnecessary debug logging and out-of-memory messagesdrivers/media/usb/s2255/s2255drv.c+0 -100 replies
16/17media: s2255: Remove unnecessary braces from single-statement blocksdrivers/media/usb/s2255/s2255drv.c+4 -80 replies
17/17media: s2255: Replace bare 'unsigned' with 'unsigned int'drivers/media/usb/s2255/s2255drv.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/17] media: s2255: Coding style cleanup

From: Lei Huang <[email protected]>

The previous coding style cleanup series failed during integration by the Media CI robot because it depended on the "media: s2255: Rename CamelCase goto labels to snake_case" patch, which had not been merged independently in the linux-media community.

To resolve this, the goto labels rename patch is now included as patch 1/17 in this v2 series, followed by the remaining coding style cleanups. This ensures the entire series can be applied and integrated cleanly as a single unit.

This series applies a series of coding style cleanups to the s2255 USB video driver (drivers/media/usb/s2255/s2255drv.c) to bring it closer to the Linux kernel coding style. The changes address issues flagged by checkpatch.pl and general style review:

- Rename CamelCase goto labels and remaining identifiers to snake_case
- Remove unnecessary spaces after casts and parentheses around conditions
- Use consistent braces on all arms of if/else statements, and remove unnecessary braces from single-statement blocks
- Replace NULL comparisons with ! notation and bare 'unsigned' with 'unsigned int'
- Fix alignment to match open parenthesis and add spaces around multiplication operators
- Parenthesize macro arguments to avoid precedence issues
- Fix block comment style to kernel format
- Add blank lines after function/struct/enum declarations and after variable declarations, and remove extra blank lines
- Remove unnecessary return statements from void functions
- Remove unnecessary debug logging and out-of-memory messages

No functional changes; the driver behavior is unchanged.

Lei Huang (17):
media: s2255: Rename CamelCase goto labels to snake_case
media: s2255: Rename remaining CamelCase identifiers to snake_case
media: s2255: Remove unnecessary spaces after casts
media: s2255: Use consistent braces on all arms of if/else statements
media: s2255: Replace NULL comparisons with ! notation
media: s2255: Fix alignment to match open parenthesis
media: s2255: Remove multiple blank lines and before close braces
media: s2255: Add blank lines after function/struct/enum declarations
media: s2255: Add spaces around multiplication operators
media: s2255: Remove unnecessary parentheses around conditions
media: s2255: Parenthesize macro argument to avoid precedence issues
media: s2255: Add blank lines after variable declarations
media: s2255: Fix block comment style to kernel format
media: s2255: Remove unnecessary return statements from void functions
media: s2255: Remove unnecessary debug logging and out-of-memory
messages
media: s2255: Remove unnecessary braces from single-statement blocks
media: s2255: Replace bare 'unsigned' with 'unsigned int'

 drivers/media/usb/s2255/s2255drv.c | 413 ++++++++++++++---------------
 1 file changed, 205 insertions(+), 208 deletions(-)
Signature · 1 line
2.25.1