All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Heiser <markus.heiser@darmarit.de>
To: Joe Perches <joe@perches.com>, Matthew Wilcox <willy@infradead.org>
Cc: Mike Rapoport <rppt@linux.ibm.com>, linux-doc@vger.kernel.org
Subject: Re: Return: vs Returns:
Date: Thu, 7 Feb 2019 18:58:46 +0100	[thread overview]
Message-ID: <5ab01a70-edbc-71b4-8c38-8eee0859889d@darmarit.de> (raw)
In-Reply-To: <77f029f635867f45e8c0192fc4db5928a00076ef.camel@perches.com>


Am 07.02.19 um 18:50 schrieb Joe Perches:
> On Thu, 2019-02-07 at 09:34 -0800, Matthew Wilcox wrote:
>> On Thu, Feb 07, 2019 at 09:31:20AM -0800, Joe Perches wrote:
>>> It's not clear to me what you are asking checkpatch to do here.
>>>
>>> It may be reasonable for checkpatch to invoke kernel-doc on some
>>> portion of a patch, but I'm not sure how valuable it will be.
>>
>> I was just hoping to match:
>>
>>   * Returns:
>>
>> Or to quote it properly for regexes ...
>>
>> ^ +\* *Returns:
>>
>> (I think ...)
>>
>> I can't see that matching C or assembler.
> 
> checkpatch doesn't attempt to enforce any formatting standard
> on kernel-doc comments.
> 
> There doesn't seem to be much standardization for kernel-doc
> in the first place.
> 
> Just for the * return: case:
> 
> $ git grep -P -i '^\s*\*\s*returns?\s*:' -- '*.[ch]' | \
>    grep -P -oh -i '\*\s*returns?\s*:' | \
>    sort | uniq -c | sort -rn
>     5153 * Return:
>     2534 * Returns:
>     1077 * RETURN:
>      358 * RETURNS:
>      173 *	RETURNS:
>      171 * returns:
>      153 * return:
>      148 * Return :
>       72 * Returns :
>       61 *	Returns:
>       37 *  Returns:
>       30 *  returns:
>       27 *  return:
>       22 *	Return:
>       20 * Returns  :
>       19 *  Return:
>       15 *  RETURNS:
>       11 *           return:
>        6 * return :
>        6 *	return:
>        5 * returns :
>        3 *Returns:
>        3 * Returns	:
>        3 * 	returns:
>        2 *RETURNS:
>        2 *     Returns:
>        2 *      Returns:
>        2 *	returns:
>        2 * RETURN :
>        2 *      Return:
>        2 * 	Return:
>        2 *	return :
>        2 *		return:
>        1 *   RETURNS:
>        1 * RETURNs:
>        1 *   Returns:
>        1 *    Returns:
>        1 * 	Returns:
>        1 *  RETURN:
>        1 *   Return:
>        1 *    Return:
>        1 * return   :
> 
> I think standarization is more something that scripts/kernel-doc
> could or should do.

BTW: kernel-doc parser accept 'return' and 'returns':

     } elsif ($newsection =~ m/^return?$/i) {
         $newsection = $section_return;

Is there really a need to be standardize this? From the list above I think
there are only a few where it fails.

-- Markus --

  reply	other threads:[~2019-02-07 17:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07 13:59 Return: vs Returns: Matthew Wilcox
2019-02-07 15:30 ` Mike Rapoport
2019-02-07 15:58   ` Markus Heiser
2019-02-07 16:18     ` Mike Rapoport
2019-02-07 17:31       ` Joe Perches
2019-02-07 17:34         ` Matthew Wilcox
2019-02-07 17:50           ` Joe Perches
2019-02-07 17:58             ` Markus Heiser [this message]
2019-02-07 18:03               ` Joe Perches
2019-02-08  7:31                 ` Jani Nikula
2019-02-07 18:03               ` Markus Heiser
2019-02-07 17:33       ` Markus Heiser
2019-02-08 10:55         ` Mike Rapoport

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=5ab01a70-edbc-71b4-8c38-8eee0859889d@darmarit.de \
    --to=markus.heiser@darmarit.de \
    --cc=joe@perches.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=rppt@linux.ibm.com \
    --cc=willy@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.