All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Gustavo Sousa <gustavo.sousa@intel.com>,
	Andi Shyti <andi.shyti@linux.intel.com>
Subject: Re: [PATCH] drm/i915: use pdev_to_i915() instead of pci_get_drvdata() directly
Date: Tue, 13 Aug 2024 11:13:34 +0300	[thread overview]
Message-ID: <875xs42635.fsf@intel.com> (raw)
In-Reply-To: <20240812103415.1540096-1-jani.nikula@intel.com>

On Mon, 12 Aug 2024, Jani Nikula <jani.nikula@intel.com> wrote:
> We have a helper for converting pci device to i915 device, use it.
>
> v2: Also convert i915_pci_probe() (Gustavo)
>
> Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Pushed to din, thanks for the reviews.

BR,
Jani.

> ---
>  drivers/gpu/drm/i915/i915_pci.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
> index ce4dfd65fafa..94c89ca2ef30 100644
> --- a/drivers/gpu/drm/i915/i915_pci.c
> +++ b/drivers/gpu/drm/i915/i915_pci.c
> @@ -880,7 +880,7 @@ static void i915_pci_remove(struct pci_dev *pdev)
>  {
>  	struct drm_i915_private *i915;
>  
> -	i915 = pci_get_drvdata(pdev);
> +	i915 = pdev_to_i915(pdev);
>  	if (!i915) /* driver load aborted, nothing to cleanup */
>  		return;
>  
> @@ -1003,7 +1003,7 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	if (err)
>  		return err;
>  
> -	if (i915_inject_probe_failure(pci_get_drvdata(pdev))) {
> +	if (i915_inject_probe_failure(pdev_to_i915(pdev))) {
>  		i915_pci_remove(pdev);
>  		return -ENODEV;
>  	}
> @@ -1025,7 +1025,7 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  
>  static void i915_pci_shutdown(struct pci_dev *pdev)
>  {
> -	struct drm_i915_private *i915 = pci_get_drvdata(pdev);
> +	struct drm_i915_private *i915 = pdev_to_i915(pdev);
>  
>  	i915_driver_shutdown(i915);
>  }

-- 
Jani Nikula, Intel

      parent reply	other threads:[~2024-08-13  8:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-12 10:34 [PATCH] drm/i915: use pdev_to_i915() instead of pci_get_drvdata() directly Jani Nikula
2024-08-12 11:54 ` ✓ Fi.CI.BAT: success for " Patchwork
2024-08-12 23:25 ` ✓ Fi.CI.IGT: " Patchwork
2024-08-13  8:13 ` Jani Nikula [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=875xs42635.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=andi.shyti@linux.intel.com \
    --cc=gustavo.sousa@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.