linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dwaipayan Ray <dwaipayanray1@gmail.com>
To: Andrew Jeffery <andrew@aj.id.au>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	Joe Perches <joe@perches.com>, Jonathan Corbet <corbet@lwn.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	openbmc@lists.ozlabs.org, Jiri Slaby <jirislaby@kernel.org>
Subject: Re: [PATCH] Documentation: checkpatch: Tweak BIT() macro include
Date: Thu, 20 May 2021 15:51:00 +0530	[thread overview]
Message-ID: <CABJPP5AMPL22dJ2YKNqdTtHrTJRr=SKnxo05PKn9FoveNX7tow@mail.gmail.com> (raw)
In-Reply-To: <72ed5aa8-bca5-451d-9458-48735fc17b84@www.fastmail.com>

On Thu, May 20, 2021 at 3:15 PM Andrew Jeffery <andrew@aj.id.au> wrote:
>
>
>
> On Thu, 20 May 2021, at 18:47, Dwaipayan Ray wrote:
> > On Thu, May 20, 2021 at 12:55 PM Andrew Jeffery <andrew@aj.id.au> wrote:
> > >
> > >
> > >
> > > On Thu, 20 May 2021, at 16:28, Lukas Bulwahn wrote:
> > > > On Thu, May 20, 2021 at 3:57 AM Andrew Jeffery <andrew@aj.id.au> wrote:
> > > > >
> > > > > While include/linux/bitops.h brings in the BIT() macro, it was moved to
> > > > > include/linux/bits.h in [1]. Since [1] BIT() has moved again into
> > > > > include/vdso/bits.h via [2].
> > > > >
> > > > > I think the move to the vDSO header can be considered a implementation
> > > > > detail, so for now update the checkpatch documentation to recommend use
> > > > > of include/linux/bits.h.
> > > > >
> > > > > [1] commit 8bd9cb51daac ("locking/atomics, asm-generic: Move some macros from <linux/bitops.h> to a new <linux/bits.h> file")
> > > > > [2] commit 3945ff37d2f4 ("linux/bits.h: Extract common header for vDSO")
> > > > >
> > > > > Cc: Jiri Slaby <jirislaby@kernel.org>
> > > > > Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> > > >
> > > > Looks sound to me.
> > > >
> > > > I would prefer a bit of word-smithing the commit message by just
> > > > removing the references:
> > > >
> > > > So:
> > > >
> > > > > While include/linux/bitops.h brings in the BIT() macro, it was moved to
> > > > > include/linux/bits.h in commit 8bd9cb51daac ("locking/atomics, asm-generic: Move some macros from <linux/bitops.h> to a new <linux/bits.h> file"). Since that commit, BIT() has moved again into
> > > > > include/vdso/bits.h via commit 3945ff37d2f4 ("linux/bits.h: Extract common header for vDSO").
> > > > >
> > > > > I think the move to the vDSO header can be considered a implementation
> > > > > detail, so for now update the checkpatch documentation to recommend use
> > > > > of include/linux/bits.h.
> > > > >
> > > >
> > > > And then drop references [1] and [2].
> > > >
> > > > Andrew, what do you think?
> > >
> > > I mostly did this because initially I wrapped the commit message and
> > > checkpatch spat out errors when it failed to properly identify the
> > > commit description for [1]. But, leaving the description unwrapped
> > > inline in the text feels untidy as it's just a work-around to dodge a
> > > shortcoming of checkpatch.
> > >
> > > With the reference style the long line moves out of the way and
> > > checkpatch can identify the commit descriptions, at the expense of
> > > complaints about line length instead. But the line length issue was
> > > only a warning and so didn't seem quite so critical.
> > >
> > > While the referencing style is terse I felt it was a reasonable
> > > compromise that didn't involve fixing checkpatch to fix the checkpatch
> > > documentation :/
> > >
> >
> > Hey,
> > Can you share which wrap around caused the checkpatch errors
> > to be emitted? We can try to fix that.
> >
> > I was able to wrap it without checkpatch complaining. You might consider
> > replacing it with this if you wish?
> >
> > While include/linux/bitops.h brings in the BIT() macro, it was moved to
> > include/linux/bits.h in commit 8bd9cb51daac ("locking/atomics, asm-generic:
> > Move some macros from <linux/bitops.h> to a new <linux/bits.h> file").
>
> This wording works because the commit description is only split across
> two lines. With the wording I had it was split across three, and this
> caused checkpatch to barf. If we do this:
>

Yes it won't work for 3 lines. We are checking only for an additional line
for split commit descriptions. Might be a thing to improve in the future.

> While include/linux/bitops.h brings in the BIT() macro, it was moved to
> include/linux/bits.h in commit 8bd9cb51daac ("locking/atomics, asm-generic:
> Move some macros from <linux/bitops.h> to a new <linux/bits.h>
> file").
>
> we get:
>
> ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 8bd9cb51daac ("locking/atomics, asm-generic: Move some macros from <linux/bitops.h> to a new <linux/bits.h> file")'
> #7:
> include/linux/bits.h in commit 8bd9cb51daac ("locking/atomics, asm-generic:
>
> total: 1 errors, 0 warnings, 8 lines checked
>
> Anyway, I've replaced the commit message with your suggestion:
>
> https://lore.kernel.org/linux-doc/20210520093949.511471-1-andrew@aj.id.au/
>
> Thanks for work-shopping it :)
>

Thanks for the patch :)

Dwaipayan.

  reply	other threads:[~2021-05-20 11:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20  1:57 [PATCH] Documentation: checkpatch: Tweak BIT() macro include Andrew Jeffery
2021-05-20  5:24 ` Jiri Slaby
2021-05-20  6:58 ` Lukas Bulwahn
2021-05-20  7:24   ` Andrew Jeffery
2021-05-20  9:17     ` Dwaipayan Ray
2021-05-20  9:44       ` Andrew Jeffery
2021-05-20 10:21         ` Dwaipayan Ray [this message]
2021-05-20 12:06           ` Lukas Bulwahn
2021-05-20 13:02             ` Dwaipayan Ray

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='CABJPP5AMPL22dJ2YKNqdTtHrTJRr=SKnxo05PKn9FoveNX7tow@mail.gmail.com' \
    --to=dwaipayanray1@gmail.com \
    --cc=andrew@aj.id.au \
    --cc=corbet@lwn.net \
    --cc=jirislaby@kernel.org \
    --cc=joe@perches.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=openbmc@lists.ozlabs.org \
    /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;
as well as URLs for NNTP newsgroup(s).