Re: [CI 1/2] drm/i915/uc: Ignore maybe-unused debug-only i915 local

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

 



Quoting Michal Wajdeczko (2019-12-12 10:46:44)
> On Thu, 12 Dec 2019 08:27:36 +0100, Chris Wilson  
> <chris@xxxxxxxxxxxxxxxxxx> wrote:
> 
> > As the i915 local in __force_fw_fetch_failures() may not be used in a
> > non-debug build, tell the compiler to ignore it and not throw waarning.
> 
> typo
> 
> >
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c  
> > b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
> > index b6aedee46f9e..4d02e06480e5 100644
> > --- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
> > +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
> > @@ -254,6 +254,8 @@ static void __force_fw_fetch_failures(struct  
> > intel_uc_fw *uc_fw, int e)
> >               uc_fw->minor_ver_wanted = 0;
> >               uc_fw->user_overridden = true;
> >       }
> > +
> > +     (void)i915;
> 
> to avoid such mistakes in the future, I would rather fix inject macro:
> 
> diff --git a/drivers/gpu/drm/i915/i915_utils.h  
> b/drivers/gpu/drm/i915/i915_utils.h
> index 04139ba1191e..b0ade76bec90 100644
> --- a/drivers/gpu/drm/i915/i915_utils.h
> +++ b/drivers/gpu/drm/i915/i915_utils.h
> @@ -69,7 +69,7 @@ bool i915_error_injected(void);
> 
>   #else
> 
> -#define i915_inject_probe_error(_i915, _err) 0
> +#define i915_inject_probe_error(i915, e) ({ BUILD_BUG_ON_INVALID(i915);  
> 0; })
>   #define i915_error_injected() false

Ok, send with my r-b!
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux