Message ID | 20241119175236.2433366-1-colin.i.king@gmail.com (mailing list archive) |
---|---|
State | Deferred |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [next] octeontx2-pf: remove redundant assignment to variable target | expand |
On 11/19/24 18:52, Colin Ian King wrote: > 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 <colin.i.king@gmail.com> ## 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
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c index da69e454662a..ceaf5ca5c036 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c @@ -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;
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 <colin.i.king@gmail.com> --- drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c | 1 - 1 file changed, 1 deletion(-)