[Intel-gfx] [PATCH v2] drm/i915/gt: allow setting generic data pointer
Andi Shyti
andi.shyti at intel.com
Fri Mar 6 21:51:02 UTC 2020
Hi Daniele,
> > diff --git a/drivers/gpu/drm/i915/gt/debugfs_gt.c b/drivers/gpu/drm/i915/gt/debugfs_gt.c
> > index 75255aaacaed..24099fb157be 100644
> > --- a/drivers/gpu/drm/i915/gt/debugfs_gt.c
> > +++ b/drivers/gpu/drm/i915/gt/debugfs_gt.c
> > @@ -26,15 +26,14 @@ void debugfs_gt_register(struct intel_gt *gt)
> > debugfs_gt_pm_register(gt, root);
> > }
> > -void debugfs_gt_register_files(struct intel_gt *gt,
> > - struct dentry *root,
> > - const struct debugfs_gt_file *files,
> > - unsigned long count)
> > +void __intel_gt_debugfs_register_files(struct intel_gt *gt, struct dentry *root,
>
> The gt variable is now unused in this function, so you can get rid of it,
> which means you can also drop the macro wrapper you have defined below.
uh, yes, right! I forgot to remove it :)
> > -static bool llc_eval(const struct intel_gt *gt)
> > +static bool llc_eval(void *data)
> > {
> > - return HAS_LLC(gt->i915);
> > + struct intel_gt *gt = data;
> > +
> > + return !gt ? false : HAS_LLC(gt->i915);
>
> Is there a case where gt can be NULL?
> BTW, you can also have this condition as:
>
> return gt && HAS_LLC(gt->i915);
Thanks,
Andi
More information about the Intel-gfx
mailing list