Linux Documentation
 help / color / mirror / Atom feed
From: "Ricardo Cañuelo" <ricardo.canuelo@collabora.com>
To: Jani Nikula <jani.nikula@linux.intel.com>,
	corbet@lwn.net, linux-doc@vger.kernel.org, pmladek@suse.com
Cc: kernel@collabora.com
Subject: Re: [PATCH v2] docs: pr_*() kerneldocs and basic printk docs
Date: Fri, 03 Apr 2020 09:25:31 +0200	[thread overview]
Message-ID: <e1abeecb58caabd93af10af9a97ba93eb2fa1a0b.camel@collabora.com> (raw)
In-Reply-To: <877dyxm6t7.fsf@intel.com>

On Fri, 2020-04-03 at 09:17 +0300, Jani Nikula wrote:
> :functions: lets you specify multiple space separated identifiers. You
> could have *one* kernel-doc directive, and list all the functions you
> want. What you have above causes printk.h to be parsed 11 times.
> 
> Did not actually check, but I think the only difference is that listing
> multiple identifiers produces the documentation in the order it occurs
> in the file.
> 
> > +/**
> > + * pr_emerg - Print an emergency-level message
> > + * @fmt: format string
> > + *
> > + * This macro expands to a printk with KERN_EMERG loglevel. It uses
> > pr_fmt() to
> > + * generate the format string.
> >   */
> >  #define pr_emerg(fmt, ...) \
> >  	printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
> 
> Doesn't this produce a warning for not documenting varargs? That would
> be @...: in the comment.

Hi Jani, thanks for your comments.

You're right. Initially I had all the :functions: statements separate because I
intended to have the function references interspersed between the document
paragraphs, but since I finally decided to put them all at the bottom it'd be
better to group them as much as possible.

Regarding the varargs doc, I'm getting no warnings. At first I included the @...
for every function and then I noticed some other existing cases where they were
automatically generated even though they weren't explicitly documented, so I
though that was the way to go.

But now that you mention it, there's this in Documentation/doc-guide/kernel-
doc.rst:

    If a function has a variable number of arguments, its description should
    be written in kernel-doc notation as::

          * @...: description

so I'll go ahead and add them.

Best,
Ricardo


      reply	other threads:[~2020-04-03  7:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-01  8:31 [PATCH] docs: pr_*() kerneldocs and basic printk docs Ricardo Cañuelo
2020-04-01 16:46 ` Randy Dunlap
2020-04-02  8:26   ` Ricardo Cañuelo
2020-04-02 16:10     ` Randy Dunlap
2020-04-02 12:44   ` [PATCH v2] " Ricardo Cañuelo
2020-04-03  6:17     ` Jani Nikula
2020-04-03  7:25       ` Ricardo Cañuelo [this message]

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=e1abeecb58caabd93af10af9a97ba93eb2fa1a0b.camel@collabora.com \
    --to=ricardo.canuelo@collabora.com \
    --cc=corbet@lwn.net \
    --cc=jani.nikula@linux.intel.com \
    --cc=kernel@collabora.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=pmladek@suse.com \
    /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