[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: Jan Beulich <jbeulich@xxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
- From: Julien Grall <julien@xxxxxxx>
- Date: Mon, 7 Aug 2023 10:33:00 +0100
- Cc: 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:33:09 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 07/08/2023 10:32, Jan Beulich wrote:
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.
Yes. That was a typo. Sorry for that.
Cheers,
--
Julien Grall
|