]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
RDMA/core: Delete not-implemented get_vector_affinity
authorLeon Romanovsky <leonro@nvidia.com>
Thu, 26 Feb 2026 13:44:12 +0000 (15:44 +0200)
committerLeon Romanovsky <leon@kernel.org>
Thu, 5 Mar 2026 10:41:02 +0000 (05:41 -0500)
No drivers implement .get_vector_affinity(), and no callers invoke
ib_get_vector_affinity(), so remove it.

Link: https://patch.msgid.link/20260226-get_vector_affinity-v1-1-910a899c4e5d@nvidia.com
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
drivers/infiniband/core/device.c
include/rdma/ib_verbs.h

index c7b227e2e65790b121e4fe0be01173092d848fee..8b1ec1f9c5e460a9b47b4c5b220630a87076054a 100644 (file)
@@ -2749,7 +2749,6 @@ void ib_set_device_ops(struct ib_device *dev, const struct ib_device_ops *ops)
        SET_DEVICE_OP(dev_ops, get_netdev);
        SET_DEVICE_OP(dev_ops, get_numa_node);
        SET_DEVICE_OP(dev_ops, get_port_immutable);
-       SET_DEVICE_OP(dev_ops, get_vector_affinity);
        SET_DEVICE_OP(dev_ops, get_vf_config);
        SET_DEVICE_OP(dev_ops, get_vf_guid);
        SET_DEVICE_OP(dev_ops, get_vf_stats);
index ba34b131e9be5040d3eae7d3fe3fe306feb8e6eb..6142f7e39700fbbf42df9e5144d8829d574b095d 100644 (file)
@@ -2426,8 +2426,6 @@ struct ib_device_ops {
        int (*modify_device)(struct ib_device *device, int device_modify_mask,
                             struct ib_device_modify *device_modify);
        void (*get_dev_fw_str)(struct ib_device *device, char *str);
-       const struct cpumask *(*get_vector_affinity)(struct ib_device *ibdev,
-                                                    int comp_vector);
        int (*query_port)(struct ib_device *device, u32 port_num,
                          struct ib_port_attr *port_attr);
        int (*query_port_speed)(struct ib_device *device, u32 port_num,
@@ -4834,27 +4832,6 @@ static inline __be16 ib_lid_be16(u32 lid)
        return cpu_to_be16((u16)lid);
 }
 
-/**
- * ib_get_vector_affinity - Get the affinity mappings of a given completion
- *   vector
- * @device:         the rdma device
- * @comp_vector:    index of completion vector
- *
- * Returns NULL on failure, otherwise a corresponding cpu map of the
- * completion vector (returns all-cpus map if the device driver doesn't
- * implement get_vector_affinity).
- */
-static inline const struct cpumask *
-ib_get_vector_affinity(struct ib_device *device, int comp_vector)
-{
-       if (comp_vector < 0 || comp_vector >= device->num_comp_vectors ||
-           !device->ops.get_vector_affinity)
-               return NULL;
-
-       return device->ops.get_vector_affinity(device, comp_vector);
-
-}
-
 /**
  * rdma_roce_rescan_device - Rescan all of the network devices in the system
  * and add their gids, as needed, to the relevant RoCE devices.