Re: [XEN PATCH 08/13] xen/hvm: address violations of MISRA C:2012 Rule 7.3

2023-09-13 Thread Paul Durrant

On 03/08/2023 11:22, Simone Ballarin wrote:

From: Gianluca Luparini 

The xen sources contain violations of MISRA C:2012 Rule 7.3 whose headline
states:
"The lowercase character 'l' shall not be used in a literal suffix".

Use the "L" suffix instead of the "l" suffix, to avoid potential ambiguity.
If the "u" suffix is used near "L", use the "U" suffix instead, for consistency.

The changes in this patch are mechanical.

Signed-off-by: Gianluca Luparini 
Signed-off-by: Simone Ballarin 
---
  xen/arch/x86/hvm/emulate.c | 2 +-
  xen/arch/x86/hvm/io.c  | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)



Acked-by: Paul Durrant 




Re: [XEN PATCH 08/13] xen/hvm: address violations of MISRA C:2012 Rule 7.3

2023-09-12 Thread Simone Ballarin

On 03/08/23 12:22, Simone Ballarin wrote:

From: Gianluca Luparini 

The xen sources contain violations of MISRA C:2012 Rule 7.3 whose headline
states:
"The lowercase character 'l' shall not be used in a literal suffix".

Use the "L" suffix instead of the "l" suffix, to avoid potential ambiguity.
If the "u" suffix is used near "L", use the "U" suffix instead, for consistency.

The changes in this patch are mechanical.

Signed-off-by: Gianluca Luparini 
Signed-off-by: Simone Ballarin 
---
  xen/arch/x86/hvm/emulate.c | 2 +-
  xen/arch/x86/hvm/io.c  | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c
index 75ee98a73b..053c6b495d 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -74,7 +74,7 @@ static int cf_check null_read(
  const struct hvm_io_handler *io_handler, uint64_t addr, uint32_t size,
  uint64_t *data)
  {
-*data = ~0ul;
+*data = ~0UL;
  return X86EMUL_OKAY;
  }
  
diff --git a/xen/arch/x86/hvm/io.c b/xen/arch/x86/hvm/io.c

index 53de1a967d..d75af83ad0 100644
--- a/xen/arch/x86/hvm/io.c
+++ b/xen/arch/x86/hvm/io.c
@@ -400,7 +400,7 @@ static int cf_check vpci_mmcfg_read(
  unsigned int reg;
  pci_sbdf_t sbdf;
  
-*data = ~0ul;

+*data = ~0UL;
  
  read_lock(>arch.hvm.mmcfg_lock);

  mmcfg = vpci_mmcfg_find(d, addr);


This patch still applies cleanly on staging, any change of getting an Ack?

--
Simone Ballarin, M.Sc.

Field Application Engineer, BUGSENG (https://bugseng.com)




Re: [XEN PATCH 08/13] xen/hvm: address violations of MISRA C:2012 Rule 7.3

2023-08-07 Thread Jan Beulich
On 07.08.2023 16:24, Jan Beulich wrote:
> On 04.08.2023 02:50, Stefano Stabellini wrote:
>> On Thu, 3 Aug 2023, Simone Ballarin wrote:
>>> From: Gianluca Luparini 
>>>
>>> The xen sources contain violations of MISRA C:2012 Rule 7.3 whose headline
>>> states:
>>> "The lowercase character 'l' shall not be used in a literal suffix".
>>>
>>> Use the "L" suffix instead of the "l" suffix, to avoid potential ambiguity.
>>> If the "u" suffix is used near "L", use the "U" suffix instead, for 
>>> consistency.
>>>
>>> The changes in this patch are mechanical.
>>>
>>> Signed-off-by: Gianluca Luparini 
>>> Signed-off-by: Simone Ballarin 
>>
>> Reviewed-by: Stefano Stabellini 
> 
> Acked-by: Jan Beulich 

Actually - I'm sorry. I can't ack this. This needs an ack from Paul instead.

Jan



Re: [XEN PATCH 08/13] xen/hvm: address violations of MISRA C:2012 Rule 7.3

2023-08-07 Thread Jan Beulich
On 04.08.2023 02:50, Stefano Stabellini wrote:
> On Thu, 3 Aug 2023, Simone Ballarin wrote:
>> From: Gianluca Luparini 
>>
>> The xen sources contain violations of MISRA C:2012 Rule 7.3 whose headline
>> states:
>> "The lowercase character 'l' shall not be used in a literal suffix".
>>
>> Use the "L" suffix instead of the "l" suffix, to avoid potential ambiguity.
>> If the "u" suffix is used near "L", use the "U" suffix instead, for 
>> consistency.
>>
>> The changes in this patch are mechanical.
>>
>> Signed-off-by: Gianluca Luparini 
>> Signed-off-by: Simone Ballarin 
> 
> Reviewed-by: Stefano Stabellini 

Acked-by: Jan Beulich 




Re: [XEN PATCH 08/13] xen/hvm: address violations of MISRA C:2012 Rule 7.3

2023-08-03 Thread Stefano Stabellini
On Thu, 3 Aug 2023, Simone Ballarin wrote:
> From: Gianluca Luparini 
> 
> The xen sources contain violations of MISRA C:2012 Rule 7.3 whose headline
> states:
> "The lowercase character 'l' shall not be used in a literal suffix".
> 
> Use the "L" suffix instead of the "l" suffix, to avoid potential ambiguity.
> If the "u" suffix is used near "L", use the "U" suffix instead, for 
> consistency.
> 
> The changes in this patch are mechanical.
> 
> Signed-off-by: Gianluca Luparini 
> Signed-off-by: Simone Ballarin 

Reviewed-by: Stefano Stabellini 



[XEN PATCH 08/13] xen/hvm: address violations of MISRA C:2012 Rule 7.3

2023-08-03 Thread Simone Ballarin
From: Gianluca Luparini 

The xen sources contain violations of MISRA C:2012 Rule 7.3 whose headline
states:
"The lowercase character 'l' shall not be used in a literal suffix".

Use the "L" suffix instead of the "l" suffix, to avoid potential ambiguity.
If the "u" suffix is used near "L", use the "U" suffix instead, for consistency.

The changes in this patch are mechanical.

Signed-off-by: Gianluca Luparini 
Signed-off-by: Simone Ballarin 
---
 xen/arch/x86/hvm/emulate.c | 2 +-
 xen/arch/x86/hvm/io.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c
index 75ee98a73b..053c6b495d 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -74,7 +74,7 @@ static int cf_check null_read(
 const struct hvm_io_handler *io_handler, uint64_t addr, uint32_t size,
 uint64_t *data)
 {
-*data = ~0ul;
+*data = ~0UL;
 return X86EMUL_OKAY;
 }
 
diff --git a/xen/arch/x86/hvm/io.c b/xen/arch/x86/hvm/io.c
index 53de1a967d..d75af83ad0 100644
--- a/xen/arch/x86/hvm/io.c
+++ b/xen/arch/x86/hvm/io.c
@@ -400,7 +400,7 @@ static int cf_check vpci_mmcfg_read(
 unsigned int reg;
 pci_sbdf_t sbdf;
 
-*data = ~0ul;
+*data = ~0UL;
 
 read_lock(>arch.hvm.mmcfg_lock);
 mmcfg = vpci_mmcfg_find(d, addr);
-- 
2.34.1