Linux Documentation
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Ricardo Cañuelo" <ricardo.canuelo@collabora.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:17:40 +0300	[thread overview]
Message-ID: <877dyxm6t7.fsf@intel.com> (raw)
In-Reply-To: <20200402124425.3363-1-ricardo.canuelo@collabora.com>


Hi, just a couple of drive-by comments.

On Thu, 02 Apr 2020, Ricardo Cañuelo <ricardo.canuelo@collabora.com> wrote:
> +Function reference
> +==================
> +
> +.. kernel-doc:: kernel/printk/printk.c
> +   :functions: printk
> +
> +.. kernel-doc:: include/linux/printk.h
> +   :functions: pr_emerg
> +
> +.. kernel-doc:: include/linux/printk.h
> +   :functions: pr_alert
> +
> +.. kernel-doc:: include/linux/printk.h
> +   :functions: pr_crit
> +
> +.. kernel-doc:: include/linux/printk.h
> +   :functions: pr_err
> +
> +.. kernel-doc:: include/linux/printk.h
> +   :functions: pr_warn
> +
> +.. kernel-doc:: include/linux/printk.h
> +   :functions: pr_notice
> +
> +.. kernel-doc:: include/linux/printk.h
> +   :functions: pr_info
> +
> +.. kernel-doc:: include/linux/printk.h
> +   :functions: pr_fmt
> +
> +.. kernel-doc:: include/linux/printk.h
> +   :functions: pr_debug
> +
> +.. kernel-doc:: include/linux/printk.h
> +   :functions: pr_devel
> +
> +.. kernel-doc:: include/linux/printk.h
> +   :functions: pr_cont

: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.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2020-04-03  6:17 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 [this message]
2020-04-03  7:25       ` Ricardo Cañuelo

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