Re: [PATCH 41/79] drm/xe: Cleanup headers in xe_i2c.c

Matt Roper
2026-01-14T16:29:26Z

On Wed, Jan 14, 2026 at 06:12:00AM +0100, Raag Jadav wrote:
> On Tue, Jan 13, 2026 at 03:03:46PM -0800, Matt Roper wrote:
> > xe_i2c.c doesn't use anything from xe_device.h or xe_platform_types.h.
> > Drop the unnecessary includes. However it does require xe_sriov.h which
> > was being indirectly included; add an explicit include for that.
> >
> > Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> > ---
> > drivers/gpu/drm/xe/xe_i2c.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_i2c.c b/drivers/gpu/drm/xe/xe_i2c.c
> > index befc77e46eae..1e1fb72e49bf 100644
> > --- a/drivers/gpu/drm/xe/xe_i2c.c
> > +++ b/drivers/gpu/drm/xe/xe_i2c.c
> > @@ -5,6 +5,7 @@
> > * Copyright (C) 2025 Intel Corporation.
> > */
> >
> > +#include <drm/drm_print.h>
> > #include <linux/array_size.h>
> > #include <linux/container_of.h>
> > #include <linux/device.h>
> > @@ -26,11 +27,10 @@
> > #include "regs/xe_i2c_regs.h"
> > #include "regs/xe_irq_regs.h"
> >
> > -#include "xe_device.h"
> > #include "xe_device_types.h"
> > #include "xe_i2c.h"
> > #include "xe_mmio.h"
> > -#include "xe_platform_types.h"
> > +#include "xe_sriov.h"
>
> My guess is, with pci.h here you won't even need this. But I could be
> wrong.

In this case we needed xe_sriov.h for the definition of IS_SRIOV_VF()
that's used later in the file.

Matt

>
> Raag
>
> > #include "xe_survivability_mode.h"
> >
> > /**
> > --
> > 2.52.0
> >

--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation