On 02.08.2024 14:14, Ayan Kumar Halder wrote:> --- a/xen/include/xen/vmap.h
> +++ b/xen/include/xen/vmap.h
> @@ -138,10 +138,16 @@ static inline void iounmap(void __iomem *va)
>  /* Pointer to 1 octet past the end of the VMAP_DEFAULT virtual area */
>  void *arch_vmap_virt_end(void);
>  
> +#ifdef CONFIG_MMU
>  /* Initialises the VMAP_DEFAULT virtual range */
>  static inline void vm_init(void)
>  {
>      vm_init_type(VMAP_DEFAULT, (void *)VMAP_VIRT_START, 
> arch_vmap_virt_end());
>  }
> +#else
> +static inline void vm_init(void)
> +{
> +}
> +#endif

Imo in such a case the #ifdef wants to be put inside the existing function,
avoiding the need for a 2nd instance.

Jan

Reply via email to