[RFC PATCH v1 01/50] IB/qib: Delete struct qib_ivdev.qp_rnd

From: George Spelvin
Date: Sat Mar 28 2020 - 12:46:37 EST


I was checking the field to see if it needed the full
get_random_bytes() and discovered it's unused.

Only compile-tested, as I don't have the hardware, but
I'm still pretty confident.

Signed-off-by: George Spelvin <lkml@xxxxxxx>
Cc: Dennis Dalessandro <dennis.dalessandro@xxxxxxxxx>
Cc: Mike Marciniszyn <mike.marciniszyn@xxxxxxxxx>
Cc: linux-rdma@xxxxxxxxxxxxxxx
---
drivers/infiniband/hw/qib/qib_verbs.c | 2 --
drivers/infiniband/hw/qib/qib_verbs.h | 1 -
2 files changed, 3 deletions(-)

diff --git a/drivers/infiniband/hw/qib/qib_verbs.c b/drivers/infiniband/hw/qib/qib_verbs.c
index 5ef93f8f17a19..7508abb6a0fa1 100644
--- a/drivers/infiniband/hw/qib/qib_verbs.c
+++ b/drivers/infiniband/hw/qib/qib_verbs.c
@@ -39,7 +39,6 @@
#include <linux/utsname.h>
#include <linux/rculist.h>
#include <linux/mm.h>
-#include <linux/random.h>
#include <linux/vmalloc.h>
#include <rdma/rdma_vt.h>

@@ -1503,7 +1502,6 @@ int qib_register_ib_device(struct qib_devdata *dd)
unsigned i, ctxt;
int ret;

- get_random_bytes(&dev->qp_rnd, sizeof(dev->qp_rnd));
for (i = 0; i < dd->num_pports; i++)
init_ibport(ppd + i);

diff --git a/drivers/infiniband/hw/qib/qib_verbs.h b/drivers/infiniband/hw/qib/qib_verbs.h
index 8bf414b47b96b..dc0e81f3b6f4f 100644
--- a/drivers/infiniband/hw/qib/qib_verbs.h
+++ b/drivers/infiniband/hw/qib/qib_verbs.h
@@ -177,7 +177,6 @@ struct qib_ibdev {
struct timer_list mem_timer;
struct qib_pio_header *pio_hdrs;
dma_addr_t pio_hdrs_phys;
- u32 qp_rnd; /* random bytes for hash */

u32 n_piowait;
u32 n_txwait;
--
2.26.0