* [PATCH][next] octeontx2-pf: remove redundant assignment to variable target
@ 2024-11-19 17:52 Colin Ian King
2024-11-21 7:50 ` Paolo Abeni
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2024-11-19 17:52 UTC (permalink / raw)
To: Sunil Goutham, Linu Cherian, Geetha sowjanya, Jerin Jacob,
hariprasad, Subbaraya Sundeep, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev
Cc: kernel-janitors, linux-kernel
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(-)
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;
--
2.39.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][next] octeontx2-pf: remove redundant assignment to variable target
2024-11-19 17:52 [PATCH][next] octeontx2-pf: remove redundant assignment to variable target Colin Ian King
@ 2024-11-21 7:50 ` Paolo Abeni
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Abeni @ 2024-11-21 7:50 UTC (permalink / raw)
To: Colin Ian King, Sunil Goutham, Linu Cherian, Geetha sowjanya,
Jerin Jacob, hariprasad, Subbaraya Sundeep, Andrew Lunn,
David S . Miller, Eric Dumazet, Jakub Kicinski, netdev
Cc: kernel-janitors, linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-21 7:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-19 17:52 [PATCH][next] octeontx2-pf: remove redundant assignment to variable target Colin Ian King
2024-11-21 7:50 ` Paolo Abeni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®