aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ocrdma/ocrdma_stats.c
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2019-10-29 08:27:34 +0200
committerJason Gunthorpe <jgg@mellanox.com>2019-11-06 15:38:57 -0400
commit6a42265c9116a2ff8b94b52525c95f177cb15db2 (patch)
treeb78ffaee870a0d9451b560a1d5d4e7d24412d156 /drivers/infiniband/hw/ocrdma/ocrdma_stats.c
parentRDMA/mad: Allocate zeroed MAD buffer (diff)
downloadlinux-dev-6a42265c9116a2ff8b94b52525c95f177cb15db2.tar.xz
linux-dev-6a42265c9116a2ff8b94b52525c95f177cb15db2.zip
RDMA/ocrdma: Make ocrdma_pma_counters() return void
This function always returns 0, so just use void and remove the bogus checking at the only call site. Link: https://lore.kernel.org/r/20191029062745.7932-6-leon@kernel.org Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/ocrdma/ocrdma_stats.c')
-rw-r--r--drivers/infiniband/hw/ocrdma/ocrdma_stats.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_stats.c b/drivers/infiniband/hw/ocrdma/ocrdma_stats.c
index dda9b61f53b6..95e8c1560cc2 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_stats.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_stats.c
@@ -670,8 +670,7 @@ err:
return -EFAULT;
}
-int ocrdma_pma_counters(struct ocrdma_dev *dev,
- struct ib_mad *out_mad)
+void ocrdma_pma_counters(struct ocrdma_dev *dev, struct ib_mad *out_mad)
{
struct ib_pma_portcounters *pma_cnt;
@@ -682,7 +681,6 @@ int ocrdma_pma_counters(struct ocrdma_dev *dev,
pma_cnt->port_rcv_data = cpu_to_be32(ocrdma_sysfs_rcv_data(dev));
pma_cnt->port_xmit_packets = cpu_to_be32(ocrdma_sysfs_xmit_pkts(dev));
pma_cnt->port_rcv_packets = cpu_to_be32(ocrdma_sysfs_rcv_pkts(dev));
- return 0;
}
static ssize_t ocrdma_dbgfs_ops_read(struct file *filp, char __user *buffer,