Commit 75d03665 authored by YueHaibing's avatar YueHaibing Committed by Jason Gunthorpe

RDMA/bnxt_re: Remove set but not used variables 'pg' and 'idx'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/infiniband/hw/bnxt_re/qplib_rcfw.c: In function '__send_message':
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:101:10: warning:
 variable 'idx' set but not used [-Wunused-but-set-variable]
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:101:6: warning:
 variable 'pg' set but not used [-Wunused-but-set-variable]

commit cee0c7bb ("RDMA/bnxt_re: Refactor command queue management
code") involved this, but not used.

Link: https://lore.kernel.org/r/20200227064900.92255-1-yuehaibing@huawei.comSigned-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent a0b404a9
...@@ -98,7 +98,6 @@ static int __send_message(struct bnxt_qplib_rcfw *rcfw, struct cmdq_base *req, ...@@ -98,7 +98,6 @@ static int __send_message(struct bnxt_qplib_rcfw *rcfw, struct cmdq_base *req,
unsigned long flags; unsigned long flags;
u32 size, opcode; u32 size, opcode;
u16 cookie, cbit; u16 cookie, cbit;
int pg, idx;
u8 *preq; u8 *preq;
pdev = rcfw->pdev; pdev = rcfw->pdev;
...@@ -167,9 +166,6 @@ static int __send_message(struct bnxt_qplib_rcfw *rcfw, struct cmdq_base *req, ...@@ -167,9 +166,6 @@ static int __send_message(struct bnxt_qplib_rcfw *rcfw, struct cmdq_base *req,
hwq_ptr = (struct bnxt_qplib_cmdqe **)hwq->pbl_ptr; hwq_ptr = (struct bnxt_qplib_cmdqe **)hwq->pbl_ptr;
preq = (u8 *)req; preq = (u8 *)req;
do { do {
pg = 0;
idx = 0;
/* Locate the next cmdq slot */ /* Locate the next cmdq slot */
sw_prod = HWQ_CMP(hwq->prod, hwq); sw_prod = HWQ_CMP(hwq->prod, hwq);
cmdqe = &hwq_ptr[get_cmdq_pg(sw_prod, cmdq_depth)] cmdqe = &hwq_ptr[get_cmdq_pg(sw_prod, cmdq_depth)]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment