[lkml]   [2020]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH v5 15/16] refcount.h: fix a kernel-doc markup
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 <>
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.


#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), }

enum refcount_saturation_type {

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);
 \ /
  Last update: 2020-12-01 13:13    [W:0.187 / U:0.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site