Skip to content

Commit db5944e

Browse files
paravmellanoxkuba-moo
authored andcommitted
net/mlx5: Remove unused msix related exported APIs
MSIX irq allocation and free APIs are no longer in use. Hence, remove the dead code. Signed-off-by: Parav Pandit <[email protected]> Reviewed-by: Dragos Tatulea <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Kalesh AP <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent bcee093 commit db5944e

File tree

2 files changed

+0
-59
lines changed

2 files changed

+0
-59
lines changed

drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -507,58 +507,6 @@ struct mlx5_irq *mlx5_irq_request(struct mlx5_core_dev *dev, u16 vecidx,
507507
return irq;
508508
}
509509

510-
/**
511-
* mlx5_msix_alloc - allocate msix interrupt
512-
* @dev: mlx5 device from which to request
513-
* @handler: interrupt handler
514-
* @affdesc: affinity descriptor
515-
* @name: interrupt name
516-
*
517-
* Returns: struct msi_map with result encoded.
518-
* Note: the caller must make sure to release the irq by calling
519-
* mlx5_msix_free() if shutdown was initiated.
520-
*/
521-
struct msi_map mlx5_msix_alloc(struct mlx5_core_dev *dev,
522-
irqreturn_t (*handler)(int, void *),
523-
const struct irq_affinity_desc *affdesc,
524-
const char *name)
525-
{
526-
struct msi_map map;
527-
int err;
528-
529-
if (!dev->pdev) {
530-
map.virq = 0;
531-
map.index = -EINVAL;
532-
return map;
533-
}
534-
535-
map = pci_msix_alloc_irq_at(dev->pdev, MSI_ANY_INDEX, affdesc);
536-
if (!map.virq)
537-
return map;
538-
539-
err = request_irq(map.virq, handler, 0, name, NULL);
540-
if (err) {
541-
mlx5_core_warn(dev, "err %d\n", err);
542-
pci_msix_free_irq(dev->pdev, map);
543-
map.virq = 0;
544-
map.index = -ENOMEM;
545-
}
546-
return map;
547-
}
548-
EXPORT_SYMBOL(mlx5_msix_alloc);
549-
550-
/**
551-
* mlx5_msix_free - free a previously allocated msix interrupt
552-
* @dev: mlx5 device associated with interrupt
553-
* @map: map previously returned by mlx5_msix_alloc()
554-
*/
555-
void mlx5_msix_free(struct mlx5_core_dev *dev, struct msi_map map)
556-
{
557-
free_irq(map.virq, NULL);
558-
pci_msix_free_irq(dev->pdev, map);
559-
}
560-
EXPORT_SYMBOL(mlx5_msix_free);
561-
562510
/**
563511
* mlx5_irq_release_vector - release one IRQ back to the system.
564512
* @irq: the irq to release.

include/linux/mlx5/driver.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,11 +1374,4 @@ static inline bool mlx5_is_macsec_roce_supported(struct mlx5_core_dev *mdev)
13741374
enum {
13751375
MLX5_OCTWORD = 16,
13761376
};
1377-
1378-
struct msi_map mlx5_msix_alloc(struct mlx5_core_dev *dev,
1379-
irqreturn_t (*handler)(int, void *),
1380-
const struct irq_affinity_desc *affdesc,
1381-
const char *name);
1382-
void mlx5_msix_free(struct mlx5_core_dev *dev, struct msi_map map);
1383-
13841377
#endif /* MLX5_DRIVER_H */

0 commit comments

Comments
 (0)