diff mbox series

[XEN,7/7] xen/arm: smmu-v3: address violations of MISRA C:2012 Rule 16.3

Message ID 93d32bf20bb85b93618be5140edb1be527606b77.1703066935.git.federico.serafini@bugseng.com (mailing list archive)
State New
Headers show
Series xen/arm: address violations of MISRA C:2012 Rule 16.3 | expand

Commit Message

Federico Serafini Dec. 20, 2023, 11:03 a.m. UTC
Add a break statement at the end of the switch-clauses to address
violations of MISRA C:2012 Rule 16.3 ("An unconditional `break'
statement shall terminate every switch-clause").
No funtional change.

Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
---
 xen/drivers/passthrough/arm/smmu-v3.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Julien Grall Dec. 20, 2023, 11:49 a.m. UTC | #1
Hi Federico,

On 20/12/2023 11:03, Federico Serafini wrote:
> Add a break statement at the end of the switch-clauses to address
> violations of MISRA C:2012 Rule 16.3 ("An unconditional `break'
> statement shall terminate every switch-clause").
> No funtional change.
> 
> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>

Acked-by: Julien Grall <jgrall@amazon.com>

Cheers,
Federico Serafini Jan. 5, 2024, 3:04 p.m. UTC | #2
Hi Julien,

On 20/12/23 12:49, Julien Grall wrote:
> Hi Federico,
> 
> On 20/12/2023 11:03, Federico Serafini wrote:
>> Add a break statement at the end of the switch-clauses to address
>> violations of MISRA C:2012 Rule 16.3 ("An unconditional `break'
>> statement shall terminate every switch-clause").
>> No funtional change.
>>
>> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
> 
> Acked-by: Julien Grall <jgrall@amazon.com>
>

I noticed that this has not yet been committed.
Julien Grall Jan. 5, 2024, 3:09 p.m. UTC | #3
Hi,

On 05/01/2024 15:04, Federico Serafini wrote:
> On 20/12/23 12:49, Julien Grall wrote:
>> Hi Federico,
>>
>> On 20/12/2023 11:03, Federico Serafini wrote:
>>> Add a break statement at the end of the switch-clauses to address
>>> violations of MISRA C:2012 Rule 16.3 ("An unconditional `break'
>>> statement shall terminate every switch-clause").
>>> No funtional change.
>>>
>>> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
>>
>> Acked-by: Julien Grall <jgrall@amazon.com>
>>
>  > I noticed that this has not yet been committed.

The SMMUv3 maintainers are not the same as the rest of the Arm code. So 
you technically need an Ack from one of them before this can get merged.

I have pinged Bertrand on Matrix.

Cheers,
Bertrand Marquis Jan. 5, 2024, 3:14 p.m. UTC | #4
Hi Frederico,

Sorry to have missed that one.

> On 20 Dec 2023, at 12:03, Federico Serafini <federico.serafini@bugseng.com> wrote:
> 
> Add a break statement at the end of the switch-clauses to address
> violations of MISRA C:2012 Rule 16.3 ("An unconditional `break'
> statement shall terminate every switch-clause").
> No funtional change.
> 
> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>

Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com

Cheers
Bertrand

> ---
> xen/drivers/passthrough/arm/smmu-v3.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/xen/drivers/passthrough/arm/smmu-v3.c b/xen/drivers/passthrough/arm/smmu-v3.c
> index cdbb505134..bca5866b35 100644
> --- a/xen/drivers/passthrough/arm/smmu-v3.c
> +++ b/xen/drivers/passthrough/arm/smmu-v3.c
> @@ -2200,6 +2200,7 @@ static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu)
> fallthrough;
> case IDR0_STALL_MODEL_STALL:
> smmu->features |= ARM_SMMU_FEAT_STALLS;
> + break;
> }
> 
> if (reg & IDR0_S2P)
> @@ -2301,6 +2302,7 @@ static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu)
> fallthrough;
> case IDR5_OAS_48_BIT:
> smmu->oas = 48;
> + break;
> }
> 
> smmu->oas = min_t(unsigned long, PADDR_BITS, smmu->oas);
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/xen/drivers/passthrough/arm/smmu-v3.c b/xen/drivers/passthrough/arm/smmu-v3.c
index cdbb505134..bca5866b35 100644
--- a/xen/drivers/passthrough/arm/smmu-v3.c
+++ b/xen/drivers/passthrough/arm/smmu-v3.c
@@ -2200,6 +2200,7 @@  static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu)
 		fallthrough;
 	case IDR0_STALL_MODEL_STALL:
 		smmu->features |= ARM_SMMU_FEAT_STALLS;
+		break;
 	}
 
 	if (reg & IDR0_S2P)
@@ -2301,6 +2302,7 @@  static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu)
 		fallthrough;
 	case IDR5_OAS_48_BIT:
 		smmu->oas = 48;
+		break;
 	}
 
 	smmu->oas = min_t(unsigned long, PADDR_BITS, smmu->oas);