Message ID | 20210708224950.39452-1-ajit.khaparde@broadcom.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Ajit Khaparde |
Headers | show |
Series | net/bnxt: fix build failure | expand |
Context | Check | Description |
---|---|---|
ci/Intel-compilation | warning | apply issues |
ci/github-robot | success | github build: passed |
ci/iol-testing | warning | apply patch failure |
ci/checkpatch | success | coding style OK |
09/07/2021 00:49, Ajit Khaparde: > Fix build failures because of uninitialized variable usage. You should add the error log here. You don't mention the condition of failure. Nobody reproduced a failure so far. > Fixes: 05b405d58148 ("net/bnxt: add dpool allocator for EM allocation") > > Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com> > Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
On Fri, Jul 9, 2021 at 1:48 AM Thomas Monjalon <thomas@monjalon.net> wrote: > 09/07/2021 00:49, Ajit Khaparde: > > Fix build failures because of uninitialized variable usage. > > You should add the error log here. > You don't mention the condition of failure. > Nobody reproduced a failure so far. > Sure. I did not notice it on my Fedora34 either. The build error was reported in the dpdk-test-report [1]. Let me resend a v2 with the information. [1] http://mails.dpdk.org/archives/test-report/2021-July/203186.html > > Fixes: 05b405d58148 ("net/bnxt: add dpool allocator for EM allocation") > > > > Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com> > > Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com> > > > >
On Fri, Jul 9, 2021 at 4:48 AM Thomas Monjalon <thomas@monjalon.net> wrote: > > 09/07/2021 00:49, Ajit Khaparde: > > Fix build failures because of uninitialized variable usage. > > You should add the error log here. > You don't mention the condition of failure. > Nobody reproduced a failure so far. Hi Thomas, This addresses FC34 (which I think is using gcc11) build failures, there is an example here: http://mails.dpdk.org/archives/test-report/2021-July/203186.html Regards, Lance
diff --git a/drivers/net/bnxt/tf_core/dpool.c b/drivers/net/bnxt/tf_core/dpool.c index 0dae42b1bb..145efa486f 100644 --- a/drivers/net/bnxt/tf_core/dpool.c +++ b/drivers/net/bnxt/tf_core/dpool.c @@ -125,6 +125,7 @@ int dpool_defrag(struct dpool *dpool, largest_free_size = 0; largest_free_index = 0; count = 0; + index = 0; for (i = 0; i < dpool->size; i++) { if (DP_IS_FREE(dpool->entry[i].flags)) { diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c index acd9f996e8..871dbad0fe 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c +++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c @@ -2249,7 +2249,7 @@ ulp_mapper_index_tbl_process(struct bnxt_ulp_mapper_parms *parms, struct tf_free_tbl_entry_parms free_parms = { 0 }; uint32_t tbl_scope_id; struct tf *tfp; - struct bnxt_ulp_glb_resource_info glb_res; + struct bnxt_ulp_glb_resource_info glb_res = { 0 }; uint16_t bit_size; bool alloc = false; bool write = false;