From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EDA69A0548; Fri, 9 Jul 2021 20:38:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BC73E416FB; Fri, 9 Jul 2021 20:38:56 +0200 (CEST) Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) by mails.dpdk.org (Postfix) with ESMTP id EAE10410FD for ; Fri, 9 Jul 2021 20:38:54 +0200 (CEST) Received: by mail-qk1-f171.google.com with SMTP id 14so10324442qkh.0 for ; Fri, 09 Jul 2021 11:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nqpd+Gfi2Z4h8Ech/klinxRotPyzE7rjCDn4jkm7Qpc=; b=PSuEzM4YyvF/GPJTY6sXLqTaT3o4GZ3o4pZEFt9tNETHurlTFAQA1IdBdI931w6N6W eVbGDv+VJHNBYx9Rp0PWSNou4CQPAlHQn9DH5iANuU56dI7YNGB0tDsMox1T4U53CBzS qRZym83VdljKBqJofXtQR5N3PkWCU6nB6JaS8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nqpd+Gfi2Z4h8Ech/klinxRotPyzE7rjCDn4jkm7Qpc=; b=sWIPoT9zl9Ue6cSqlz5hy9+r84L0VPf9pi6uxwWxs1gI86gbfI9Kg1OqlVdmK8C/6f nLqRvURTlVabcIgnjFGDQ+mH4RYcL8rar5NlOcEhnjcLc5NlvbRE3Ad4VhrDtWOQKzAA gU2MGqvOKKgAC9ceyZElbZDj2TicuC4mDGV+Nl99j/LIwhvFipGEGP62ZSZa3zv7GK1N 0N359dU120dE15BkLBz2BtvvvqCFPCWxvzG0We2suJCMOmxkDWgdC5LY59IfWTAfNnue 27ePrUHttHLWYmOrt1hmsFH1Fd3eZodLxdkwARFO/P+baeReHHHQC3KW6BFKHuRjauBV PxMw== X-Gm-Message-State: AOAM533fXzdQnORRqj+rUjfS92Y2m7i4V7aG5l1sXCIGoMDtEYYmsL3I 2NlVFxqSH6Mc7TJCLfW+CHWQKOaEHOhlNwK6MjMBgAyXi2cvZw== X-Google-Smtp-Source: ABdhPJwOpXHwzhj/Brk3DnZGG7vGDekA48X7cZ9Enm7y0tL9fYnHCsIp3+11anh+gbDg/IOPJvtydFJzFbYCGE10oDg= X-Received: by 2002:a05:620a:21c2:: with SMTP id h2mr14203317qka.333.1625855933999; Fri, 09 Jul 2021 11:38:53 -0700 (PDT) MIME-Version: 1.0 References: <20210709153725.87348-1-ajit.khaparde@broadcom.com> In-Reply-To: <20210709153725.87348-1-ajit.khaparde@broadcom.com> From: Ajit Khaparde Date: Fri, 9 Jul 2021 11:38:37 -0700 Message-ID: To: dpdk-dev Cc: Thomas Monjalon , Kishore Padmanabha Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="0000000000006cc71a05c6b515f7" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH v2] net/bnxt: fix build failure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" --0000000000006cc71a05c6b515f7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jul 9, 2021 at 8:37 AM Ajit Khaparde wrote: > Fix build failures because of uninitialized variables. > > ../drivers/net/bnxt/tf_ulp/ulp_mapper.c: In function > =E2=80=98ulp_mapper_index_tbl_process=E2=80=99: > ../drivers/net/bnxt/tf_ulp/ulp_mapper.c:2252:43: error: =E2=80=98*(unsign= ed int > *)((char *)&glb_res + offsetof(struct bnxt_ulp_glb_resource_info, > resource_func))=E2=80=99 may be used uninitialized in this function > [-Werror=3Dmaybe-uninitialized] > 2252 | struct bnxt_ulp_glb_resource_info glb_res; > | ^~~~~~~ > ../drivers/net/bnxt/tf_ulp/ulp_mapper.c:2252:43: error: > =E2=80=98glb_res.resource_type=E2=80=99 may be used uninitialized in this= function > [-Werror=3Dmaybe-uninitialized] > > ../drivers/net/bnxt/tf_core/dpool.c: In function =E2=80=98dpool_defrag=E2= =80=99: > ../drivers/net/bnxt/tf_core/dpool.c:95:18: error: =E2=80=98index=E2=80=99= may be used > uninitialized in this function [-Werror=3Dmaybe-uninitialized] > 95 | uint32_t index; > | ^~~~~ > > Fixes: 05b405d58148 ("net/bnxt: add dpool allocator for EM allocation") > > Signed-off-by: Kishore Padmanabha > Signed-off-by: Ajit Khaparde > --- > v1->v2: update commit log to show the build error encountered. > --- > Patch applied to dpdk-next-net-brcm for-next-net branch. Thanks > drivers/net/bnxt/tf_core/dpool.c | 1 + > drivers/net/bnxt/tf_ulp/ulp_mapper.c | 2 +- > 2 files changed, 2 insertions(+), 1 deletion(-) > > 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 =3D 0; > largest_free_index =3D 0; > count =3D 0; > + index =3D 0; > > for (i =3D 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 =3D { 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 =3D { 0 }; > uint16_t bit_size; > bool alloc =3D false; > bool write =3D false; > -- > 2.21.1 (Apple Git-122.3) > > --0000000000006cc71a05c6b515f7--