Commit eec6f752 authored by YueHaibing's avatar YueHaibing Committed by David S. Miller

octeontx2-af: Remove set but not used variables 'devnum, is_pf'

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

drivers/net/ethernet/marvell/octeontx2/af/rvu.c: In function 'rvu_detach_rsrcs':
drivers/net/ethernet/marvell/octeontx2/af/rvu.c:855:6: warning:
 variable 'devnum' set but not used [-Wunused-but-set-variable]

drivers/net/ethernet/marvell/octeontx2/af/rvu.c:853:7: warning:
 variable 'is_pf' set but not used [-Wunused-but-set-variable]

drivers/net/ethernet/marvell/octeontx2/af/rvu.c: In function 'rvu_mbox_handler_ATTACH_RESOURCES':
drivers/net/ethernet/marvell/octeontx2/af/rvu.c:1054:7: warning:
 variable 'is_pf' set but not used [-Wunused-but-set-variable]

drivers/net/ethernet/marvell/octeontx2/af/rvu.c:1053:6: warning:
 variable 'devnum' set but not used [-Wunused-but-set-variable]

It never used since introduction in commit
746ea742 ("octeontx2-af: Add RVU block LF provisioning support")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 665fc901
...@@ -914,18 +914,9 @@ static int rvu_detach_rsrcs(struct rvu *rvu, struct rsrc_detach *detach, ...@@ -914,18 +914,9 @@ static int rvu_detach_rsrcs(struct rvu *rvu, struct rsrc_detach *detach,
u16 pcifunc) u16 pcifunc)
{ {
struct rvu_hwinfo *hw = rvu->hw; struct rvu_hwinfo *hw = rvu->hw;
bool is_pf, detach_all = true; bool detach_all = true;
struct rvu_block *block; struct rvu_block *block;
int devnum, blkid; int blkid;
/* Check if this is for a RVU PF or VF */
if (pcifunc & RVU_PFVF_FUNC_MASK) {
is_pf = false;
devnum = rvu_get_hwvf(rvu, pcifunc);
} else {
is_pf = true;
devnum = rvu_get_pf(pcifunc);
}
spin_lock(&rvu->rsrc_lock); spin_lock(&rvu->rsrc_lock);
...@@ -1114,22 +1105,12 @@ static int rvu_mbox_handler_ATTACH_RESOURCES(struct rvu *rvu, ...@@ -1114,22 +1105,12 @@ static int rvu_mbox_handler_ATTACH_RESOURCES(struct rvu *rvu,
struct msg_rsp *rsp) struct msg_rsp *rsp)
{ {
u16 pcifunc = attach->hdr.pcifunc; u16 pcifunc = attach->hdr.pcifunc;
int devnum, err; int err;
bool is_pf;
/* If first request, detach all existing attached resources */ /* If first request, detach all existing attached resources */
if (!attach->modify) if (!attach->modify)
rvu_detach_rsrcs(rvu, NULL, pcifunc); rvu_detach_rsrcs(rvu, NULL, pcifunc);
/* Check if this is for a RVU PF or VF */
if (pcifunc & RVU_PFVF_FUNC_MASK) {
is_pf = false;
devnum = rvu_get_hwvf(rvu, pcifunc);
} else {
is_pf = true;
devnum = rvu_get_pf(pcifunc);
}
spin_lock(&rvu->rsrc_lock); spin_lock(&rvu->rsrc_lock);
/* Check if the request can be accommodated */ /* Check if the request can be accommodated */
......
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