lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20838efc-e8ef-4696-9a27-958bc5aab19e@kili.mountain>
Date:   Sat, 11 Mar 2023 17:59:05 +0300
From:   Dan Carpenter <error27@...il.com>
To:     Sumitra Sharma <sumitraartsy@...il.com>
Cc:     GR-Linux-NIC-Dev@...vell.com, coiby.xu@...il.com,
        gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
        linux-staging@...ts.linux.dev, manishc@...vell.com,
        netdev@...r.kernel.org, outreachy@...ts.linux.dev
Subject: Re: [PATCH] Staging: qlge: Remove parenthesis around single condition

On Sat, Mar 11, 2023 at 06:43:18AM -0800, Sumitra Sharma wrote:
> Hi Dan,
> 
> Your suggestion for correcting the indentation to
> "[tab][tab][space][space][space][space](i ==." conflicts with the 
> statement "Outside of comments, documentation and except in Kconfig, 
> spaces are never used for indentation" written in 
> https://elixir.bootlin.com/linux/latest/source/Documentation/process/coding-style.rst

Huh...  That documentation is very wrong.  Maybe you are not the only
person who has read that and been confused.  Not only do we use spaces,
but checkpatch will complain if you don't use spaces to align function
parameters.

Aligning conditions is not universal but it's generally prefered. There
isn't a checkpatch warning for misaligned conditions, but I think that's
because it's much trickier to parse conditions correctly.  Aligning
conditions is much more subtle.

What this means is that maybe you should consult with your mentor and
try to fix the documentation.  Maybe say something to the effect of "You
can use spaces for micro alignments to function parameters and
conditions in an if statement".

> 
> However, If you still recommend to correct the indentation in the manner
> "[tab][tab][space][space][space][space](i ==." Should I create a
> patch for the same? 

I'm not going to tell you what to do with your life.  :P  But if you
send that patch then we will merge it.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ