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

Re: [PATCH v3 15/19] xen/arm: mm: Clean-up the includes and order them



On Mon, 21 Feb 2022, Julien Grall wrote:
> From: Julien Grall <jgrall@xxxxxxxxxx>
> 
> The numbers of includes in mm.c has been growing quite a lot. However
> some of them (e.g. xen/device_tree.h, xen/softirq.h) doesn't look
> to be directly used by the file or other will be included by
> larger headers (e.g asm/flushtlb.h will be included by xen/mm.h).
> 
> So trim down the number of includes. Take the opportunity to order
> them with the xen headers first, then asm headers and last public
> headers.
> 
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>

I'll trust you on this one :-)

Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>


> ---
>     Changes in v3:
>         - Patch added
> ---
>  xen/arch/arm/mm.c | 27 ++++++++++-----------------
>  1 file changed, 10 insertions(+), 17 deletions(-)
> 
> diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
> index b7942464d4de..659bdf25e0ff 100644
> --- a/xen/arch/arm/mm.c
> +++ b/xen/arch/arm/mm.c
> @@ -17,33 +17,26 @@
>   * GNU General Public License for more details.
>   */
>  
> -#include <xen/compile.h>
> -#include <xen/types.h>
> -#include <xen/device_tree.h>
> -#include <xen/init.h>
> -#include <xen/mm.h>
> -#include <xen/preempt.h>
> +#include <xen/domain_page.h>
>  #include <xen/errno.h>
>  #include <xen/grant_table.h>
> -#include <xen/softirq.h>
> -#include <xen/event.h>
>  #include <xen/guest_access.h>
> -#include <xen/domain_page.h>
> -#include <xen/err.h>
> -#include <asm/page.h>
> -#include <asm/current.h>
> -#include <asm/flushtlb.h>
> -#include <public/memory.h>
> +#include <xen/init.h>
> +#include <xen/libfdt/libfdt.h>
> +#include <xen/mm.h>
> +#include <xen/pfn.h>
>  #include <xen/sched.h>
> +#include <xen/sizes.h>
> +#include <xen/types.h>
>  #include <xen/vmap.h>
> +
>  #include <xsm/xsm.h>
> -#include <xen/pfn.h>
> -#include <xen/sizes.h>
> -#include <xen/libfdt/libfdt.h>
>  
>  #include <asm/fixmap.h>
>  #include <asm/setup.h>
>  
> +#include <public/memory.h>
> +
>  /* Override macros from asm/page.h to make them work with mfn_t */
>  #undef virt_to_mfn
>  #define virt_to_mfn(va) _mfn(__virt_to_mfn(va))
> -- 
> 2.32.0
> 



 


Rackspace

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