linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Lister <peter@bikeshed.quignogs.org.uk>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Linux Doc Mailing List <linux-doc@vger.kernel.org>
Cc: linux-kernel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>
Subject: Re: [PATCH v2 33/33] lib: bitmap.c: get rid of some doc warnings
Date: Fri, 24 Apr 2020 18:30:31 +0100	[thread overview]
Message-ID: <634b1157-a78a-806f-2872-0a9a8efa3730@bikeshed.quignogs.org.uk> (raw)
In-Reply-To: <1e2568fdfa838c1a0d8cc2a1d70dd4b6de99bfb1.1586881715.git.mchehab+huawei@kernel.org>

On 14/04/2020 17:48, Mauro Carvalho Chehab wrote:
> There are two ascii art drawings there. Use a block markup tag there
> in order to get rid of those warnings:
> 
> 	./lib/bitmap.c:189: WARNING: Unexpected indentation.
> 	./lib/bitmap.c:190: WARNING: Block quote ends without a blank line; unexpected unindent.
> 	./lib/bitmap.c:190: WARNING: Unexpected indentation.
> 	./lib/bitmap.c:191: WARNING: Line block ends without a blank line.

A few weeks ago, I asked if anyone had a better suggestion about how to 
cope with this comment for bitmap_cut(). As far as I can see, this is 
the first response.

> It should be noticed that there's actually a syntax violation
> right now, as something like:
> 
> 	/**
> 	 ...
> 	 @src:

I don't see this as a syntax violation. I see it as the failure of 
kernel-doc to cope with a perfectly reasonable construction. I suggest 
that kernel-doc should recognise that the first use of @src: is as a 
param definition, and that the second use isn't.

Actually the *main* bug here is that the second use messes up the sphinx 
link/search info for this function by overwriting the correct first use.

> will be handled as a definition for @src parameter, and not as
> part of a diagram. So, we need to add something before it, in
> order for this to be processed the way it should.
.
> + * The @src bitmap is::

Making editorial changes to the text seems to me a bad way to get rid of 
warnings. If we are saying that the original developer "got it wrong" 
then we need to say how. I assert that this idiom is not wrong, and we 
should not need to add even minor verbosity to the wording.

Developers like compact idioms: someone will use this again before long. 
Are you going to keep telling developers that they are wrong? This is 
not a good way to encourage developers to compose annotation.

It's a similar problem to REST's love of multiple line breaks. Maybe one 
or two are not a big problem, but many little infelicities added 
together make the C comments less useful as annotation for developers.

  reply	other threads:[~2020-04-24 17:30 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14 16:48 [PATCH v2 00/33] Documentation fixes for Kernel 5.8 Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 01/33] scripts: kernel-doc: proper handle @foo->bar() Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 02/33] scripts: kernel-doc: accept negation like !@var Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 03/33] scripts: kernel-doc: accept blank lines on parameter description Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 04/33] docs: update recommended Sphinx version to 2.4.4 Mauro Carvalho Chehab
2020-04-20 21:27   ` Jonathan Corbet
2020-04-20 22:12     ` Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 05/33] docs: LaTeX/PDF: drop list of documents Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 06/33] MAINTAINERS: dt: update display/allwinner file entry Mauro Carvalho Chehab
2020-04-16 21:14   ` Rob Herring
2020-04-14 16:48 ` [PATCH v2 07/33] MAINTAINERS: dt: fix pointers for ARM Integrator, Versatile and RealView Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 08/33] docs: dt: fix broken reference to phy-cadence-torrent.yaml Mauro Carvalho Chehab
2020-04-14 21:01   ` Rob Herring
2020-04-14 16:48 ` [PATCH v2 10/33] docs: fix broken references for ReST files that moved around Mauro Carvalho Chehab
2020-04-16  8:31   ` Corentin Labbe
2020-04-14 16:48 ` [PATCH v2 11/33] docs: filesystems: fix renamed references Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 12/33] docs: amu: supress some Sphinx warnings Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 13/33] docs: arm64: booting.rst: get rid of some warnings Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 14/33] docs: pci: boot-interrupts.rst: improve html output Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 15/33] docs: ras: get rid of some warnings Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 16/33] docs: ras: don't need to repeat twice the same thing Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 17/33] docs: infiniband: verbs.c: fix some documentation warnings Mauro Carvalho Chehab
2020-04-14 19:33   ` Jason Gunthorpe
2020-04-14 16:48 ` [PATCH v2 18/33] docs: spi: spi.h: fix a doc building warning Mauro Carvalho Chehab
2020-04-14 16:54   ` Mark Brown
2020-04-14 16:48 ` [PATCH v2 19/33] docs: drivers: fix some warnings at base/platform.c when building docs Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 20/33] docs: mm: userfaultfd.rst: use ``foo`` for literals Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 21/33] docs: mm: userfaultfd.rst: use a cross-reference for a section Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 22/33] docs: vm: index.rst: add an orphan doc to the building system Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 23/33] docs: dt: qcom,dwc3.txt: fix cross-reference for a converted file Mauro Carvalho Chehab
2020-04-14 21:01   ` Rob Herring
2020-04-14 16:48 ` [PATCH v2 24/33] docs: dt: fix a broken reference for a file converted to json Mauro Carvalho Chehab
2020-04-14 21:02   ` Rob Herring
2020-04-14 16:48 ` [PATCH v2 25/33] docs: powerpc: cxl.rst: mark two section titles as such Mauro Carvalho Chehab
2020-04-15  0:16   ` Andrew Donnellan
2020-04-14 16:48 ` [PATCH v2 26/33] docs: i2c: rename i2c.svg to i2c_bus.svg Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 27/33] docs: Makefile: place final pdf docs on a separate dir Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 28/33] docs: dt: rockchip,dwc3.txt: fix a pointer to a renamed file Mauro Carvalho Chehab
2020-04-14 21:02   ` Rob Herring
2020-04-14 16:48 ` [PATCH v2 29/33] ata: libata-core: fix a doc warning Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 30/33] firewire: firewire-cdev.hL get rid of a docs warning Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 31/33] fs: inode.c: get rid of docs warnings Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 32/33] futex: get rid of a kernel-docs build warning Mauro Carvalho Chehab
2020-04-14 16:48 ` [PATCH v2 33/33] lib: bitmap.c: get rid of some doc warnings Mauro Carvalho Chehab
2020-04-24 17:30   ` Peter Lister [this message]
2020-04-20 21:43 ` [PATCH v2 00/33] Documentation fixes for Kernel 5.8 Jonathan Corbet

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=634b1157-a78a-806f-2872-0a9a8efa3730@bikeshed.quignogs.org.uk \
    --to=peter@bikeshed.quignogs.org.uk \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+huawei@kernel.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).