Skip to content

Commit 0b27b0e

Browse files
Dr. David Alan Gilbertrleon
authored andcommitted
RDMA/vmw_pvrdma: Remove unused pvrdma_modify_device
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>
1 parent 3745242 commit 0b27b0e

2 files changed

Lines changed: 0 additions & 30 deletions

File tree

drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -237,34 +237,6 @@ enum rdma_link_layer pvrdma_port_link_layer(struct ib_device *ibdev,
237237
return IB_LINK_LAYER_ETHERNET;
238238
}
239239

240-
int pvrdma_modify_device(struct ib_device *ibdev, int mask,
241-
struct ib_device_modify *props)
242-
{
243-
unsigned long flags;
244-
245-
if (mask & ~(IB_DEVICE_MODIFY_SYS_IMAGE_GUID |
246-
IB_DEVICE_MODIFY_NODE_DESC)) {
247-
dev_warn(&to_vdev(ibdev)->pdev->dev,
248-
"unsupported device modify mask %#x\n", mask);
249-
return -EOPNOTSUPP;
250-
}
251-
252-
if (mask & IB_DEVICE_MODIFY_NODE_DESC) {
253-
spin_lock_irqsave(&to_vdev(ibdev)->desc_lock, flags);
254-
memcpy(ibdev->node_desc, props->node_desc, 64);
255-
spin_unlock_irqrestore(&to_vdev(ibdev)->desc_lock, flags);
256-
}
257-
258-
if (mask & IB_DEVICE_MODIFY_SYS_IMAGE_GUID) {
259-
mutex_lock(&to_vdev(ibdev)->port_mutex);
260-
to_vdev(ibdev)->sys_image_guid =
261-
cpu_to_be64(props->sys_image_guid);
262-
mutex_unlock(&to_vdev(ibdev)->port_mutex);
263-
}
264-
265-
return 0;
266-
}
267-
268240
/**
269241
* pvrdma_modify_port - modify device port attributes
270242
* @ibdev: the device to modify

drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,6 @@ int pvrdma_query_pkey(struct ib_device *ibdev, u32 port,
356356
u16 index, u16 *pkey);
357357
enum rdma_link_layer pvrdma_port_link_layer(struct ib_device *ibdev,
358358
u32 port);
359-
int pvrdma_modify_device(struct ib_device *ibdev, int mask,
360-
struct ib_device_modify *props);
361359
int pvrdma_modify_port(struct ib_device *ibdev, u32 port,
362360
int mask, struct ib_port_modify *props);
363361
int pvrdma_mmap(struct ib_ucontext *context, struct vm_area_struct *vma);

0 commit comments

Comments
 (0)