All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Linux Doc Mailing List <linux-doc@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Will Deacon <will@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 16/24] seqlock: fix two kernel-doc warnings
Date: Tue, 13 Oct 2020 14:14:43 +0200	[thread overview]
Message-ID: <a59144cdaadf7fdf1fe5d55d0e1575abbf1c0cb3.1602590106.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1602590106.git.mchehab+huawei@kernel.org>

Right now, seqloc.h produces two kernel-doc warnings:

	./include/linux/seqlock.h:181: error: Cannot parse typedef!
	WARNING: kernel-doc './scripts/kernel-doc -rst -enable-lineno ./include/linux/seqlock.h' failed with return code 1

Those are due to two things:

1. the kernel-doc markup syntax doesn't recognize "typedef"
   expression at the markup. Both functions and typedefs
   use the same notation:

	/**
	 * foo - some bar description
	 */
  or
	/**
	 * foo() - some bar description
	 */

2. kernel-doc markups require a function or typedef prototype,
   in order to get the type of each argument. This is also
   common for other code documentation markkup languages, like
   doxygen.

On other words, a valid notation for describing those macros
would be:

	 /**
	  * seqcount_LOCKNAME_t() - sequence counter with LOCKNAME associated
	  * @seqcount:  The real sequence counter
	  * @lock:      Pointer to the associated lock
	  *
	  * <some description>
	  */
	#if 0 /* kernel-doc needs a function or typedef prototype */
	void seqcount_LOCKNAME_t(seqcount_##lockname##_t *seqcount, locktype *lock) {}
	#endif

Alternatively, the description of those arguments should be added
as a DOC: block.

Yet, from changeset a28e884b966e ("seqlock: Fix multiple kernel-doc warnings"),
it sounds that, on this file, it is preferred to just convert the
kernel-doc markups into simple comments.

Fixes: a8772dccb2ec ("seqlock: Fold seqcount_LOCKNAME_t definition")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 include/linux/seqlock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index ac5b07f558b0..cbfc78b92b65 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -154,7 +154,7 @@ static inline void seqcount_lockdep_reader_access(const seqcount_t *s)
 #define __SEQ_LOCK(expr)
 #endif
 
-/**
+/*
  * typedef seqcount_LOCKNAME_t - sequence counter with LOCKNAME associated
  * @seqcount:	The real sequence counter
  * @lock:	Pointer to the associated lock
-- 
2.26.2


  parent reply	other threads:[~2020-10-13 12:15 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-13 12:14 [PATCH v2 00/24] Documentation build fixes against next-20201013 Mauro Carvalho Chehab
2020-10-13 12:14 ` [PATCH v2 01/24] docs: hwmon: adm1266.rst: fix a broken reference Mauro Carvalho Chehab
2020-10-13 16:48   ` Guenter Roeck
2020-10-13 12:14 ` [PATCH v2 02/24] tools: docs: memory-model: fix references for some files Mauro Carvalho Chehab
2020-10-13 16:33   ` Paul E. McKenney
2020-10-13 16:38     ` Alan Stern
2020-10-14  1:58       ` Paul E. McKenney
2020-10-14  7:56         ` Mauro Carvalho Chehab
2020-10-14 14:14           ` Akira Yokosawa
2020-10-14 14:39             ` Mauro Carvalho Chehab
2020-10-14 18:57         ` Paul E. McKenney
2020-10-15  5:15           ` Mauro Carvalho Chehab
2020-10-15 10:30             ` Peter Zijlstra
2020-10-13 12:14 ` [PATCH v2 03/24] docs: SafeSetID: fix a warning Mauro Carvalho Chehab
2020-10-13 12:14 ` [PATCH v2 04/24] docs: lockdep-design: fix some warning issues Mauro Carvalho Chehab
2020-10-13 12:52   ` Peter Zijlstra
2020-10-13 13:11     ` Matthew Wilcox
2020-10-13 14:09       ` Peter Zijlstra
2020-10-13 15:02         ` Matthew Wilcox
2020-10-14 16:04           ` Mauro Carvalho Chehab
2020-10-13 12:14 ` [PATCH v2 05/24] docs: admin-guide: net.rst: add a missing blank line Mauro Carvalho Chehab
2020-10-13 12:14 ` [PATCH v2 06/24] blk-mq: docs: add kernel-doc description for a new struct member Mauro Carvalho Chehab
2020-10-13 13:29   ` John Garry
2020-10-13 19:12   ` Jens Axboe
2020-10-13 12:14 ` [PATCH v2 07/24] drm: amdgpu: kernel-doc: update some adev parameters Mauro Carvalho Chehab
2020-10-13 12:14   ` Mauro Carvalho Chehab
2020-10-13 12:14   ` Mauro Carvalho Chehab
2020-10-13 12:41   ` Christian König
2020-10-13 12:41     ` Christian König
2020-10-13 12:41     ` Christian König
2020-10-13 12:14 ` [PATCH v2 08/24] drm: kernel-doc: document drm_dp_set_subconnector_property() params Mauro Carvalho Chehab
2020-10-13 12:14   ` Mauro Carvalho Chehab
2020-10-13 12:14 ` [PATCH v2 09/24] docs: kasan.rst: add two missing blank lines Mauro Carvalho Chehab
2020-10-13 12:14 ` [PATCH v2 10/24] mm: pagemap.h: fix two kernel-doc markups Mauro Carvalho Chehab
2020-10-13 12:26   ` Matthew Wilcox
2020-10-21  9:55     ` Mauro Carvalho Chehab
2020-10-21 11:28       ` Matthew Wilcox
2020-10-21 11:59         ` Mauro Carvalho Chehab
2020-10-21 12:02           ` Matthew Wilcox
2020-10-13 12:14 ` [PATCH v2 11/24] drm/dp: fix kernel-doc warnings at drm_dp_helper.c Mauro Carvalho Chehab
2020-10-13 12:14   ` Mauro Carvalho Chehab
2020-10-13 19:20   ` Lyude Paul
2020-10-13 19:20     ` Lyude Paul
2020-10-13 12:14 ` [PATCH v2 12/24] drm/dp: fix a kernel-doc issue at drm_edid.c Mauro Carvalho Chehab
2020-10-13 12:14   ` Mauro Carvalho Chehab
2020-10-13 19:24   ` Lyude Paul
2020-10-13 19:24     ` Lyude Paul
2020-10-13 19:49   ` Lyude Paul
2020-10-13 19:49     ` Lyude Paul
2020-10-21 10:11     ` Mauro Carvalho Chehab
2020-10-21 10:11       ` Mauro Carvalho Chehab
2020-10-21 16:56       ` Lyude Paul
2020-10-21 16:56         ` Lyude Paul
2020-10-13 12:14 ` [PATCH v2 13/24] docs: i2c: index.rst: add slave-testunit-backend.rst Mauro Carvalho Chehab
2020-10-13 15:53   ` Wolfram Sang
2020-10-13 12:14 ` [PATCH v2 14/24] docs: conf.py: disable automarkup for Sphinx 3.x Mauro Carvalho Chehab
2020-10-13 12:14 ` [PATCH v2 15/24] docs: net: statistics.rst: remove a duplicated kernel-doc Mauro Carvalho Chehab
2020-10-13 12:14 ` Mauro Carvalho Chehab [this message]
2020-10-13 12:14 ` [PATCH v2 17/24] docs: hwmon: mp2975.rst: address some html build warnings Mauro Carvalho Chehab
2020-10-13 16:48   ` Guenter Roeck
2020-10-13 12:14 ` [PATCH v2 18/24] docs: userspace-api: add iommu.rst to the index file Mauro Carvalho Chehab
2020-10-13 12:14 ` [PATCH v2 19/24] net: phy: remove kernel-doc duplication Mauro Carvalho Chehab
2020-10-13 12:14 ` [PATCH v2 20/24] MAINTAINERS: fix broken doc refs due to yaml conversion Mauro Carvalho Chehab
2020-10-13 12:14   ` Mauro Carvalho Chehab
2020-10-13 12:14 ` [PATCH v2 21/24] crypto: sun8x-ce*: update entries to its documentation Mauro Carvalho Chehab
2020-10-13 12:14   ` Mauro Carvalho Chehab
2020-10-13 12:14 ` [PATCH v2 22/24] ice: docs fix a devlink info that broke a table Mauro Carvalho Chehab
2020-10-13 22:01   ` Jacob Keller
2020-10-13 12:14 ` [PATCH v2 23/24] RDMA: add a missing kernel-doc parameter markup Mauro Carvalho Chehab
2020-10-16 16:57   ` Jason Gunthorpe
2020-10-13 12:14 ` [PATCH v2 24/24] counters: docs: add a missing include Mauro Carvalho Chehab
2020-10-15  1:06   ` Shuah Khan

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=a59144cdaadf7fdf1fe5d55d0e1575abbf1c0cb3.1602590106.git.mchehab+huawei@kernel.org \
    --to=mchehab+huawei@kernel.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=will@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.