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 F1649A00C2; Fri, 17 Jun 2022 14:03:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9C30E40DDD; Fri, 17 Jun 2022 14:03:57 +0200 (CEST) Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) by mails.dpdk.org (Postfix) with ESMTP id C54FE40698; Fri, 17 Jun 2022 14:03:56 +0200 (CEST) Received: by mail-qv1-f41.google.com with SMTP id c1so5721245qvi.11; Fri, 17 Jun 2022 05:03:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=qXBI2z9nr5o7JfMeyfo/LY0FsTFbBD/u08j+BxJ+M9M=; b=oJhzyuhq/ppNZBEV4RTmkURwqL1EViNKe8e41kDAg7ypHvz8QhWtbQkQDHj0UCt12H lLL7LOygRXUzo3EMqPnOPFd/vjElJPm/426V6V6mjiMWXVSXZvATz2wNSRrhAIOhI5dr V/SxXQdvNhLK7/dWN8sCA3ppvfwFcET/vAouOO2SI3duqwgAmV/Yg7m7WTfI1XTdqNCQ BKyDNDWU4RBPt4HxJ2voZ46AvGi7erFUINMAzJHzcP2R6L0q0eQJCmdWHaDrytmPwX2v nNu5CPWhot2i1jH6KFKbW4PZ6Qbkm2IM1Rv96BrtGN1TbCpStALIHjfQVegzESzfRNUl n6Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=qXBI2z9nr5o7JfMeyfo/LY0FsTFbBD/u08j+BxJ+M9M=; b=Q0GAOVVcGslNH9OixWIUozti4Hp9mzxsujTBI/9peix77SlaTbtiGD+h86QAO+fCja OVooEH235jOhpQ9OixCwuOmQ/f8hPGz5gc2SXhMDguTcPzQu2qes0BNWd4PHd7CMHgNd V8O+XlNzmj741Sx6H+4MmkyOXshauHwEhhAkUM3/c83g139z5279fMHjH6cniQ8KBK5q 31RVJkobJANdZzEoiP7PRzvZMc1LdKCB4CikzhIifPTZ3AaM0D/rXVx5a5kGI3oL59jy EHQpMSPiivN5oP9Lr2anslPgZvNz8sF2d2rnY0RgoFVheWtd0+Ons2eyQvIruVrnYuU6 dc3g== X-Gm-Message-State: AJIora+TwTpJ0erHcd5g3TTQ9X9ZQAdNp4CqJlC4+FYWi8ftyz4EPFQh Rn6QDzpj1SL5xCR50MuXr8E7LhQ8TprhyxzjYtiFlWzc X-Google-Smtp-Source: AGRyM1uqZxE9XTuwwil8E36ZpMEGH5d/CRTLOk03W6U3fq3U3ytSSSZmQTKq6PtRVj1KJal9mLqm25Yy2VYcN6N0LSY= X-Received: by 2002:a05:622a:15d3:b0:304:ef40:9477 with SMTP id d19-20020a05622a15d300b00304ef409477mr7938639qty.502.1655467435996; Fri, 17 Jun 2022 05:03:55 -0700 (PDT) MIME-Version: 1.0 References: <20220616170211.2550199-1-ferruh.yigit@xilinx.com> In-Reply-To: <20220616170211.2550199-1-ferruh.yigit@xilinx.com> From: Jerin Jacob Date: Fri, 17 Jun 2022 17:33:30 +0530 Message-ID: Subject: Re: [PATCH] net/qede: fix build with GCC 13 To: Ferruh Yigit Cc: Rasesh Mody , Devendra Singh Rawat , Igor Russkikh , dpdk-dev , Jerin Jacob Kollanukkaran , dpdk stable Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Thu, Jun 16, 2022 at 10:32 PM Ferruh Yigit wro= te: > > Reproduced with "gcc (GCC) 13.0.0 20220616 (experimental)" > > Build error: > In file included from ../drivers/net/qede/qede_debug.c:9: > ../drivers/net/qede/qede_debug.c: In function =E2=80=98qed_grc_dump_addr_= range=E2=80=99: > ../drivers/net/qede/base/ecore.h:95:17: > warning: overflow in conversion from =E2=80=98int=E2=80=99 to =E2= =80=98u8=E2=80=99 > {aka =E2=80=98unsigned char=E2=80=99} changes value from =E2=80= =98(int)vf_id << 8 | 128=E2=80=99 > to =E2=80=98128=E2=80=99 [-Woverflow] > 95 | ((_value & _name##_MASK) << _name##_SHIFT) > | ^ > ../drivers/net/qede/qede_debug.c:1907:31: > note: in expansion of macro =E2=80=98FIELD_VALUE=E2=80=99 > 1907 | fid =3D FIELD_VALUE(PXP_PRETEND_CONCRETE_FID_VFVALID, 1) > | ^~~~~~~~~~~ > > To prevent overflow converting 'fib' to uint16_t, > while updating it also updated 'vf_id' to 16 bit too. > > Fixes: ec55c118792b ("net/qede: add infrastructure for debug data collect= ion") > Cc: stable@dpdk.org > > Signed-off-by: Ferruh Yigit > --- > Cc: rmody@marvell.com Please Ack this patch. > --- > drivers/net/qede/qede_debug.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/qede/qede_debug.c b/drivers/net/qede/qede_debug.= c > index 9383a6d67714..18f2d988fb88 100644 > --- a/drivers/net/qede/qede_debug.c > +++ b/drivers/net/qede/qede_debug.c > @@ -1809,7 +1809,8 @@ static u32 qed_grc_dump_addr_range(struct ecore_hwf= n *p_hwfn, > u8 split_id) > { > struct dbg_tools_data *dev_data =3D &p_hwfn->dbg_info; > - u8 port_id =3D 0, pf_id =3D 0, vf_id =3D 0, fid =3D 0; > + u8 port_id =3D 0, pf_id =3D 0; > + u16 vf_id =3D 0, fid =3D 0; > bool read_using_dmae =3D false; > u32 thresh; > > -- > 2.27.0 >