Skip to content

Commit

Permalink
cnic: remove redundant pointer req and variable func
Browse files Browse the repository at this point in the history
Pointer req and variable func are being assigned but are never used
hence they are redundant and can be removed.

Cleans up clang warnings:
warning: variable 'req' set but not used [-Wunused-but-set-variable]
warning: variable 'func' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Colin Ian King authored and David S. Miller committed Jul 4, 2018
1 parent 15cdd57 commit b68431a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/net/ethernet/broadcom/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2562,7 +2562,6 @@ static void cnic_bnx2x_delete_wait(struct cnic_dev *dev, u32 start_cid)

static int cnic_bnx2x_fcoe_fw_destroy(struct cnic_dev *dev, struct kwqe *kwqe)
{
struct fcoe_kwqe_destroy *req;
union l5cm_specific_data l5_data;
struct cnic_local *cp = dev->cnic_priv;
struct bnx2x *bp = netdev_priv(dev->netdev);
Expand All @@ -2571,7 +2570,6 @@ static int cnic_bnx2x_fcoe_fw_destroy(struct cnic_dev *dev, struct kwqe *kwqe)

cnic_bnx2x_delete_wait(dev, MAX_ISCSI_TBL_SZ);

req = (struct fcoe_kwqe_destroy *) kwqe;
cid = BNX2X_HW_CID(bp, cp->fcoe_init_cid);

memset(&l5_data, 0, sizeof(l5_data));
Expand Down Expand Up @@ -5091,13 +5089,12 @@ static int cnic_start_bnx2x_hw(struct cnic_dev *dev)
struct cnic_local *cp = dev->cnic_priv;
struct bnx2x *bp = netdev_priv(dev->netdev);
struct cnic_eth_dev *ethdev = cp->ethdev;
int func, ret;
int ret;
u32 pfid;

dev->stats_addr = ethdev->addr_drv_info_to_mcp;
cp->func = bp->pf_num;

func = CNIC_FUNC(cp);
pfid = bp->pfid;

ret = cnic_init_id_tbl(&cp->cid_tbl, MAX_ISCSI_TBL_SZ,
Expand Down

0 comments on commit b68431a

Please sign in to comment.