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 8924DA00C3 for ; Fri, 16 Sep 2022 16:56:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 80F8D40DFD; Fri, 16 Sep 2022 16:56:39 +0200 (CEST) Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) by mails.dpdk.org (Postfix) with ESMTP id 3C8C340156; Fri, 16 Sep 2022 16:56:37 +0200 (CEST) Received: by mail-qk1-f179.google.com with SMTP id u28so12930898qku.2; Fri, 16 Sep 2022 07:56:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=oO6zvgcf57cN+e7F0DykRPxzeA6pg5HH4bFVfWjoN6o=; b=j8gZ8bmxC7N+JN5RA7vx6F1lMVdDv+Vm5d5tyRTLLBGOzft+Y3wPtlEEaGMi+AlYeR /IIwvLyYyZv60OvLJ4e1K1UUyzWt7Od91vDRWfzon3ZUg8nbN5DhBJH1Rx/dD2UtMV6f SBO5F+rYQoLpw8qwyonzFEWtEG4cNTYI9JFSwATIazYM4tdBGTdF+jYAeHkT0DWYrxfy mBMgxOTgvsURVjX4e6WUsKcvk1+jUFEVdwyqrUEFwx9fogbgWuVatHvzqEQWC2jbCW2N XqFhOAqbiMnlhpV+bcVNGJs8o0eimDKiZIz3qlOQHoXpkartOEyIPit5l02D6fwOb6N1 vshQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=oO6zvgcf57cN+e7F0DykRPxzeA6pg5HH4bFVfWjoN6o=; b=Ocp/KL6DRjBCRXa00sIEzysZ2hYC9SqrwVf6DBuDcQM7Xa4rbSxcvo5ggeLy6RMXiL PtyHZNO+/09Nw1YkCkk9/dD07Ea/J2UvDff+820UDCejJclnPVgVEo4rlcm8RFfeYFru J+///bfehwosyeo7acBDNt1WQfRCKb2U8s9kduZHUGHoyNglFPiml/NBSh009o0MOtQP FWThL8vGB7FTsGrdrNd+iq8/cCq50+A02HMgaX/VPUMGrpj5By7noJnM3q4rfUwuda2x l0R8TaJFbLAhZsX+AzSIGhcTwY1dsbi/lYXOUKJpyVNczMQ2N/RXi681ksk5o8lqDHYh 4YUA== X-Gm-Message-State: ACrzQf2pTYFlpq15avcLTH+J+S2zf9AXrMlgfjDegn+TOl5+dQDR8+Ev r4pAMLqZZWJVaLBABmsV3VeFnnWjnh+nYGl8fxs= X-Google-Smtp-Source: AMsMyM5sfdoWTvv6muYwpxcboSgboLquMYzng5Lky1N00d0kFDo9K7K+lkd1QqM+0q50e2RNzSFjl6eQzVXhEdyutRA= X-Received: by 2002:a37:9ad5:0:b0:6cd:ef68:19a9 with SMTP id c204-20020a379ad5000000b006cdef6819a9mr4271372qke.22.1663340196574; Fri, 16 Sep 2022 07:56:36 -0700 (PDT) MIME-Version: 1.0 References: <20220901083118.3074981-1-amitprakashs@marvell.com> In-Reply-To: From: Jerin Jacob Date: Fri, 16 Sep 2022 20:26:10 +0530 Message-ID: Subject: Re: [PATCH] net/mvneta: compilation fix for GCC-12 To: Liron Himi Cc: Amit Prakash Shukla , Zyta Szpak , "dev@dpdk.org" , Jerin Jacob Kollanukkaran , "stable@dpdk.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Thu, Sep 1, 2022 at 2:06 PM Liron Himi wrote: > > Acked-by: Liron Himi Applied to dpdk-next-net-mrvl/for-next-net. Thanks > > -----Original Message----- > From: Amit Prakash Shukla > Sent: Thursday, 1 September 2022 11:31 > To: Zyta Szpak ; Liron Himi > Cc: dev@dpdk.org; Jerin Jacob Kollanukkaran ; stable@dpdk.org; Amit Prakash Shukla > Subject: [PATCH] net/mvneta: compilation fix for GCC-12 > > ./drivers/net/mvneta/mvneta_rxtx.c:89:42: > error: 'mbufs' may be used uninitialized [-Werror=maybe-uninitialized] > 89 | MVNETA_SET_COOKIE_HIGH_ADDR(mbufs[0]); > | ^ > ../drivers/net/mvneta/mvneta_rxtx.c:77:26: note: 'mbufs' declared here > 77 | struct rte_mbuf *mbufs[MRVL_NETA_BUF_RELEASE_BURST_SIZE_MAX]; > | ^~~~~ > > Fixes: ce7ea764597e ("net/mvneta: support Rx/Tx") > Cc: stable@dpdk.org > > Signed-off-by: Amit Prakash Shukla > --- > drivers/net/mvneta/mvneta_rxtx.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/net/mvneta/mvneta_rxtx.c b/drivers/net/mvneta/mvneta_rxtx.c > index 6e4a7896b4..952e982275 100644 > --- a/drivers/net/mvneta/mvneta_rxtx.c > +++ b/drivers/net/mvneta/mvneta_rxtx.c > @@ -79,6 +79,10 @@ mvneta_buffs_refill(struct mvneta_priv *priv, struct mvneta_rxq *rxq, u16 *num) > int i, ret; > uint16_t nb_desc = *num; > > + /* To prevent GCC-12 warning. */ > + if (unlikely(nb_desc == 0)) > + return -1; > + > ret = rte_pktmbuf_alloc_bulk(rxq->mp, mbufs, nb_desc); > if (ret) { > MVNETA_LOG(ERR, "Failed to allocate %u mbufs.", nb_desc); > -- > 2.25.1 >