[PATCH 13/13] fs/dcache: fix a kernel-doc markup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---

See [PATCH 00/13] at: https://lore.kernel.org/all/cover.1660829433.git.mchehab@xxxxxxxxxx/

 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




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux