diff mbox series

drm/i915: Remove __maybe_unused from used

Message ID 20221214194944.3670344-1-lucas.demarchi@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Remove __maybe_unused from used | expand

Commit Message

Lucas De Marchi Dec. 14, 2022, 7:49 p.m. UTC
The attribute __maybe_unused should remain only until the respective
info is not in the pciidlist. The info can't be added together
with its definition because that would cause the driver to automatically
probe for the device, while it's still not ready for that. However once
pciidlist contains it, the attribute can be removed.

Fixes: 7835303982d1 ("drm/i915/mtl: Add MeteorLake PCI IDs")
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 drivers/gpu/drm/i915/i915_pci.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Sripada, Radhakrishna Dec. 14, 2022, 8:23 p.m. UTC | #1
> -----Original Message-----
> From: De Marchi, Lucas <lucas.demarchi@intel.com>
> Sent: Wednesday, December 14, 2022 11:50 AM
> To: intel-gfx@lists.freedesktop.org
> Cc: Sripada, Radhakrishna <radhakrishna.sripada@intel.com>; De Marchi, Lucas
> <lucas.demarchi@intel.com>
> Subject: [PATCH] drm/i915: Remove __maybe_unused from used
> 
> The attribute __maybe_unused should remain only until the respective
> info is not in the pciidlist. The info can't be added together
> with its definition because that would cause the driver to automatically
> probe for the device, while it's still not ready for that. However once
> pciidlist contains it, the attribute can be removed.
> 
> Fixes: 7835303982d1 ("drm/i915/mtl: Add MeteorLake PCI IDs")
Thank you for catching this.

Reviewed-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>

-RK
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_pci.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
> index 3f803c1280c0..fe28104d2ae4 100644
> --- a/drivers/gpu/drm/i915/i915_pci.c
> +++ b/drivers/gpu/drm/i915/i915_pci.c
> @@ -1130,7 +1130,6 @@ static const struct intel_gt_definition
> xelpmp_extra_gt[] = {
>  	{}
>  };
> 
> -__maybe_unused
>  static const struct intel_device_info mtl_info = {
>  	XE_HP_FEATURES,
>  	XE_LPDP_FEATURES,
> --
> 2.38.1
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 3f803c1280c0..fe28104d2ae4 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -1130,7 +1130,6 @@  static const struct intel_gt_definition xelpmp_extra_gt[] = {
 	{}
 };
 
-__maybe_unused
 static const struct intel_device_info mtl_info = {
 	XE_HP_FEATURES,
 	XE_LPDP_FEATURES,