octeontx2-pf: remove redundant assignment to variable target
Subsystems (4)
PATCH 1/1 octeontx2-pf: remove redundant assignment to variable target
The variable target is being assigned a value that is never read, it is being re-assigned a new value in both paths of a following if statement. The assignment is redundant and can be removed.
--- drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c +0 -1
@@ -1451,21 +1451,20 @@ int rvu_mbox_handler_npc_install_flow(struct rvu *rvu,* rvu_pfvf for the target PF/VF needs to be retrieved * hence modify pcifunc accordingly. */ /* AF installing for a PF/VF */ if (!req->hdr.pcifunc) target = req->vf;/* PF installing for its VF */ if (!from_vf && req->vf && !from_rep_dev) { - target = (req->hdr.pcifunc & ~RVU_PFVF_FUNC_MASK ) | req->vf; pf_set_vfs_mac = req->default_rule && (req->features &BIT_ULL (NPC_DMAC )); }/* Representor device installing for a representee */ if (from_rep_dev && req->vf) target = req->vf;else /* msg received from PF/VF */ target = req->hdr.pcifunc;
Signature · 1 line
2.39.5
Paolo Abeni
maintainerQuoted 5 lines · Colin Ian King
The variable target is being assigned a value that is never read, it is being re-assigned a new value in both paths of a following if statement. The assignment is redundant and can be removed.
Signed-off-by Colin Ian King <[email protected]>
## Form letter - net-next-closed
The merge window for v6.13 has begun and net-next is closed for new drivers, features, code refactoring and optimizations. We are currently accepting bug fixes only.
Please repost when net-next reopens after Dec 2nd.
RFC patches sent for review only are welcome at any time.
See:
https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle