DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Liron Himi <lironh@marvell.com>
Cc: Amit Prakash Shukla <amitprakashs@marvell.com>,
	Zyta Szpak <zr@semihalf.com>,  "dev@dpdk.org" <dev@dpdk.org>,
	Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [PATCH] net/mvneta: compilation fix for GCC-12
Date: Fri, 16 Sep 2022 20:26:10 +0530	[thread overview]
Message-ID: <CALBAE1NQ4oT=C0N5pw_QV8CG7rtNjzTVSNJiaAN6wEOa+xTs_g@mail.gmail.com> (raw)
In-Reply-To: <PH0PR18MB4473FB83DA4848386C10B8AEC67B9@PH0PR18MB4473.namprd18.prod.outlook.com>

On Thu, Sep 1, 2022 at 2:06 PM Liron Himi <lironh@marvell.com> wrote:
>
> Acked-by: Liron Himi <lironh@marvell.com>

Applied to dpdk-next-net-mrvl/for-next-net. Thanks



>
> -----Original Message-----
> From: Amit Prakash Shukla <amitprakashs@marvell.com>
> Sent: Thursday, 1 September 2022 11:31
> To: Zyta Szpak <zr@semihalf.com>; Liron Himi <lironh@marvell.com>
> Cc: dev@dpdk.org; Jerin Jacob Kollanukkaran <jerinj@marvell.com>; stable@dpdk.org; Amit Prakash Shukla <amitprakashs@marvell.com>
> 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 <amitprakashs@marvell.com>
> ---
>  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
>

      reply	other threads:[~2022-09-16 14:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-01  8:31 Amit Prakash Shukla
2022-09-01  8:36 ` Liron Himi
2022-09-16 14:56   ` Jerin Jacob [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALBAE1NQ4oT=C0N5pw_QV8CG7rtNjzTVSNJiaAN6wEOa+xTs_g@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=amitprakashs@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=lironh@marvell.com \
    --cc=stable@dpdk.org \
    --cc=zr@semihalf.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).