Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4043281ybi; Tue, 18 Jun 2019 10:45:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLX3SY0n86+vo9XvQEgS3kSPP21tN/BciIZ7ce0L+RdCnIdNZoCwj/z+yoZz5MyDkxXOJU X-Received: by 2002:a17:902:2e81:: with SMTP id r1mr115476144plb.0.1560879919283; Tue, 18 Jun 2019 10:45:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560879919; cv=none; d=google.com; s=arc-20160816; b=YLeaQrE5urHkPxLElMBombsD6K47tqCGdSGumvwAlD/MjD0EThTxjRFVPv2l4S1SuF P8RN/icivOilzhFm2oEUxsRU+EDlXZ5hix9X10A84rxwigzRNhXxPZ5BkfrVkTN+JO43 MrkuN+m5rsESEImgMV9TOufBubjETdT/RUVUuo0ThRcQFd7fQk/J2WokxMk74BBgO79N VKOPlqW2v9Apu5dDH5q7RSXk3cTbUImcocGJyqUL60/vTwj5UmqPLtYv50sRJnYSwX9P P9OSM+HviL5yRunEM1pG780aHwgDP+CoOU+WBA8GJg8d02T7XRMqENpJLK1hpL+J8BQN w4Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=fhMlIpfwm61yw5IyQeuMMG44Og891SHFM+7km9sp1jE=; b=yBMb/DUhPhFvJgXMneVbN0jKsbRWGhphHlsNYKjxi1tm9MZzNgs0Awv54sMg8SqwWL JRRgfT3YNhkOi/qEj1YEyHhYy27c/N1pooOKzEeNxX7jpDfMdtCRcV9kYwIqeztTLmC5 +gHRmooKdIsarOYRDn7JgGdCtSvaJ4MsPAYfOql5hcWRrPXflvmESoma0DPog8vZeP7R E2AG/XmCBSmsfsAhOez6Q8GKDPvJDmgkN2il3SOtIASEteeTYknWU9ir7L3HjBjXPQ7e dFjKkVZIktkxZT/uBiuttAUo36GODCKAI9ZG85EUGk0/pCbhJnry5JJPqxQKjnwK0nWx fRHw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w13si12943102plp.271.2019.06.18.10.45.03; Tue, 18 Jun 2019 10:45:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730134AbfFRRoh (ORCPT + 99 others); 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.