From: Damien Le Moal <dlemoal@kernel.org>
To: Thorsten Blum <thorsten.blum@toblux.com>
Cc: Naohiro Aota <naohiro.aota@wdc.com>,
Johannes Thumshirn <jth@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] zonefs: Use str_plural() to fix Coccinelle warning
Date: Mon, 8 Apr 2024 19:06:32 +0900 [thread overview]
Message-ID: <aeb7dd59-4b11-4b16-b3dd-6b481768d575@kernel.org> (raw)
In-Reply-To: <9AAAD718-D1D7-416E-87A9-3CA2BA20C93B@toblux.com>
On 4/8/24 19:04, Thorsten Blum wrote:
> On 8. Apr 2024, at 03:48, Damien Le Moal <dlemoal@kernel.org> wrote:
>>
>> Looking at this function definition:
>>
>> static inline const char *str_plural(size_t num)
>> {
>> return num == 1 ? "" : "s";
>> }
>>
>> It is wrong: num == 0 should not imply plural. This function needs to be fixed.
>
> I think the function is correct because in English it's:
>
> 0 files
Hu... I learned something today :)
OK. Will queue that the patch then !
> 1 file (every number but 1 is plural in English)
> 2 files
> ...
>
> Best,
> Thorsten
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2024-04-08 10:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-02 10:17 [PATCH] zonefs: Use str_plural() to fix Coccinelle warning Thorsten Blum
2024-04-08 1:48 ` Damien Le Moal
2024-04-08 10:04 ` Thorsten Blum
2024-04-08 10:06 ` Damien Le Moal [this message]
2024-04-09 23:50 ` Damien Le Moal
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=aeb7dd59-4b11-4b16-b3dd-6b481768d575@kernel.org \
--to=dlemoal@kernel.org \
--cc=jth@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=naohiro.aota@wdc.com \
--cc=thorsten.blum@toblux.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;
as well as URLs for NNTP newsgroup(s).