From: David Miller <davem@davemloft.net>
To: arnd@arndb.de
Cc: aelior@marvell.com, GR-everest-linux-l2@marvell.com,
ariel.elior@marvell.com, michal.kalderon@marvell.com,
dan.carpenter@oracle.com, dbolotin@marvell.com,
tomer.tayar@cavium.com, skalluru@marvell.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] qed: Fix -Wmaybe-uninitialized false positive
Date: Tue, 18 Jun 2019 10:44:36 -0700 (PDT) [thread overview]
Message-ID: <20190618.104436.269466043868578046.davem@davemloft.net> (raw)
In-Reply-To: <20190617130504.1906523-1-arnd@arndb.de>
From: Arnd Bergmann <arnd@arndb.de>
Date: Mon, 17 Jun 2019 15:04:49 +0200
> A previous attempt to shut up the uninitialized variable use
> warning was apparently insufficient. When CONFIG_PROFILE_ANNOTATED_BRANCHES
> is set, gcc-8 still warns, because the unlikely() check in DP_NOTICE()
> causes it to no longer track the state of all variables correctly:
>
> drivers/net/ethernet/qlogic/qed/qed_dev.c: In function 'qed_llh_set_ppfid_affinity':
> drivers/net/ethernet/qlogic/qed/qed_dev.c:798:47: error: 'abs_ppfid' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> addr = NIG_REG_PPF_TO_ENGINE_SEL + abs_ppfid * 0x4;
> ~~~~~~~~~~^~~~~
>
> This is not a nice workaround, but always initializing the output from
> qed_llh_abs_ppfid() at least shuts up the false positive reliably.
>
> Fixes: 79284adeb99e ("qed: Add llh ppfid interface and 100g support for offload protocols")
> Fixes: 8e2ea3ea9625 ("qed: Fix static checker warning")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied to net-next.
prev parent reply other threads:[~2019-06-18 17:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-17 13:04 [PATCH] qed: Fix -Wmaybe-uninitialized false positive Arnd Bergmann
2019-06-18 9:27 ` Michal Kalderon
2019-06-18 17:44 ` David Miller [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=20190618.104436.269466043868578046.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=GR-everest-linux-l2@marvell.com \
--cc=aelior@marvell.com \
--cc=ariel.elior@marvell.com \
--cc=arnd@arndb.de \
--cc=dan.carpenter@oracle.com \
--cc=dbolotin@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.kalderon@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=skalluru@marvell.com \
--cc=tomer.tayar@cavium.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