Re: [PATCH 29/29] tools: Avoid comma separated statements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2020-08-26 at 11:30 +0200, Thomas Renninger wrote:
> Hi,
> 
> getting rid of lines with multiple instructions, separated by comma is
> certainly a good idea.
> One nit pick, though:
> 
> Am Dienstag, 25. August 2020, 06:56:26 CEST schrieb Joe Perches:
> > Use semicolons and braces.
> > 
> > Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
> > ---
[]
> I can remember patches being rejected with one line statements in a condition,
> surounded by braces.
> I just read up Documentation/process/coding-style.rst, to be sure this still is up-to-date.
> It's not a must, but line 180 says:
> "Do not unnecessarily use braces where a single statement will do."

Read the block immediately below that too:

"This does not apply if only one branch of a conditional statement is a
single statement; in the latter case use braces in both branches:"

> I haven't reviewed every line, but I expect you only split up comma separated instructions
> into separate lines and added braces?

I do not.

While there was a defect using this style though in another patch,
this is a style only change.

> Afaik there isn't a specific tag, but having:
> cleanup only: No functional change
> 
> in the changelog would be nice for people looking for fixes to backport.

This is not a fix, so it's not for backporting.





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux