[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/5] sched/arinc653: Clean up function definitions



On 16.09.2020 20:18, Jeff Kubascik wrote:
> --- a/xen/common/sched/arinc653.c
> +++ b/xen/common/sched/arinc653.c
> @@ -119,10 +119,9 @@ static int dom_handle_cmp(const xen_domain_handle_t h1,
>      return memcmp(h1, h2, sizeof(xen_domain_handle_t));
>  }
>  
> -static struct sched_unit *find_unit(
> -    const struct scheduler *ops,
> -    xen_domain_handle_t handle,
> -    int unit_id)
> +static struct sched_unit *find_unit(const struct scheduler *ops,
> +                                    xen_domain_handle_t handle,
> +                                    int unit_id)
>  {

Just fyi, afaict we consider both variants legitimate style as far
as Xen as a whole is concerned; I'm unaware of scheduler code
specific restrictions (but I'll be happy to be corrected if I'm
wrong with this).

Instead what I'm wondering by merely seeing this piece of code is
whether unit_id really can go negative. If not (as would be the
common case with IDs), it would want converting to unsigned int,
which may be more important than the purely typographical
adjustment done here.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.