Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@intel.com>
To: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Intel GFX <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH v2] drm/i915/gt: allow setting generic data pointer
Date: Fri, 6 Mar 2020 23:51:02 +0200	[thread overview]
Message-ID: <20200306215102.GA2414@intel.intel> (raw)
In-Reply-To: <6eaad5cb-a460-b317-b7b2-6abf5c42d075@intel.com>

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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2020-03-06 21:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06 20:06 [Intel-gfx] [PATCH v2] drm/i915/gt: allow setting generic data pointer Andi Shyti
2020-03-06 20:51 ` Daniele Ceraolo Spurio
2020-03-06 21:51   ` Andi Shyti [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200306215102.GA2414@intel.intel \
    --to=andi.shyti@intel.com \
    --cc=daniele.ceraolospurio@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox