Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3672732pxv; Mon, 26 Jul 2021 09:08:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5QlpZYGAubfOY/k88lsu5oFaOejPie2EmEJHBdlOlCOtHl1soRMO3ccJ3FgybTIl9gNga X-Received: by 2002:aa7:d593:: with SMTP id r19mr4561261edq.372.1627315693242; Mon, 26 Jul 2021 09:08:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627315693; cv=none; d=google.com; s=arc-20160816; b=XfxhvuujUwSFXlFktJ3P5XrLyBDsVz7NxhPtPTTZXZRaGY23D1QoDHwZWsFNpg0+J6 zMG1C1DUxvs0V39mNUtZ/wlL4F4jkpZKa6CFZ4AGbcVCaID/HuP7CSFiGHdaot/XF7YH +/HmGNXa+Zd2iwO4UjlPOhP6W0PsPzO4OPV+rS3NReK45tYADRY/3LlUo5OgrI3IaBV4 br+YEyaDjvQxnh70ontQ3r8OkN0xffqdrKhUBZhfcDsAj4boD03aBybCZpZKi5QFzNEa QK1fNfTH8GEREsHCvpy7zisWW4sH436db1HL+Sm2Xf7ser/vckLBXTYJY00bypqFutX0 WeFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/xH67vKq8kWYxOyznoCdPKYnkqga7q6zj1dDtmyIxa0=; b=0yj16DuoK6uOjJlpQxPmd47C5AfzcEoDUqWmF1ciNHnNm8DNxZ6PRmELS7pPkxzK5u I9QSvUsd/k9wGnsZRHA0m/bsUaJ1i4pFzn+UHKhoewCG/rYJbRpqZkwrRen1XF7raoe/ KjhjQErnM3yxUdxa8IcGIRzyX2nYnL8jcKl2g63kcH+8YZV1A7rUJFF/xa8sX/o18mfA 76pz6EfP5dwV1Hsy8iPjEu8o06m3U44aisNwfknSElMuyql+9kLPcatP2n4SKbIDQUWj UPBfWCpwE+RVD4jU4+fYLuXWtBPptyl53/S7CXw6NvkbVSWzPyJTtiWBA9kOLor6RQ9v UBhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nlkR90xN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw10si297872ejc.360.2021.07.26.09.07.49; Mon, 26 Jul 2021 09:08:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nlkR90xN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236595AbhGZPW4 (ORCPT + 99 others); Mon, 26 Jul 2021 11:22:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:52972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237436AbhGZPPp (ORCPT ); Mon, 26 Jul 2021 11:15:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A26E56104F; Mon, 26 Jul 2021 15:55:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627314926; bh=qomkJXXkb15tBCd3qCUIScd324EyJQo2c8wzHMUPzQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nlkR90xN2+a961cSpz9XXoLhWAJ3SXu8Bs0VwlzEtcuB6wOtXHDumr8v1RF5yW2a6 CU5f8PzxZWDq4tRvN03fwRm0I7xq/3NhraVgfXw7UuOw0VLyxNH4ahZOs+Jrrs7yK1 1s2zXqdedWc+BrFTwARIBBComnOUbBMbMRgZyvBo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tom Rix , Dvora Fuxbrumer , Tony Nguyen , Sasha Levin Subject: [PATCH 5.4 003/108] igc: change default return of igc_read_phy_reg() Date: Mon, 26 Jul 2021 17:38:04 +0200 Message-Id: <20210726153831.806755020@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210726153831.696295003@linuxfoundation.org> References: <20210726153831.696295003@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tom Rix [ Upstream commit 05682a0a61b6cbecd97a0f37f743b2cbfd516977 ] Static analysis reports this problem igc_main.c:4944:20: warning: The left operand of '&' is a garbage value if (!(phy_data & SR_1000T_REMOTE_RX_STATUS) && ~~~~~~~~ ^ phy_data is set by the call to igc_read_phy_reg() only if there is a read_reg() op, else it is unset and a 0 is returned. Change the return to -EOPNOTSUPP. Fixes: 208983f099d9 ("igc: Add watchdog") Signed-off-by: Tom Rix Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/igc/igc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h index 7e16345d836e..aec998c82b69 100644 --- a/drivers/net/ethernet/intel/igc/igc.h +++ b/drivers/net/ethernet/intel/igc/igc.h @@ -504,7 +504,7 @@ static inline s32 igc_read_phy_reg(struct igc_hw *hw, u32 offset, u16 *data) if (hw->phy.ops.read_reg) return hw->phy.ops.read_reg(hw, offset, data); - return 0; + return -EOPNOTSUPP; } /* forward declaration */ -- 2.30.2