Skip to content

Commit

Permalink
RDMA/vmw_pvrdma: Remove unused pvrdma_modify_device
Browse files Browse the repository at this point in the history
pvrdma_modify_device() was added in 2016 as part of
commit 29c8d9e ("IB: Add vmw_pvrdma driver")
but accidentally it was never wired into the device_ops struct.

After some discussion the best course seems to be just to remove it,
see discussion at:
https://lore.kernel.org/all/Z8TWF6coBUF3l_jk@gallifrey/

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://patch.msgid.link/20250304215637.68559-1-linux@treblig.org
Acked-by: Vishnu Dasa <vishnu.dasa@broadcom.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
  • Loading branch information
Dr. David Alan Gilbert authored and Leon Romanovsky committed Mar 6, 2025
1 parent 3745242 commit 0b27b0e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
28 changes: 0 additions & 28 deletions drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,34 +237,6 @@ enum rdma_link_layer pvrdma_port_link_layer(struct ib_device *ibdev,
return IB_LINK_LAYER_ETHERNET;
}

int pvrdma_modify_device(struct ib_device *ibdev, int mask,
struct ib_device_modify *props)
{
unsigned long flags;

if (mask & ~(IB_DEVICE_MODIFY_SYS_IMAGE_GUID |
IB_DEVICE_MODIFY_NODE_DESC)) {
dev_warn(&to_vdev(ibdev)->pdev->dev,
"unsupported device modify mask %#x\n", mask);
return -EOPNOTSUPP;
}

if (mask & IB_DEVICE_MODIFY_NODE_DESC) {
spin_lock_irqsave(&to_vdev(ibdev)->desc_lock, flags);
memcpy(ibdev->node_desc, props->node_desc, 64);
spin_unlock_irqrestore(&to_vdev(ibdev)->desc_lock, flags);
}

if (mask & IB_DEVICE_MODIFY_SYS_IMAGE_GUID) {
mutex_lock(&to_vdev(ibdev)->port_mutex);
to_vdev(ibdev)->sys_image_guid =
cpu_to_be64(props->sys_image_guid);
mutex_unlock(&to_vdev(ibdev)->port_mutex);
}

return 0;
}

/**
* pvrdma_modify_port - modify device port attributes
* @ibdev: the device to modify
Expand Down
2 changes: 0 additions & 2 deletions drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,6 @@ int pvrdma_query_pkey(struct ib_device *ibdev, u32 port,
u16 index, u16 *pkey);
enum rdma_link_layer pvrdma_port_link_layer(struct ib_device *ibdev,
u32 port);
int pvrdma_modify_device(struct ib_device *ibdev, int mask,
struct ib_device_modify *props);
int pvrdma_modify_port(struct ib_device *ibdev, u32 port,
int mask, struct ib_port_modify *props);
int pvrdma_mmap(struct ib_ucontext *context, struct vm_area_struct *vma);
Expand Down

0 comments on commit 0b27b0e

Please sign in to comment.