[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <9d2676a83ebee327b97b82f3c2ab76a2e53756d1.1660829433.git.mchehab@kernel.org>
Date: Thu, 18 Aug 2022 15:38:59 +0200
From: Mauro Carvalho Chehab <mchehab@...nel.org>
To: Linux Doc Mailing List <linux-doc@...r.kernel.org>, corbet@....net
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Ilya Dryomov <idryomov@...il.com>,
Luis Chamberlain <mcgrof@...nel.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Xiubo Li <xiubli@...hat.com>, linux-kernel@...r.kernel.org
Subject: [PATCH 13/13] fs/dcache: fix a kernel-doc markup
There's no such thing of using the same kernel-doc markup for multiple
functions. Trying to be creative using a single one with a comma meant
for it to serve two functions will do the wrong thing and produce a
warning:
./include/linux/dcache.h:310: warning: expecting prototype for dget, dget_dlock(). Prototype was for dget_dlock() instead
Address it by duplicating the comment.
Yet, it probably makes sense to explain when/why someone has to use
each variant of it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@...nel.org>
---
See [PATCH 00/13] at: https://lore.kernel.org/all/cover.1660829433.git.mchehab@kernel.org/
include/linux/dcache.h | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 92c78ed02b54..5f254284bb83 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -299,7 +299,7 @@ extern char *dentry_path(const struct dentry *, char *, int);
/* Allocation counts.. */
/**
- * dget, dget_dlock - get a reference to a dentry
+ * dget_dlock - get a reference to a dentry
* @dentry: dentry to get a reference to
*
* Given a dentry or %NULL pointer increment the reference count
@@ -313,6 +313,14 @@ static inline struct dentry *dget_dlock(struct dentry *dentry)
return dentry;
}
+/**
+ * dget - get a reference to a dentry
+ * @dentry: dentry to get a reference to
+ *
+ * Given a dentry or %NULL pointer increment the reference count
+ * if appropriate and return the dentry. A dentry will not be
+ * destroyed when it has references.
+ */
static inline struct dentry *dget(struct dentry *dentry)
{
if (dentry)
--
2.37.1
Powered by blists - more mailing lists