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

Re: [XEN PATCH 3/6] xen/delay: address MISRA C:2012 Rule 5.3.


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 7 Aug 2023 11:32:18 +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=HTXauQIP0NXVPNkQRgWkSezlcKBCrt1mjr7HHbye92E=; b=ZYk3gTTc7YAgASIQQTneJZUCuRBFsoSm8HzEWuRjI6YkCHfN9CqyVDsKdvDNbhPjnG5ICydPPRy/lR0C0oEdyi0GOn4787RBnRbWnggdYa7J/05HGC86ORDiA+zz1fpNv8I/Q2qxtPY25VZyxh9GijT8T0jwyablcm0kARa/eSMObbELdtrFOqtB02jX+bf3pcpYuUEhrxKgQzK3bPC2NiVGcszW338GwaHwcp2AsnAq8AwicEg69NqKmUNIQf8axZoaVght6IQDi847On3Oq5jcw6HatL437T1XZ9G/Zcik0cJIaB/vuYdf2ymiskrV0lj6aoBbjdAlXlbEMSOLrQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kdonu+AllvND4dz/fTMCTmUtjLTwjSQcssJrHFCeYn4vW6R6RCham6sj7zXhIO3TkxV07cJyuhyg1njVmb+1rvyqHLvYN+DYBjE1fxk2t+HIHyKSWoEKbEZm92ZXUxLOUpnxzm8rkdYQLMKwwUL1H/TmoqlYRrTk4Zi2WmCl1s/3DLSNkcl3Wvda6rccpEJlSx52rUIhSMZdW0uSz6yEtWXhj1mUjISyI+kajL9fvSK6HMaqKrUeY2OmgGsUrrNGgU4pSFoCyg+iI3cV87doFUboOkOxm5CS/VYAJ2lAZyN35SB+Xwu0b/eCje/96nhueebZY1uMaccLfFtTpTwU7w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Julien Grall <julien@xxxxxxx>, sstabellini@xxxxxxxxxx, michal.orzel@xxxxxxx, xenia.ragiadakou@xxxxxxx, ayan.kumar.halder@xxxxxxx, consulting@xxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 07 Aug 2023 09:32:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.08.2023 11:23, Nicola Vetrini wrote:
> On 07/08/2023 11:15, Jan Beulich wrote:
>> On 07.08.2023 11:01, Julien Grall wrote:
>>> On 07/08/2023 09:14, Jan Beulich wrote:
>>>> On 04.08.2023 17:27, Nicola Vetrini wrote:
>>>>> --- a/xen/include/xen/delay.h
>>>>> +++ b/xen/include/xen/delay.h
>>>>> @@ -5,6 +5,6 @@
>>>>>
>>>>>   #include <asm/delay.h>
>>>>>   #define mdelay(n) (\
>>>>> - {unsigned long msec=(n); while (msec--) udelay(1000);})
>>>>> + {unsigned long msec_=(n); while (msec_--) udelay(1000);})
>>>>
>>>> As elsewhere, please also adjust style while touching the line, at
>>>> least as far as the obviously wrong case goes:
>>>>
>>>> #define mdelay(n) (\
>>>>    {unsigned long msec_ = (n); while (msec_--) udelay(1000);})
>>>>
>>>> Even better would be
>>>>
>>>> #define mdelay(n) ({ \
>>>>    unsigned long msec_ = (n); while (msec_--) udelay(1000); \
>>>> })
>>>
>>> If you are touching the style, about converting to a staging inline 
>>> and
>>> also splitting the line in multiple one?
>>
>> I'd be happy about this being done, but I wouldn't want to go as far 
>> with
>> on-commit adjustments. Nicola, are you up to doing so in v2?
> 
> I'm afraid I don't understand what "staging inline" refers to. Other 
> than that, sure thing.

Surely Julien meant static inline.

Jan



 


Rackspace

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