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

Re: [Xen-devel] [PATCH RFC v1 16/74] x86/fixmap: Modify fix_to_virt() to return a void pointer



>>> On 04.01.18 at 14:05, <wei.liu2@xxxxxxxxxx> wrote:
> --- a/xen/drivers/acpi/apei/apei-io.c
> +++ b/xen/drivers/acpi/apei/apei-io.c
> @@ -92,7 +92,7 @@ static void __iomem *__init apei_range_map(paddr_t paddr, 
> unsigned long size)
>               apei_range_nr++;
>       }
>  
> -     return (void __iomem *)fix_to_virt(FIX_APEI_RANGE_BASE + start_nr);
> +     return fix_to_virt(FIX_APEI_RANGE_BASE + start_nr);
>  }

Granted we probably don't use "__iomem" consistently, and we may
hence well want to consider dropping it altogether. But without that
being called out in the description, I don't think it should be dropped
here and further down.

Another option would be to introduce something like fix_to_io_virt(),
with that annotation included in the cast.

> --- a/xen/include/asm-x86/apicdef.h
> +++ b/xen/include/asm-x86/apicdef.h
> @@ -119,7 +119,7 @@
>  /* Only available in x2APIC mode */
>  #define              APIC_SELF_IPI   0x3F0
>  
> -#define APIC_BASE (fix_to_virt(FIX_APIC_BASE))
> +#define APIC_BASE (__fix_to_virt(FIX_APIC_BASE))

Please take the opportunity to get rid of the unnecessary
parentheses.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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