Re: [PATCH v7 47/49] fs/resctrl: Remove unnecessary includes

Fenghua Yu
2025-03-07T02:37:42Z

Hi, James,

On 2/28/25 11:59, James Morse wrote:
> When splitting and moving the resctrl code to live in fs/resctrl and
> arch/x86, some code was duplicated. This was done to keep the parser
> in the script that does the moving simple. These extra includes are

As for "parser in the script", my concern is people may forget or don't
know the context of the python script in the future and get confused
when reading this patch.

Is it possible to merge this patch into patch 45 which introduces the
macros? It simplify the patch set and avoid future confuse?

> harmless on x86.
>
> Remove them to allow other architectures to start using fs/resctrl.
>
> Signed-off-by: James Morse <james.morse@arm.com>
> ---
> Changes since v6:
> * This patch is new.
> ---
> fs/resctrl/monitor.c | 2 --
> fs/resctrl/pseudo_lock.c | 1 -
> 2 files changed, 3 deletions(-)
>
> diff --git a/fs/resctrl/monitor.c b/fs/resctrl/monitor.c
> index d37324f9f95f..3fe21dcf0fde 100644
> --- a/fs/resctrl/monitor.c
> +++ b/fs/resctrl/monitor.c
> @@ -23,8 +23,6 @@
> #include <linux/sizes.h>
> #include <linux/slab.h>
>
> -#include <asm/cpu_device_id.h>
> -
> #include "internal.h"
>
> #define CREATE_TRACE_POINTS
> diff --git a/fs/resctrl/pseudo_lock.c b/fs/resctrl/pseudo_lock.c
> index d26cc1a2a84a..3bee26b8c07d 100644
> --- a/fs/resctrl/pseudo_lock.c
> +++ b/fs/resctrl/pseudo_lock.c
> @@ -27,7 +27,6 @@
> #include <asm/cpu_device_id.h>
> #include <asm/perf_event.h>
>
> -#include "../../events/perf_event.h" /* For X86_CONFIG() */
> #include "internal.h"
>
> /*

Thanks.

-Fenghua