Fix compilation warning:
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:325:18:
error: variable 'opcode' is uninitialized when used here [-Werror,-Wuninitialized]
crsqe->opcode = opcode;
^~~~~~
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:291:11:
note: initialize the variable 'opcode' to silence this warning
u8 opcode;
^
= '\0'
Fixes:
bcfee4ce3e01 ("RDMA/bnxt_re: remove redundant cmdq_bitmap")
Link: https://lore.kernel.org/r/6ad1e44be2b560986da6fdc6b68da606413e9026.1686644105.git.leonro@nvidia.com
Acked-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
}
static int __send_message(struct bnxt_qplib_rcfw *rcfw,
- struct bnxt_qplib_cmdqmsg *msg)
+ struct bnxt_qplib_cmdqmsg *msg, u8 opcode)
{
u32 bsize, free_slots, required_slots;
struct bnxt_qplib_cmdq_ctx *cmdq;
struct pci_dev *pdev;
unsigned long flags;
u16 cookie;
- u8 opcode;
u8 *preq;
cmdq = &rcfw->cmdq;
if (rc)
return rc == -ENXIO ? bnxt_qplib_map_rc(opcode) : rc;
- rc = __send_message(rcfw, msg);
+ rc = __send_message(rcfw, msg, opcode);
if (rc)
return rc;