diff mbox series

[net-next,3/3] net/mlx5: Remove unused msix related exported APIs

Message ID 20240512124306.740898-4-tariqt@nvidia.com (mailing list archive)
State Accepted
Commit db5944e16cd80efcbfe0bf1d067fdcc2f710d246
Delegated to: Netdev Maintainers
Headers show
Series mlx5 misc patches | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 928 this patch: 928
netdev/build_tools success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 1 maintainers not CCed: linux-rdma@vger.kernel.org
netdev/build_clang success Errors and warnings before: 936 this patch: 936
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 939 this patch: 939
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 69 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 5 this patch: 5
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-05-13--18-00 (tests: 1019)

Commit Message

Tariq Toukan May 12, 2024, 12:43 p.m. UTC
From: Parav Pandit <parav@nvidia.com>

MSIX irq allocation and free APIs are no longer
in use. Hence, remove the dead code.

Signed-off-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
 .../net/ethernet/mellanox/mlx5/core/pci_irq.c | 52 -------------------
 include/linux/mlx5/driver.h                   |  7 ---
 2 files changed, 59 deletions(-)

Comments

Simon Horman May 13, 2024, 8:59 a.m. UTC | #1
On Sun, May 12, 2024 at 03:43:05PM +0300, Tariq Toukan wrote:
> From: Parav Pandit <parav@nvidia.com>
> 
> MSIX irq allocation and free APIs are no longer
> in use. Hence, remove the dead code.
> 
> Signed-off-by: Parav Pandit <parav@nvidia.com>
> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>

Reviewed-by: Simon Horman <horms@kernel.org>
Kalesh Anakkur Purayil May 13, 2024, 9:14 a.m. UTC | #2
On Sun, May 12, 2024 at 6:14 PM Tariq Toukan <tariqt@nvidia.com> wrote:
>
> From: Parav Pandit <parav@nvidia.com>
>
> MSIX irq allocation and free APIs are no longer
> in use. Hence, remove the dead code.
>
> Signed-off-by: Parav Pandit <parav@nvidia.com>
> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>

Looks good to me.

Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> ---
>  .../net/ethernet/mellanox/mlx5/core/pci_irq.c | 52 -------------------
>  include/linux/mlx5/driver.h                   |  7 ---
>  2 files changed, 59 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
> index 6bac8ad70ba6..fb8787e30d3f 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
> @@ -507,58 +507,6 @@ struct mlx5_irq *mlx5_irq_request(struct mlx5_core_dev *dev, u16 vecidx,
>         return irq;
>  }
>
> -/**
> - * mlx5_msix_alloc - allocate msix interrupt
> - * @dev: mlx5 device from which to request
> - * @handler: interrupt handler
> - * @affdesc: affinity descriptor
> - * @name: interrupt name
> - *
> - * Returns: struct msi_map with result encoded.
> - * Note: the caller must make sure to release the irq by calling
> - *       mlx5_msix_free() if shutdown was initiated.
> - */
> -struct msi_map mlx5_msix_alloc(struct mlx5_core_dev *dev,
> -                              irqreturn_t (*handler)(int, void *),
> -                              const struct irq_affinity_desc *affdesc,
> -                              const char *name)
> -{
> -       struct msi_map map;
> -       int err;
> -
> -       if (!dev->pdev) {
> -               map.virq = 0;
> -               map.index = -EINVAL;
> -               return map;
> -       }
> -
> -       map = pci_msix_alloc_irq_at(dev->pdev, MSI_ANY_INDEX, affdesc);
> -       if (!map.virq)
> -               return map;
> -
> -       err = request_irq(map.virq, handler, 0, name, NULL);
> -       if (err) {
> -               mlx5_core_warn(dev, "err %d\n", err);
> -               pci_msix_free_irq(dev->pdev, map);
> -               map.virq = 0;
> -               map.index = -ENOMEM;
> -       }
> -       return map;
> -}
> -EXPORT_SYMBOL(mlx5_msix_alloc);
> -
> -/**
> - * mlx5_msix_free - free a previously allocated msix interrupt
> - * @dev: mlx5 device associated with interrupt
> - * @map: map previously returned by mlx5_msix_alloc()
> - */
> -void mlx5_msix_free(struct mlx5_core_dev *dev, struct msi_map map)
> -{
> -       free_irq(map.virq, NULL);
> -       pci_msix_free_irq(dev->pdev, map);
> -}
> -EXPORT_SYMBOL(mlx5_msix_free);
> -
>  /**
>   * mlx5_irq_release_vector - release one IRQ back to the system.
>   * @irq: the irq to release.
> diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
> index 8218588688b5..0aa15cac0308 100644
> --- a/include/linux/mlx5/driver.h
> +++ b/include/linux/mlx5/driver.h
> @@ -1374,11 +1374,4 @@ static inline bool mlx5_is_macsec_roce_supported(struct mlx5_core_dev *mdev)
>  enum {
>         MLX5_OCTWORD = 16,
>  };
> -
> -struct msi_map mlx5_msix_alloc(struct mlx5_core_dev *dev,
> -                              irqreturn_t (*handler)(int, void *),
> -                              const struct irq_affinity_desc *affdesc,
> -                              const char *name);
> -void mlx5_msix_free(struct mlx5_core_dev *dev, struct msi_map map);
> -
>  #endif /* MLX5_DRIVER_H */
> --
> 2.44.0
>
>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
index 6bac8ad70ba6..fb8787e30d3f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
@@ -507,58 +507,6 @@  struct mlx5_irq *mlx5_irq_request(struct mlx5_core_dev *dev, u16 vecidx,
 	return irq;
 }
 
-/**
- * mlx5_msix_alloc - allocate msix interrupt
- * @dev: mlx5 device from which to request
- * @handler: interrupt handler
- * @affdesc: affinity descriptor
- * @name: interrupt name
- *
- * Returns: struct msi_map with result encoded.
- * Note: the caller must make sure to release the irq by calling
- *       mlx5_msix_free() if shutdown was initiated.
- */
-struct msi_map mlx5_msix_alloc(struct mlx5_core_dev *dev,
-			       irqreturn_t (*handler)(int, void *),
-			       const struct irq_affinity_desc *affdesc,
-			       const char *name)
-{
-	struct msi_map map;
-	int err;
-
-	if (!dev->pdev) {
-		map.virq = 0;
-		map.index = -EINVAL;
-		return map;
-	}
-
-	map = pci_msix_alloc_irq_at(dev->pdev, MSI_ANY_INDEX, affdesc);
-	if (!map.virq)
-		return map;
-
-	err = request_irq(map.virq, handler, 0, name, NULL);
-	if (err) {
-		mlx5_core_warn(dev, "err %d\n", err);
-		pci_msix_free_irq(dev->pdev, map);
-		map.virq = 0;
-		map.index = -ENOMEM;
-	}
-	return map;
-}
-EXPORT_SYMBOL(mlx5_msix_alloc);
-
-/**
- * mlx5_msix_free - free a previously allocated msix interrupt
- * @dev: mlx5 device associated with interrupt
- * @map: map previously returned by mlx5_msix_alloc()
- */
-void mlx5_msix_free(struct mlx5_core_dev *dev, struct msi_map map)
-{
-	free_irq(map.virq, NULL);
-	pci_msix_free_irq(dev->pdev, map);
-}
-EXPORT_SYMBOL(mlx5_msix_free);
-
 /**
  * mlx5_irq_release_vector - release one IRQ back to the system.
  * @irq: the irq to release.
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 8218588688b5..0aa15cac0308 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -1374,11 +1374,4 @@  static inline bool mlx5_is_macsec_roce_supported(struct mlx5_core_dev *mdev)
 enum {
 	MLX5_OCTWORD = 16,
 };
-
-struct msi_map mlx5_msix_alloc(struct mlx5_core_dev *dev,
-			       irqreturn_t (*handler)(int, void *),
-			       const struct irq_affinity_desc *affdesc,
-			       const char *name);
-void mlx5_msix_free(struct mlx5_core_dev *dev, struct msi_map map);
-
 #endif /* MLX5_DRIVER_H */