Re: [PATCH] drm/i915: Fix implicit use of struct pci_dev

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

 



On Mon, 13 Dec 2021, broonie@xxxxxxxxxx wrote:
> From: Mark Brown <broonie@xxxxxxxxxx>
>
> intel_device_info.h references struct pci_dev but does not ensure that
> the struct has been declared, causing build failures if something in
> other headers changes so that the implicit dependency it is relying on
> is no longer satisfied:
>
> In file included from /tmp/next/build/drivers/gpu/drm/i915/intel_device_info.h:32,
>                  from /tmp/next/build/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h:11,
>                  from /tmp/next/build/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c:11:
> /tmp/next/build/drivers/gpu/drm/i915/display/intel_display.h:643:39: error: 'struct pci_dev' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
>   643 | bool intel_modeset_probe_defer(struct pci_dev *pdev);
>       |                                       ^~~~~~~
> cc1: all warnings being treated as errors
>
> Add a declaration of the struct to fix this.
>
> Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>

Thanks,

Fixes: 94b541f53db1 ("drm/i915: Add intel_modeset_probe_defer() helper")
Reviewed-by: Jani Nikula <jani.nikula@xxxxxxxxx>

> ---
>  drivers/gpu/drm/i915/display/intel_display.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
> index 4b688a9727b39..377790393a855 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.h
> +++ b/drivers/gpu/drm/i915/display/intel_display.h
> @@ -57,6 +57,7 @@ struct intel_plane;
>  struct intel_plane_state;
>  struct intel_remapped_info;
>  struct intel_rotation_info;
> +struct pci_dev;
>  
>  enum i915_gpio {
>  	GPIOA,

-- 
Jani Nikula, Intel Open Source Graphics Center



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux