[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] Arm32: tidy the memset() macro


  • To: Wei Chen <Wei.Chen@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 19 Aug 2022 10:04:01 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=t1heRQw42PU/RdUdVApHFnf6c1JRd5ie/52S/DUdV5E=; b=N139ulNliRLToCGTRQXKVA89SjE70BqXdGcBQftijnkPWLRaQRNV28i9oHy+WU7Dapp1tZo1W3FmE/Z6X55EqdNgnLJj9umTdpPo3K2/J02qNcuOaemicRGz+EnXt/CPA3WPcMop7eYuNk/gD5IWSj+ingEr1DKGzB3MOqCotFY32//zZ5JO9At4ADf6DXomU+ZpcF62fxhfpguljFJJ+E0OpIi9pEtAdKCvt4ih8ietbQnOK8y4G+P1Jqn1odkdbyYpFrBH3CMvpxGhCKMV+SAUFHHA3m6N3maANX0QmcFhuRu4W0/0BJwAZpBXWMpS21HiUwhHQsNhkfKV+VMaWg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BW936GgZwmmc1aX9ft/aRvrqKiAEiYZSYXzPwKhdWs1GmK2gOpMG+EW7rtkCcx1bmS5HgpwzZ8RFmvFRj584jFNBwYe57+tW7Zti7Z7XuHzOS1LbYG5pCVL2dS33QMyWGevzd9mO8fL3dHb60nrvb0zAjt8n6NAh/52V1yWcUaIPM0JjF/ZIcNZ7oxvno4WsWdfKWhQIS7UCRYgZ61gq14w6kWq9Yp0vEFyna7DY6/SBmqFaLkjBdm/hFVZAEM2LLpBlstCrbcY8hampXxZ9y6JPsJQ+GFUwj6FgAUlBZ1Z+PKaPCOpa/9Sho25ud8ouew+LbDyFjgTqPTGrjR05aA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 19 Aug 2022 08:04:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 19.08.2022 09:59, Wei Chen wrote:
>> -----Original Message-----
>> From: Xen-devel <xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx> 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@xxxxxxxx>
>> ---
>> 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



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.