diff mbox series

[v6,08/11] drm/i915/pxp: Use to_gt() helper

Message ID 20211209132512.47241-9-andi.shyti@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series More preparation for multi gt patches | expand

Commit Message

Andi Shyti Dec. 9, 2021, 1:25 p.m. UTC
Use to_gt() helper consistently throughout the codebase.
Pure mechanical s/i915->gt/to_gt(i915). No functional changes.

Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
---
 drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Matt Roper Dec. 9, 2021, 11:59 p.m. UTC | #1
On Thu, Dec 09, 2021 at 03:25:09PM +0200, Andi Shyti wrote:
> Use to_gt() helper consistently throughout the codebase.
> Pure mechanical s/i915->gt/to_gt(i915). No functional changes.
> 
> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c b/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c
> index 5d169624ad60..726c2b5a3fa3 100644
> --- a/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c
> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c
> @@ -14,9 +14,11 @@
>  #include "intel_pxp_tee.h"
>  #include "intel_pxp_tee_interface.h"
>  
> -static inline struct intel_pxp *i915_dev_to_pxp(struct device *i915_kdev)
> +static  struct intel_pxp *i915_dev_to_pxp(struct device *i915_kdev)

Was dropping the inline here intentional?  It doesn't seem like there's
any reason to drop it, and if it was intentional the whitespace isn't
quite right.


Matt

>  {
> -	return &kdev_to_i915(i915_kdev)->gt.pxp;
> +	struct drm_i915_private *i915 = kdev_to_i915(i915_kdev);
> +
> +	return &to_gt(i915)->pxp;
>  }
>  
>  static int intel_pxp_tee_io_message(struct intel_pxp *pxp,
> -- 
> 2.34.1
>
Andi Shyti Dec. 10, 2021, 12:21 a.m. UTC | #2
Hi Matt,

> > -static inline struct intel_pxp *i915_dev_to_pxp(struct device *i915_kdev)
> > +static  struct intel_pxp *i915_dev_to_pxp(struct device *i915_kdev)
> 
> Was dropping the inline here intentional?  It doesn't seem like there's
> any reason to drop it, and if it was intentional the whitespace isn't
> quite right.

No, it wasn't intentional and it's strange that checkpatch
didn't catch it. I will resend this one.

Thanks!
Andi
Matt Roper Dec. 10, 2021, 12:22 a.m. UTC | #3
On Fri, Dec 10, 2021 at 02:21:53AM +0200, Andi Shyti wrote:
> Hi Matt,
> 
> > > -static inline struct intel_pxp *i915_dev_to_pxp(struct device *i915_kdev)
> > > +static  struct intel_pxp *i915_dev_to_pxp(struct device *i915_kdev)
> > 
> > Was dropping the inline here intentional?  It doesn't seem like there's
> > any reason to drop it, and if it was intentional the whitespace isn't
> > quite right.
> 
> No, it wasn't intentional and it's strange that checkpatch
> didn't catch it. I will resend this one.

With the 'inline' re-added, you can include

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>


> 
> Thanks!
> Andi
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c b/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c
index 5d169624ad60..726c2b5a3fa3 100644
--- a/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c
+++ b/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c
@@ -14,9 +14,11 @@ 
 #include "intel_pxp_tee.h"
 #include "intel_pxp_tee_interface.h"
 
-static inline struct intel_pxp *i915_dev_to_pxp(struct device *i915_kdev)
+static  struct intel_pxp *i915_dev_to_pxp(struct device *i915_kdev)
 {
-	return &kdev_to_i915(i915_kdev)->gt.pxp;
+	struct drm_i915_private *i915 = kdev_to_i915(i915_kdev);
+
+	return &to_gt(i915)->pxp;
 }
 
 static int intel_pxp_tee_io_message(struct intel_pxp *pxp,