net/iavf: fix dead store on reset path
PATCH 1/1 net/iavf: fix dead store on reset path
When dev_start fails during reset recovery, the code defers the start to the next link-up event and resets ret to 0 to avoid treating this as an error. This is redundant since ret is unconditionally overwritten by the return value of iavf_post_reset_reconfig() immediately after. Remove the dead assignment.
--- drivers/net/intel/iavf/iavf_ethdev.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/intel/iavf/iavf_ethdev.c +0 -1
@@ -3513,7 +3513,6 @@ iavf_handle_hw_reset(struct rte_eth_dev *dev, bool vf_initiated_reset) ret); vf->start_pending = true; dev->data->dev_started =0 ; - ret =0 ; } }
Signature · 1 line
2.43.0
Quoted 10 lines · Ciara Loftus
When
dev_startfails during reset recovery, the code defers the start to the next link-up event and resets ret to 0 to avoid treating this as an error. This is redundant since ret is unconditionally overwritten by the return value ofiavf_post_reset_reconfig()immediately after. Remove the dead assignment.Fixes 9aac2219dc2a ("net/iavf: defer device start when PF VSI not ready")Signed-off-by Ciara Loftus <[email protected]>---
I wouldn't really qualify this as a bug fix except maybe static analysis tools might flag it so perhaps having a Fixes tag is worth it.
Signature · 2 lines
Thanks, Anatoly
Quoted 9 lines
Subject: Re: [PATCH] net/iavf: fix dead store on reset path
Quoted 6 lines · Ciara Loftus
When
dev_startfails during reset recovery, the code defers the start to the next link-up event and resets ret to 0 to avoid treating this as an error. This is redundant since ret is unconditionally overwritten by the return value ofiavf_post_reset_reconfig()immediately after. Remove the dead assignment.
Quoted 7 lines
Quoted 4 lines
Fixes 9aac2219dc2a ("net/iavf: defer device start when PF VSI not ready")Signed-off-by Ciara Loftus <[email protected]>---
I wouldn't really qualify this as a bug fix except maybe static analysis tools might flag it so perhaps having a Fixes tag is worth it.
Apologies this was indeed found by static analysis and should have included the following tag, if it can be added on apply:
Coverity issue: 506150
Quoted 6 lines
Acked-by Anatoly Burakov <[email protected]>--
Thanks,
Anatoly
Quoted 14 lines · Ciara
Quoted 14 lines
Subject: Re: [PATCH] net/iavf: fix dead store on reset path
Quoted 10 lines · Ciara Loftus
When
dev_startfails during reset recovery, the code defers the start to the next link-up event and resets ret to 0 to avoid treating this as an error. This is redundant since ret is unconditionally overwritten by the return value ofiavf_post_reset_reconfig()immediately after. Remove the dead assignment.Fixes 9aac2219dc2a ("net/iavf: defer device start when PF VSI not ready")Signed-off-by Ciara Loftus <[email protected]>---
Quoted 11 lines
Quoted 2 lines
I wouldn't really qualify this as a bug fix except maybe static analysis tools might flag it so perhaps having a Fixes tag is worth it.
Apologies this was indeed found by static analysis and should have included the following tag, if it can be added on apply:
Coverity issue: 506150
Quoted 3 lines
Acked-by Anatoly Burakov <[email protected]>
Added the coverity issue tag - because otherwise I was wondering why we were bothering with this - and applied patch to dpdk-next-net-intel
Thanks,
/Bruce