linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	Jonathan Corbet <corbet@lwn.net>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Jann Horn <jannh@google.com>, Kees Cook <keescook@chromium.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Will Deacon <will@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v5 15/16] refcount.h: fix a kernel-doc markup
Date: Tue,  1 Dec 2020 13:09:08 +0100	[thread overview]
Message-ID: <afb9bb1e675bf5f72a34a55d780779d7d5916b4c.1606823973.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1606823973.git.mchehab+huawei@kernel.org>

The kernel-doc markup is wrong: it is asking the tool to document
struct refcount_struct, instead of documenting typedef refcount_t.

Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 include/linux/refcount.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/refcount.h b/include/linux/refcount.h
index 497990c69b0b..b8a6e387f8f9 100644
--- a/include/linux/refcount.h
+++ b/include/linux/refcount.h
@@ -72,65 +72,65 @@
  * Do note that inc_not_zero() provides a control dependency which will order
  * future stores against the inc, this ensures we'll never modify the object
  * if we did not in fact acquire a reference.
  *
  * The decrements will provide release order, such that all the prior loads and
  * stores will be issued before, it also provides a control dependency, which
  * will order us against the subsequent free().
  *
  * The control dependency is against the load of the cmpxchg (ll/sc) that
  * succeeded. This means the stores aren't fully ordered, but this is fine
  * because the 1->0 transition indicates no concurrency.
  *
  * Note that the allocator is responsible for ordering things between free()
  * and alloc().
  *
  * The decrements dec_and_test() and sub_and_test() also provide acquire
  * ordering on success.
  *
  */
 
 #ifndef _LINUX_REFCOUNT_H
 #define _LINUX_REFCOUNT_H
 
 #include <linux/atomic.h>
 #include <linux/bug.h>
 #include <linux/compiler.h>
 #include <linux/limits.h>
 #include <linux/spinlock_types.h>
 
 struct mutex;
 
 /**
- * struct refcount_t - variant of atomic_t specialized for reference counts
+ * typedef refcount_t - variant of atomic_t specialized for reference counts
  * @refs: atomic_t counter field
  *
  * The counter saturates at REFCOUNT_SATURATED and will not move once
  * there. This avoids wrapping the counter and causing 'spurious'
  * use-after-free bugs.
  */
 typedef struct refcount_struct {
 	atomic_t refs;
 } refcount_t;
 
 #define REFCOUNT_INIT(n)	{ .refs = ATOMIC_INIT(n), }
 #define REFCOUNT_MAX		INT_MAX
 #define REFCOUNT_SATURATED	(INT_MIN / 2)
 
 enum refcount_saturation_type {
 	REFCOUNT_ADD_NOT_ZERO_OVF,
 	REFCOUNT_ADD_OVF,
 	REFCOUNT_ADD_UAF,
 	REFCOUNT_SUB_UAF,
 	REFCOUNT_DEC_LEAK,
 };
 
 void refcount_warn_saturate(refcount_t *r, enum refcount_saturation_type t);
 
 /**
  * refcount_set - set a refcount's value
  * @r: the refcount
  * @n: value to which the refcount will be set
  */
 static inline void refcount_set(refcount_t *r, int n)
 {
 	atomic_set(&r->refs, n);
-- 
2.28.0


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

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01 12:08 [PATCH v5 00/16]Fix several bad kernel-doc markups Mauro Carvalho Chehab
2020-12-01 12:08 ` [PATCH v5 01/16] HSI: fix a kernel-doc markup Mauro Carvalho Chehab
2020-12-02 21:38   ` Sebastian Reichel
2020-12-01 12:08 ` [PATCH v5 02/16] IB: fix kernel-doc markups Mauro Carvalho Chehab
2020-12-07 19:46   ` Jason Gunthorpe
2020-12-01 12:08 ` [PATCH v5 03/16] parport: fix a kernel-doc markup Mauro Carvalho Chehab
2020-12-01 12:08 ` [PATCH v5 04/16] rapidio: fix kernel-doc a markup Mauro Carvalho Chehab
2020-12-01 12:08 ` [PATCH v5 05/16] fs: fix kernel-doc markups Mauro Carvalho Chehab
2020-12-01 12:43   ` Christoph Hellwig
2020-12-01 14:06     ` Mauro Carvalho Chehab
2020-12-01 12:08 ` [PATCH v5 06/16] pstore/zone: fix a kernel-doc markup Mauro Carvalho Chehab
2020-12-01 12:09 ` [PATCH v5 07/16] completion: drop init_completion define Mauro Carvalho Chehab
2020-12-01 12:54   ` Peter Zijlstra
2020-12-01 14:03     ` Mauro Carvalho Chehab
2020-12-02  8:13       ` Peter Zijlstra
2020-12-01 12:09 ` [PATCH v5 08/16] firmware: stratix10-svc: fix kernel-doc markups Mauro Carvalho Chehab
2020-12-01 12:09 ` [PATCH v5 09/16] connector: fix a kernel-doc markup Mauro Carvalho Chehab
2020-12-01 12:09 ` [PATCH v5 10/16] lib/crc7: " Mauro Carvalho Chehab
2020-12-01 12:09 ` [PATCH v5 11/16] memblock: fix kernel-doc markups Mauro Carvalho Chehab
2020-12-01 12:09 ` [PATCH v5 12/16] w1: fix a kernel-doc markup Mauro Carvalho Chehab
2020-12-01 12:09 ` [PATCH v5 13/16] sched: fix " Mauro Carvalho Chehab
2020-12-02  8:13   ` Peter Zijlstra
2020-12-02 14:10   ` Thomas Gleixner
2020-12-01 12:09 ` [PATCH v5 14/16] selftests: kselftest_harness.h: partially fix kernel-doc markups Mauro Carvalho Chehab
2020-12-01 21:17   ` Kees Cook
2020-12-01 12:09 ` Mauro Carvalho Chehab [this message]
2020-12-01 21:17   ` [PATCH v5 15/16] refcount.h: fix a kernel-doc markup Kees Cook
2020-12-02  8:14   ` Peter Zijlstra
2020-12-01 12:09 ` [PATCH v5 16/16] scripts: kernel-doc: validate kernel-doc markup with the actual names Mauro Carvalho Chehab
2020-12-01 15:06   ` kernel test robot
2020-12-01 15:25   ` kernel test robot

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=afb9bb1e675bf5f72a34a55d780779d7d5916b4c.1606823973.git.mchehab+huawei@kernel.org \
    --to=mchehab+huawei@kernel.org \
    --cc=corbet@lwn.net \
    --cc=jannh@google.com \
    --cc=keescook@chromium.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 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).