From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A735C31E5B for ; Tue, 18 Jun 2019 17:44:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4BBC020863 for ; Tue, 18 Jun 2019 17:44:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730131AbfFRRoh (ORCPT ); Tue, 18 Jun 2019 13:44:37 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:50840 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729491AbfFRRoh (ORCPT ); Tue, 18 Jun 2019 13:44:37 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 6C89515104411; Tue, 18 Jun 2019 10:44:36 -0700 (PDT) Date: Tue, 18 Jun 2019 10:44:36 -0700 (PDT) Message-Id: <20190618.104436.269466043868578046.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 From: David Miller In-Reply-To: <20190617130504.1906523-1-arnd@arndb.de> References: <20190617130504.1906523-1-arnd@arndb.de> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 18 Jun 2019 10:44:36 -0700 (PDT) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann 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 Applied to net-next.