|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH 2/3] xen/sched: address violation of MISRA C Rule 8.2
On Fri, 14 Feb 2025, Nicola Vetrini wrote:
> Rule 8.2 states: "Function types shall be in prototype form with
> named parameters".
>
> The parameter name is missing from the function pointer type
> that constitutes the first parameter.
>
> No functional change.
>
> Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
> ---
> This small fix is needed in order to keep the rule clean in the
> follow-up patch that changes the Xen configuration under static
> analysis.
>
> I wasn't really certain about the right name to give to the parameter,
> so if there are better options I'd be happy to accept them.
> ---
> xen/common/sched/rt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/common/sched/rt.c b/xen/common/sched/rt.c
> index f368e0fdd5a5..0300d2d2e454 100644
> --- a/xen/common/sched/rt.c
> +++ b/xen/common/sched/rt.c
> @@ -500,7 +500,7 @@ deadline_queue_remove(struct list_head *queue, struct
> list_head *elem)
> }
>
> static inline bool
> -deadline_queue_insert(struct rt_unit * (*qelem)(struct list_head *),
> +deadline_queue_insert(struct rt_unit * (*qelem)(struct list_head *q_iter),
I think it should be "elem" instead of "q_iter"
Other than that:
Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
The small change can be done on commit.
> struct rt_unit *svc, struct list_head *elem,
> struct list_head *queue)
> {
> --
> 2.43.0
>
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |