Re: [PATCH v2 07/29] arm_mpam: Add probe/remove for mpam msc driver and kbuild boiler plate

Jonathan Cameron
2025-09-26T14:55:48Z

> >> diff --git a/drivers/resctrl/mpam_internal.h b/drivers/resctrl/mpam_internal.h
> >> new file mode 100644
> >> index 000000000000..7c63d590fc98
> >> --- /dev/null
> >> +++ b/drivers/resctrl/mpam_internal.h
> >> @@ -0,0 +1,65 @@
> >> +/* SPDX-License-Identifier: GPL-2.0 */
> >> +// Copyright (C) 2025 Arm Ltd.
> >> +
> >> +#ifndef MPAM_INTERNAL_H
> >> +#define MPAM_INTERNAL_H
> >> +
> >> +#include <linux/arm_mpam.h>
> >> +#include <linux/cpumask.h>
> >> +#include <linux/io.h>
> >> +#include <linux/mailbox_client.h>
> >> +#include <linux/mutex.h>
> >
> > spinlock.h
>
> Fixed,
>
>
> >> +#include <linux/resctrl.h>
> >
> > Not spotting anything rsctl yet. So maybe this belongs later.
>
> There shouldn't be anything that depends on resctrl in this series - looks like
> this is a 2018 era bug in the way I carved this up!
>
>
> >> +#include <linux/sizes.h>
> >> +
> >> +struct mpam_msc {
> >> + /* member of mpam_all_msc */
> >> + struct list_head all_msc_list;
> >> +
> >> + int id;
> >
> > I'd follow (approx) include what you use principles to make later header
> > shuffling easier. So a forward def for this.
>
> -ENOPARSE
>
> I'm sure I'll work this out from your later comments.

I missed on the comment (I think). Would have made more sense a line later.
Add a forwards def

struct platform_device;

as no reason to include the appropriate header
(and you didn't anwyay).