lkml.org 
[lkml]   [2020]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] xen: Use 'unsigned int' instead of 'unsigned'
From
Date
On 29.02.2020 23:30, Yan Yankovskyi wrote:
> Resolve the following warning, reported by checkpatch.pl:
> WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
>
> No functional change.

IMO a change like this would ideally go a little further and try
to use the actually designated types when adjusting them anyway,
e.g. ...

> --- a/drivers/xen/events/events_2l.c
> +++ b/drivers/xen/events/events_2l.c
> @@ -42,48 +42,48 @@
>
> static DEFINE_PER_CPU(xen_ulong_t [EVTCHN_MASK_SIZE], cpu_evtchn_mask);
>
> -static unsigned evtchn_2l_max_channels(void)
> +static unsigned int evtchn_2l_max_channels(void)
> {
> return EVTCHN_2L_NR_CHANNELS;
> }
>
> -static void evtchn_2l_bind_to_cpu(struct irq_info *info, unsigned cpu)
> +static void evtchn_2l_bind_to_cpu(struct irq_info *info, unsigned int cpu)
> {
> clear_bit(info->evtchn, BM(per_cpu(cpu_evtchn_mask, info->cpu)));
> set_bit(info->evtchn, BM(per_cpu(cpu_evtchn_mask, cpu)));
> }
>
> -static void evtchn_2l_clear_pending(unsigned port)
> +static void evtchn_2l_clear_pending(unsigned int port)

... evtchn_port_t here and elsewhere.

Jan

\
 
 \ /
  Last update: 2020-03-02 10:11    [W:0.059 / U:48.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site