From: Dan Carpenter <error27@gmail.com>
To: Sumitra Sharma <sumitraartsy@gmail.com>
Cc: GR-Linux-NIC-Dev@marvell.com, coiby.xu@gmail.com,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
linux-staging@lists.linux.dev, manishc@marvell.com,
netdev@vger.kernel.org, outreachy@lists.linux.dev
Subject: Re: [PATCH] Staging: qlge: Remove parenthesis around single condition
Date: Sat, 11 Mar 2023 17:59:05 +0300 [thread overview]
Message-ID: <20838efc-e8ef-4696-9a27-958bc5aab19e@kili.mountain> (raw)
In-Reply-To: <20230311144318.GC14247@ubuntu>
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
next prev parent reply other threads:[~2023-03-11 14:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-11 14:04 [PATCH] Staging: qlge: Remove parenthesis around single condition Sumitra Sharma
2023-03-11 14:09 ` Dan Carpenter
2023-03-11 14:43 ` Sumitra Sharma
2023-03-11 14:49 ` Julia Lawall
2023-03-11 14:59 ` Dan Carpenter [this message]
2023-03-11 20:35 ` Fabio M. De Francesco
2023-03-12 7:17 ` Sumitra Sharma
2023-03-12 10:39 ` Fabio M. De Francesco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20838efc-e8ef-4696-9a27-958bc5aab19e@kili.mountain \
--to=error27@gmail.com \
--cc=GR-Linux-NIC-Dev@marvell.com \
--cc=coiby.xu@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=manishc@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=outreachy@lists.linux.dev \
--cc=sumitraartsy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox