On 30/10/2019 16:27, Ajit Khaparde wrote: > On Wed, Oct 30, 2019 at 12:43 AM David Marchand <david.march...@redhat.com> > wrote: > >> Hello Ajit, Kevin, >> >> On Wed, Oct 2, 2019 at 3:29 AM Ajit Khaparde <ajit.khapa...@broadcom.com> >> wrote: >>> >>> On Tue, Oct 1, 2019 at 6:04 AM Kevin Traynor <ktray...@redhat.com> >> wrote: >>> >>>> If rc contains a non-zero return code from bnxt_hwrm_send_message(), >>>> HWRM_CHECK_RESULT_SILENT() will return. >>>> >>>> Just after that code, there is an 'if (!rc) {...} else {...}'. >>>> Coverity is complaining that this if else statement is dead code as >>>> rc will always be 0 if that code is reached. >>>> >>>> 4309 rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), >>>> BNXT_USE_CHIMP_MB); >>>> cond_const: Condition rc, taking false branch. >>>> Now the value of rc is equal to 0. >>>> 4310 HWRM_CHECK_RESULT_SILENT(); >>>> 4311 >>>> const: At condition rc, the value of rc must be equal to 0. >>>> dead_error_condition: The condition !rc must be true. >>>> 4312 if (!rc) { >>>> >>>> [snip] >>>> >>>> 4373 } else { >>>> CID 343450 (#1 of 1): Logically dead code >>>> (DEADCODE)dead_error_line: Execution cannot >>>> reach this statement: rc = 0;. >>>> 4374 rc = 0; >>>> 4375 } >>>> >>>> Coverity issue: 343450 >>>> Fixes: f8168ca0e690 ("net/bnxt: support thor controller") >>>> Cc: lance.richard...@broadcom.com >>>> Cc: sta...@dpdk.org >>>> >>>> Signed-off-by: Kevin Traynor <ktray...@redhat.com> >>>> >>> Acked-by: Ajit Khaparde <ajit.khapa...@broadcom.com> >> >> I can see a *really* close patch has been submitted the day after. >> http://patchwork.dpdk.org/patch/58352/ >> >> And merged after a v3: >> >> https://git.dpdk.org/dpdk/commit/?id=b4f74051165560aa81814433dea7e6eb0bdb32b9 >> >> So I suppose this patch can be dropped. >> >> Yes. That makes sense. > Thanks for checking. > > Thanks > Ajit >
Thanks for catching it David. >> >> -- >> David Marchand >> >