DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>, <dev@dpdk.org>
Subject: Re: [PATCH] net/cxgbe: rework mailbox access to fix gcc12 -Wdangling-pointer
Date: Thu, 20 Jan 2022 11:25:02 +0000	[thread overview]
Message-ID: <03f0fde7-24af-eb6e-9500-b130def07f42@intel.com> (raw)
In-Reply-To: <2fb9036973f109fb6d53389b176b15ee0d13030b.1642627535.git.rahul.lakkireddy@chelsio.com>

On 1/19/2022 9:56 PM, Rahul Lakkireddy wrote:
> Rework mailbox access serialization to dynamically allocate and
> free mbox entry. Also remove unnecessary temp memory and macros.
> 
> Observed with: gcc-12.0 (GCC) 12.0.1 20220118 (experimental)
> 
> In file included from ../lib/eal/linux/include/rte_os.h:14,
>                   from ../lib/eal/include/rte_common.h:28,
>                   from ../lib/eal/include/rte_log.h:25,
>                   from ../lib/ethdev/rte_ethdev.h:164,
>                   from ../lib/ethdev/ethdev_driver.h:18,
>                   from ../drivers/net/cxgbe/base/t4vf_hw.c:6:
> In function ‘t4_os_atomic_add_tail’,
>      inlined from ‘t4vf_wr_mbox_core’ at ../drivers/net/cxgbe/base/t4vf_hw.c:115:2:
> ../drivers/net/cxgbe/base/adapter.h:742:9: warning: storing the address of local variable ‘entry’ in ‘((struct mbox_list *)adapter)[96].tqh_last’ [-Wdangling-pointer=]
>    742 |         TAILQ_INSERT_TAIL(head, entry, next);
>        |         ^~~~~~~~~~~~~~~~~
> ../drivers/net/cxgbe/base/t4vf_hw.c: In function ‘t4vf_wr_mbox_core’:
> ../drivers/net/cxgbe/base/t4vf_hw.c:86:27: note: ‘entry’ declared here
>     86 |         struct mbox_entry entry;
>        |                           ^~~~~
> ../drivers/net/cxgbe/base/t4vf_hw.c:86:27: note: ‘adapter’ declared here
> 
> Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>

Thanks for the update.

Applied to dpdk-next-net/main, thanks.


      reply	other threads:[~2022-01-20 11:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-19 21:56 Rahul Lakkireddy
2022-01-20 11:25 ` Ferruh Yigit [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=03f0fde7-24af-eb6e-9500-b130def07f42@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=rahul.lakkireddy@chelsio.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).