linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Corbet <corbet@lwn.net>
To: Randy Dunlap <rdunlap@infradead.org>, linux-kernel@vger.kernel.org
Cc: Randy Dunlap <rdunlap@infradead.org>,
	Jani Nikula <jani.nikula@intel.com>,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH] kernel-doc: handle a void function without producing a warning
Date: Wed, 03 Jan 2024 14:13:36 -0700	[thread overview]
Message-ID: <87le9686in.fsf@meer.lwn.net> (raw)
In-Reply-To: <20231226065219.319-1-rdunlap@infradead.org>

Randy Dunlap <rdunlap@infradead.org> writes:

> Currently a void function can produce a warning:
>   main.c:469: warning: contents before sections
>
> This one is from arch/x86/kernel/cpu/sgx/main.c (which is not included
> in any produced kernel documentation output).
>
> Handle this by setting $in_doc_sect to 1 whenever any recognized
> document section name is processed.
>
> Fixes: f624adef3d0b ("kernel-doc: limit the "section header:" detection to a select few")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: linux-doc@vger.kernel.org
> ---
>  scripts/kernel-doc |    1 +
>  1 file changed, 1 insertion(+)
>
> diff -- a/scripts/kernel-doc b/scripts/kernel-doc
> --- a/scripts/kernel-doc
> +++ b/scripts/kernel-doc
> @@ -2126,6 +2126,7 @@ sub process_body($$) {
>      }
>  
>      if (/$doc_sect/i) { # case insensitive for supported section names
> +	$in_doc_sect = 1;
>  	$newsection = $1;

Applied, thanks.

jon

      reply	other threads:[~2024-01-03 21:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-26  6:52 [PATCH] kernel-doc: handle a void function without producing a warning Randy Dunlap
2024-01-03 21:13 ` Jonathan Corbet [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=87le9686in.fsf@meer.lwn.net \
    --to=corbet@lwn.net \
    --cc=jani.nikula@intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).