[XEN PATCH 5/7] xen/sched: address a violation of MISRA C:2012 Rule 16.3

Federico Serafini posted 7 patches 1 year, 10 months ago
There is a newer version of this series
[XEN PATCH 5/7] xen/sched: address a violation of MISRA C:2012 Rule 16.3
Posted by Federico Serafini 1 year, 10 months ago
Add break statement to address a violation of MISRA C:2012 Rule 16.3
("An unconditional `break' statement shall terminate every
switch-clause ").

No functional change.

Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
---
 xen/common/sched/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c
index 3e48da1cdd..0cb33831d2 100644
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -2007,6 +2007,7 @@ ret_t do_sched_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
 
     default:
         ret = -ENOSYS;
+        break;
     }
 
     return ret;
-- 
2.34.1
Re: [XEN PATCH 5/7] xen/sched: address a violation of MISRA C:2012 Rule 16.3
Posted by Jan Beulich 1 year, 10 months ago
On 02.04.2024 09:22, Federico Serafini wrote:
> Add break statement to address a violation of MISRA C:2012 Rule 16.3
> ("An unconditional `break' statement shall terminate every
> switch-clause ").
> 
> No functional change.
> 
> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>

However, this is the 2nd patch in this series with exactly the same title.
Going just from titles, one option would be to fold both. The other option
would be to change the title prefix of patch 3 to "xen/credit2:".

Jan
Re: [XEN PATCH 5/7] xen/sched: address a violation of MISRA C:2012 Rule 16.3
Posted by Federico Serafini 1 year, 10 months ago
On 03/04/24 08:55, Jan Beulich wrote:
> On 02.04.2024 09:22, Federico Serafini wrote:
>> Add break statement to address a violation of MISRA C:2012 Rule 16.3
>> ("An unconditional `break' statement shall terminate every
>> switch-clause ").
>>
>> No functional change.
>>
>> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
> 
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> 
> However, this is the 2nd patch in this series with exactly the same title.
> Going just from titles, one option would be to fold both. The other option
> would be to change the title prefix of patch 3 to "xen/credit2:".

I'll go for the first option.

-- 
Federico Serafini, M.Sc.

Software Engineer, BUGSENG (http://bugseng.com)