All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Wei Chen <Wei.Chen@arm.com>
Cc: Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Volodymyr Babchuk <volodymyr_babchuk@epam.com>,
	Bertrand Marquis <Bertrand.Marquis@arm.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 2/2] Arm32: tidy the memset() macro
Date: Fri, 19 Aug 2022 10:04:01 +0200	[thread overview]
Message-ID: <8a80c79d-975e-3866-2419-f6ac5678060b@suse.com> (raw)
In-Reply-To: <PAXPR08MB74201D5D5741B9F19E3622A59E6C9@PAXPR08MB7420.eurprd08.prod.outlook.com>

On 19.08.2022 09:59, Wei Chen wrote:
>> -----Original Message-----
>> From: Xen-devel <xen-devel-bounces@lists.xenproject.org> On Behalf Of Jan
>> Beulich
>> Sent: 2022年8月19日 15:50
>>
>> - add parentheses where they were missing (MISRA)
>> - make sure to evaluate also v exactly once (MISRA)
>> - remove excess parentheses
>> - rename local variables to not have leading underscores
>> - apply Xen coding style
>>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>> ---
>> I wonder whether "if ( n_ )" is really helpful: It's extra code in all
>> callers passing a non-constant size, just to cover a pretty rare case
>> which memset() is required to deal with correctly anyway, and which
> 
> What rare case we need to use n_ that can make memset happy?

I'm afraid I don't understand the question.

Jan

> As your
> comment, I read the code again, but it seems to work fine without n_.
> 
> Cheers,
> Wei Chen


  reply	other threads:[~2022-08-19  8:04 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19  7:48 [PATCH 0/2] Arm32: memset() & friends Jan Beulich
2022-08-19  7:49 ` [PATCH 1/2] Arm32: correct string.h functions for "int" -> "unsigned char" conversion Jan Beulich
2022-08-19  8:28   ` Julien Grall
2022-08-19  7:50 ` [PATCH 2/2] Arm32: tidy the memset() macro Jan Beulich
2022-08-19  7:58   ` Julien Grall
2022-08-19  8:02     ` Jan Beulich
2022-08-19  8:06       ` Julien Grall
2022-08-19  8:11         ` Jan Beulich
2022-08-19  8:24           ` Julien Grall
2022-08-19  8:31             ` Jan Beulich
2022-08-19  8:33               ` Julien Grall
2022-08-19  7:59   ` Wei Chen
2022-08-19  8:04     ` Jan Beulich [this message]
2022-08-19  9:41       ` Wei Chen
2022-08-19 12:39         ` Jan Beulich
2022-08-19  8:32 ` [PATCH 0/2] Arm32: memset() & friends Julien Grall
2022-08-19  8:41   ` Jan Beulich
2022-08-24 12:33 ` [PATCH v2] Arm32: correct string.h functions for "int" -> "unsigned char" conversion Jan Beulich
2022-08-24 12:44   ` Bertrand Marquis
2022-08-25 14:31     ` Julien Grall
2022-08-25 14:34       ` Jan Beulich
2022-08-25 14:36         ` Julien Grall

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=8a80c79d-975e-3866-2419-f6ac5678060b@suse.com \
    --to=jbeulich@suse.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Wei.Chen@arm.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=volodymyr_babchuk@epam.com \
    --cc=xen-devel@lists.xenproject.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.