Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Piotr Piórkowski" <piotr.piorkowski@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/xe: Allow const pointer when checking SR-IOV mode
Date: Tue, 18 Jun 2024 09:23:51 +0200	[thread overview]
Message-ID: <20240618072351.2jgamzb6dxdcjq26@intel.com> (raw)
In-Reply-To: <20240617122613.553-1-michal.wajdeczko@intel.com>

Michal Wajdeczko <michal.wajdeczko@intel.com> wrote on pon [2024-cze-17 14:26:13 +0200]:
> It seems that more and more parts of the driver code rely on
> having only a const pointer to the xe_device. Allow to check
> SR-IOV mode in that code as well.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_sriov.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_sriov.h b/drivers/gpu/drm/xe/xe_sriov.h
> index 486bb21c3256..688fbabf08f1 100644
> --- a/drivers/gpu/drm/xe/xe_sriov.h
> +++ b/drivers/gpu/drm/xe/xe_sriov.h
> @@ -19,18 +19,18 @@ void xe_sriov_probe_early(struct xe_device *xe);
>  void xe_sriov_print_info(struct xe_device *xe, struct drm_printer *p);
>  int xe_sriov_init(struct xe_device *xe);
>  
> -static inline enum xe_sriov_mode xe_device_sriov_mode(struct xe_device *xe)
> +static inline enum xe_sriov_mode xe_device_sriov_mode(const struct xe_device *xe)
>  {
>  	xe_assert(xe, xe->sriov.__mode);
>  	return xe->sriov.__mode;
>  }
>  
> -static inline bool xe_device_is_sriov_pf(struct xe_device *xe)
> +static inline bool xe_device_is_sriov_pf(const struct xe_device *xe)
>  {
>  	return xe_device_sriov_mode(xe) == XE_SRIOV_MODE_PF;
>  }
>  
> -static inline bool xe_device_is_sriov_vf(struct xe_device *xe)
> +static inline bool xe_device_is_sriov_vf(const struct xe_device *xe)
>  {
>  	return xe_device_sriov_mode(xe) == XE_SRIOV_MODE_VF;
>  }

Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>

> -- 
> 2.43.0
> 

-- 

      parent reply	other threads:[~2024-06-18  7:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17 12:26 [PATCH] drm/xe: Allow const pointer when checking SR-IOV mode Michal Wajdeczko
2024-06-17 12:31 ` ✓ CI.Patch_applied: success for " Patchwork
2024-06-17 12:31 ` ✓ CI.checkpatch: " Patchwork
2024-06-17 12:32 ` ✓ CI.KUnit: " Patchwork
2024-06-17 12:44 ` ✓ CI.Build: " Patchwork
2024-06-17 12:46 ` ✗ CI.Hooks: failure " Patchwork
2024-06-17 12:47 ` ✓ CI.checksparse: success " Patchwork
2024-06-17 13:09 ` ✓ CI.BAT: " Patchwork
2024-06-18  0:19 ` ✗ CI.FULL: failure " Patchwork
2024-06-18  8:47   ` Michal Wajdeczko
2024-06-18  7:23 ` Piotr Piórkowski [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=20240618072351.2jgamzb6dxdcjq26@intel.com \
    --to=piotr.piorkowski@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=michal.wajdeczko@intel.com \
    /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