Re: [PATCH 2/9] usb: vhci-hcd: Fix space, brace, alignment and line length issues

From: Cristian Ciocaltea
Date: Thu Jul 17 2025 - 13:27:08 EST


On 7/17/25 7:18 PM, Greg Kroah-Hartman wrote:
> On Thu, Jul 17, 2025 at 06:54:51PM +0300, Cristian Ciocaltea wrote:
>> Perform a first round of coding style cleanup:
>>
>> * Add new lines after several statement blocks
>> * Avoid line wrapping when 100-column width is not exceeded and it helps
>> improve code readability
>> * Ensure lines do not end with '('
>> * Drop superfluous spaces or empty lines
>> * Add spaces where necessary, e.g. around operators
>> * Add braces for single if-statements when at least one branch of the
>> conditional requires them
>>
>> This helps getting rid of the following checkpatch complaints:
>>
>> CHECK: Lines should not end with a '('
>> CHECK: braces {} should be used on all arms of this statement
>> CHECK: Unbalanced braces around else statement
>> CHECK: Blank lines aren't necessary before a close brace '}'
>> CHECK: Unnecessary parentheses around
>> CHECK: Alignment should match open parenthesis
>> CHECK: No space is necessary after a cast
>> CHECK: spaces preferred around that '-' (ctx:VxV)
>> CHECK: spaces preferred around that '+' (ctx:VxV)
>>
>> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@xxxxxxxxxxxxx>
>
> Coding style cleanups need to be "one patch per logical change", not
> "fix them all in one patch!" type of thing.
>
> Sorry, but can you break this out better?

I could split this into something like:

- Fix spaces & blank lines
CHECK: Blank lines aren't necessary before a close brace '}'
CHECK: No space is necessary after a cast
CHECK: spaces preferred around that '-' (ctx:VxV)
CHECK: spaces preferred around that '+' (ctx:VxV)

- Fix braces
CHECK: braces {} should be used on all arms of this statement
CHECK: Unbalanced braces around else statement

- Fix alignment & line length
CHECK: Lines should not end with a '('
CHECK: Alignment should match open parenthesis

- Misc?!
CHECK: Unnecessary parentheses around

Thanks,
Cristian