Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Francois Dugast <francois.dugast@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
	Jani Nikula <jani.nikula@linux.intel.com>
Subject: Re: [PATCH] drm/xe/pf: Remove inlined #ifdef CONFIG_PCI_IOV
Date: Thu, 27 Jun 2024 13:54:15 +0200	[thread overview]
Message-ID: <Zn1S50McuqBNSfsi@fdugast-desk> (raw)
In-Reply-To: <20240627104305.1477-1-michal.wajdeczko@intel.com>

On Thu, Jun 27, 2024 at 12:43:05PM +0200, Michal Wajdeczko wrote:
> We can remove #ifdef CONFIG_PCI_IOV in .c files if we provide
> dummy replacement of the xe_pci_sriov_configure() function.
> 
> Suggested-by: Jani Nikula <jani.nikula@linux.intel.com>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>

Reviewed-by: Francois Dugast <francois.dugast@intel.com>

> ---
>  drivers/gpu/drm/xe/xe_pci.c       | 4 ----
>  drivers/gpu/drm/xe/xe_pci_sriov.h | 7 +++++++
>  2 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> index 4b91a9878f41..53b67f39c7d5 100644
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
> @@ -749,10 +749,8 @@ static void xe_pci_remove(struct pci_dev *pdev)
>  	if (!xe) /* driver load aborted, nothing to cleanup */
>  		return;
>  
> -#ifdef CONFIG_PCI_IOV
>  	if (IS_SRIOV_PF(xe))
>  		xe_pci_sriov_configure(pdev, 0);
> -#endif
>  
>  	xe_device_remove(xe);
>  	xe_pm_runtime_fini(xe);
> @@ -1010,9 +1008,7 @@ static struct pci_driver xe_pci_driver = {
>  	.probe = xe_pci_probe,
>  	.remove = xe_pci_remove,
>  	.shutdown = xe_pci_shutdown,
> -#ifdef CONFIG_PCI_IOV
>  	.sriov_configure = xe_pci_sriov_configure,
> -#endif
>  #ifdef CONFIG_PM_SLEEP
>  	.driver.pm = &xe_pm_ops,
>  #endif
> diff --git a/drivers/gpu/drm/xe/xe_pci_sriov.h b/drivers/gpu/drm/xe/xe_pci_sriov.h
> index 3b8bfbf7e1d9..c76dd0d90495 100644
> --- a/drivers/gpu/drm/xe/xe_pci_sriov.h
> +++ b/drivers/gpu/drm/xe/xe_pci_sriov.h
> @@ -8,6 +8,13 @@
>  
>  struct pci_dev;
>  
> +#ifdef CONFIG_PCI_IOV
>  int xe_pci_sriov_configure(struct pci_dev *pdev, int num_vfs);
> +#else
> +static inline int xe_pci_sriov_configure(struct pci_dev *pdev, int num_vfs)
> +{
> +	return 0;
> +}
> +#endif
>  
>  #endif
> -- 
> 2.43.0
> 

  parent reply	other threads:[~2024-06-27 11:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-27 10:43 [PATCH] drm/xe/pf: Remove inlined #ifdef CONFIG_PCI_IOV Michal Wajdeczko
2024-06-27 10:48 ` ✓ CI.Patch_applied: success for " Patchwork
2024-06-27 10:48 ` ✓ CI.checkpatch: " Patchwork
2024-06-27 10:49 ` ✓ CI.KUnit: " Patchwork
2024-06-27 11:01 ` ✓ CI.Build: " Patchwork
2024-06-27 11:03 ` ✓ CI.Hooks: " Patchwork
2024-06-27 11:04 ` ✓ CI.checksparse: " Patchwork
2024-06-27 11:27 ` ✓ CI.BAT: " Patchwork
2024-06-27 11:54 ` Francois Dugast [this message]
2024-06-27 19:03 ` ✗ CI.FULL: failure " Patchwork
2024-07-01 15:18   ` Michal Wajdeczko

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=Zn1S50McuqBNSfsi@fdugast-desk \
    --to=francois.dugast@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --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