From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: Simon Glass <sjg@chromium.org>
Cc: linux-doc@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>,
U-Boot Mailing List <u-boot@lists.denx.de>,
Jonathan Corbet <corbet@lwn.net>
Subject: Re: Doc style for method functions
Date: Thu, 17 Aug 2023 18:36:40 +0200 [thread overview]
Message-ID: <dfac4932-7cbc-3a4e-bde7-c2048516ddf1@gmx.de> (raw)
In-Reply-To: <CAPnjgZ3Lo4Na7YeKPFaY30bwsv_gBGapN_DXeab+k7yhCF3uww@mail.gmail.com>
On 16.08.23 19:47, Simon Glass wrote:
> Hi Jonathan,
>
> On Wed, 16 Aug 2023 at 11:15, Jonathan Corbet <corbet@lwn.net> wrote:
>>
>> Simon Glass <sjg@chromium.org> writes:
>>
>>> Hi Jonathan,
>>>
>>> I would like to do something like this:
>>>
>>> struct part_driver {
>>> /**
>>> * get_info() - Get information about a partition
>>>
>>> ^ causes error
>>>
>>> *
>>> * @desc: Block device descriptor
>>> * @part: Partition number (1 = first)
>>> * @info: Returns partition information
>>> */
>>> int (*get_info)(struct blk_desc *desc, int part, struct
>>> disk_partition *info);
>>> ...
>>> };
>>>
>>> But this gives:
>>>
>>> scripts/kernel-doc:292:
>>> print STDERR "Incorrect use of kernel-doc format: $_";
>>>
>>> Without the brackets on get_info() it works OK. What is the purpose of
>>> that check, please?
>>
>> That's how the kerneldoc syntax was defined, well before my time as the
>> maintainer. This could be relaxed, I guess, but one would have to look
>> at the parsing code to be sure that the right thing happens all the way
>> through the process. I'm not entirely sure it's worth it...
>
> I see. It is inconsistent, since we use () after normal functions.
>
> I think I can fix it just by removing that check.
>
> Regards,
> Simon
If the structure element in not a function pointer, we probably still
want to forbid adding parentheses. Just dropping the check might not be
the solution.
Best regards
Heinrich
next prev parent reply other threads:[~2023-08-17 16:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-16 17:05 Doc style for method functions Simon Glass
2023-08-16 17:15 ` Jonathan Corbet
2023-08-16 17:47 ` Simon Glass
2023-08-17 16:36 ` Heinrich Schuchardt [this message]
2023-08-18 14:59 ` Simon Glass
2023-08-21 19:45 ` Heinrich Schuchardt
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=dfac4932-7cbc-3a4e-bde7-c2048516ddf1@gmx.de \
--to=xypron.glpk@gmx.de \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/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