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>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 01/14] locking/refcount: document the new "oldp" pointer value
Date: Thu, 10 Sep 2020 12:23:54 +0200	[thread overview]
Message-ID: <fce3aa50004b47aa9b89df7103fa2a6e279cc402.1599732764.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1599732764.git.mchehab+huawei@kernel.org>

Changeset a435b9a14356 ("locking/refcount: Provide __refcount API to obtain the old value")
added a new parameter to most refcount functions, but didn't update
the kernel-doc markups.

Add a description for it on all touched functions.

Fixes: a435b9a14356 ("locking/refcount: Provide __refcount API to obtain the old value")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 include/linux/refcount.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/linux/refcount.h b/include/linux/refcount.h
index 7fabb1af18e0..e17035ea44ef 100644
--- a/include/linux/refcount.h
+++ b/include/linux/refcount.h
@@ -151,6 +151,7 @@ static inline unsigned int refcount_read(const refcount_t *r)
  * refcount_add_not_zero - add a value to a refcount unless it is 0
  * @i: the value to add to the refcount
  * @r: the refcount
+ * @oldp: if not NULL, stores the previous value of the refcount
  *
  * Will saturate at REFCOUNT_SATURATED and WARN.
  *
@@ -192,6 +193,7 @@ static inline __must_check bool refcount_add_not_zero(int i, refcount_t *r)
  * refcount_add - add a value to a refcount
  * @i: the value to add to the refcount
  * @r: the refcount
+ * @oldp: if not NULL, stores the previous value of the refcount
  *
  * Similar to atomic_add(), but will saturate at REFCOUNT_SATURATED and WARN.
  *
@@ -225,6 +227,7 @@ static inline void refcount_add(int i, refcount_t *r)
 /**
  * refcount_inc_not_zero - increment a refcount unless it is 0
  * @r: the refcount to increment
+ * @oldp: if not NULL, stores the previous value of the refcount
  *
  * Similar to atomic_inc_not_zero(), but will saturate at REFCOUNT_SATURATED
  * and WARN.
@@ -248,6 +251,7 @@ static inline __must_check bool refcount_inc_not_zero(refcount_t *r)
 /**
  * refcount_inc - increment a refcount
  * @r: the refcount to increment
+ * @oldp: if not NULL, stores the previous value of the refcount
  *
  * Similar to atomic_inc(), but will saturate at REFCOUNT_SATURATED and WARN.
  *
@@ -271,6 +275,7 @@ static inline void refcount_inc(refcount_t *r)
  * refcount_sub_and_test - subtract from a refcount and test if it is 0
  * @i: amount to subtract from the refcount
  * @r: the refcount
+ * @oldp: if not NULL, stores the previous value of the refcount
  *
  * Similar to atomic_dec_and_test(), but it will WARN, return false and
  * ultimately leak on underflow and will fail to decrement when saturated
@@ -313,6 +318,7 @@ static inline __must_check bool refcount_sub_and_test(int i, refcount_t *r)
 /**
  * refcount_dec_and_test - decrement a refcount and test if it is 0
  * @r: the refcount
+ * @oldp: if not NULL, stores the previous value of the refcount
  *
  * Similar to atomic_dec_and_test(), it will WARN on underflow and fail to
  * decrement when saturated at REFCOUNT_SATURATED.
@@ -336,6 +342,7 @@ static inline __must_check bool refcount_dec_and_test(refcount_t *r)
 /**
  * refcount_dec - decrement a refcount
  * @r: the refcount
+ * @oldp: if not NULL, stores the previous value of the refcount
  *
  * Similar to atomic_dec(), it will WARN on underflow and fail to decrement
  * when saturated at REFCOUNT_SATURATED.
-- 
2.26.2


  reply	other threads:[~2020-09-10 10:25 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10 10:23 [PATCH 00/14] get rid of the remaining kernel-doc warnings when building the docs Mauro Carvalho Chehab
2020-09-10 10:23 ` Mauro Carvalho Chehab [this message]
2020-09-10 10:23 ` [PATCH 02/14] usb: docs: document altmode register/unregister functions Mauro Carvalho Chehab
2020-09-10 10:23 ` [PATCH 03/14] XArray: docs: add missing kernel-doc parameters for xas_split_alloc() Mauro Carvalho Chehab
2020-09-10 11:13   ` Matthew Wilcox
2020-09-10 12:38     ` Mauro Carvalho Chehab
2020-09-10 10:23 ` [PATCH 04/14] blk-mq: docs: add kernel-doc description for a new struct member Mauro Carvalho Chehab
2020-09-10 10:23 ` [PATCH 05/14] iio: docs: add description for a new function member Mauro Carvalho Chehab
2020-09-10 10:23 ` [PATCH 06/14] nl80211: docs: add a description for s1g_cap parameter Mauro Carvalho Chehab
2020-09-10 10:24 ` [PATCH 07/14] IB/srpt: docs: add a description for cq_size member Mauro Carvalho Chehab
2020-09-10 10:24 ` [PATCH 08/14] rcu/tree: docs: document bkvcache new members at struct kfree_rcu_cpu Mauro Carvalho Chehab
2020-09-10 10:24 ` [PATCH 09/14] Input: sparse-keymap: add a description for @sw Mauro Carvalho Chehab
2020-09-10 10:24 ` [PATCH 10/14] drm: amdgpu: kernel-doc: update some adev parameters Mauro Carvalho Chehab
2020-09-10 10:24 ` [PATCH 11/14] drm/amd/display: kernel-doc: document force_timing_sync Mauro Carvalho Chehab
2020-09-10 10:24 ` [PATCH 12/14] drm: kernel-doc: document drm_dp_set_subconnector_property() params Mauro Carvalho Chehab
2020-09-10 10:24 ` [PATCH 13/14] drm: kernel-doc: drm_dp_helper.h: fix a typo Mauro Carvalho Chehab
2020-09-10 10:24 ` [PATCH 14/14] gpu: docs: amdgpu.rst: get rid of wrong kernel-doc markups Mauro Carvalho Chehab
2020-09-10 18:12 ` [PATCH 00/14] get rid of the remaining kernel-doc warnings when building the docs Matthew Wilcox
2020-10-05 10:51   ` Mauro Carvalho Chehab
2020-10-05 10:59     ` Mauro Carvalho Chehab
2020-10-06 11:53       ` [PATCH RFC] script: add a script for checking doc problems with external functions Mauro Carvalho Chehab
2020-10-06 12:13         ` Mauro Carvalho Chehab
2020-10-07  8:23         ` Jani Nikula
2020-10-07  8:32           ` Joe Perches
2020-10-07 13:38             ` Mauro Carvalho Chehab

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=fce3aa50004b47aa9b89df7103fa2a6e279cc402.1599732764.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 \
    /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).