lkml.org 
[lkml]   [2022]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 13/13] fs/dcache: fix a kernel-doc markup
    Date
    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@kernel.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
    \
     
     \ /
      Last update: 2022-08-18 15:41    [W:3.665 / U:0.956 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site