[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190618.104436.269466043868578046.davem@davemloft.net>
Date: Tue, 18 Jun 2019 10:44:36 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: arnd@...db.de
Cc: aelior@...vell.com, GR-everest-linux-l2@...vell.com,
ariel.elior@...vell.com, michal.kalderon@...vell.com,
dan.carpenter@...cle.com, dbolotin@...vell.com,
tomer.tayar@...ium.com, skalluru@...vell.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] qed: Fix -Wmaybe-uninitialized false positive
From: Arnd Bergmann <arnd@...db.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@...db.de>
Applied to net-next.
Powered by blists - more mailing lists