From patchwork Wed Jan 31 11:04:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jedrzej Jagielski X-Patchwork-Id: 13539282 X-Patchwork-Delegate: kuba@kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DBC436A320 for ; Wed, 31 Jan 2024 11:14:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706699646; cv=none; b=fZ/i6+/0eAAI+wso+Fm2QkHfg3oxpgScpCdEqtJE1V67gI5M50FDg/PbY5Bu43fLgKPgFCvHQUCmpy1nmHAZMmVDtjbMsuehb5/0d06P6aAOvZqbkoRKPhCFu4E1fzKWtjgSL79khnplQDzine9MoLpG/+b72GbGx2fc2GbVfM8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706699646; c=relaxed/simple; bh=dauvLb8+7cSSPLtnw8Zp9gQ1/HEUQuKf9z7sVWNF1eg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ujnrAurOhHMPUZiZ2DRJQbhP+q/WSPYopXAFRsXBPjFJlCh1+hWCHQg5TxTezo5m41LBRMD+7nx2hzFl5e4Dfm+Dys/2jnCl9vGR8EFEYy/KZhMWOB8beAzyebwLl3SHR+arQkyWrmAp/bgBk+2I8ooyQ8JkurWWNnXlQVf0/Kk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=jVqxRNiF; arc=none smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jVqxRNiF" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706699644; x=1738235644; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dauvLb8+7cSSPLtnw8Zp9gQ1/HEUQuKf9z7sVWNF1eg=; b=jVqxRNiFvcSRITjxysjYLmSSBIXOWobbWkNd6+quwWIYLo8qvDtnqipt KkZRptRyJa3+EWIjEgKOUTTBJUqdJvC29uMKSICjQQiOgJzQ0qkh4qB9/ HWZckcS9PRfgevGaSsrDPy4XEBWcJxFlOhDQrVQ5l+JyMICjcHFgsnKNC TpDp+1oKTDdO46T+ju1GrKKE4kuQmObo2GPO64jWXjm9BtLgXgTOEbzG+ tHgRPaUTuAbM5otm+5TW2kOemixYGqAAsquQFCSnRduIAYNBrwzu3xp5f MhcV38bc9V9ZiTzrulvKCJzm3YTY/CVCCF5YHuqmSxrcubGFBeN96znnR Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="16949593" X-IronPort-AV: E=Sophos;i="6.05,231,1701158400"; d="scan'208";a="16949593" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2024 03:14:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="878762850" X-IronPort-AV: E=Sophos;i="6.05,231,1701158400"; d="scan'208";a="878762850" Received: from os-delivery.igk.intel.com ([10.102.18.218]) by FMSMGA003.fm.intel.com with ESMTP; 31 Jan 2024 03:14:01 -0800 From: Jedrzej Jagielski To: intel-wired-lan@lists.osuosl.org Cc: anthony.l.nguyen@intel.com, netdev@vger.kernel.org, Jedrzej Jagielski , kernel test robot , Dan Carpenter , Simon Horman Subject: [PATCH iwl-next v5 3/3] ixgbe: Clarify the values of the returning status Date: Wed, 31 Jan 2024 12:04:19 +0100 Message-Id: <20240131110419.29161-3-jedrzej.jagielski@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240131110419.29161-1-jedrzej.jagielski@intel.com> References: <20240131110419.29161-1-jedrzej.jagielski@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Converting s32 functions to regular int in the previous patch of the series caused triggering smatch warnings about missing error code. New smatch warnings: drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c:2884 ixgbe_get_lcd_t_x550em() warn: missing error code? 'status' drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c:3130 ixgbe_enter_lplu_t_x550em() warn: missing error code? 'status' Old smatch warnings: drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c:2890 ixgbe_get_lcd_t_x550em() warn: missing error code? 'status' Fix it by clearly stating returning error code as 0. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202401041701.6QKTsZmx-lkp@intel.com/ Reviewed-by: Simon Horman Signed-off-by: Jedrzej Jagielski Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) --- drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c index efce4b231493..bee1d2f554d3 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c @@ -2883,17 +2883,17 @@ static int ixgbe_get_lcd_t_x550em(struct ixgbe_hw *hw, /* If link partner advertised 1G, return 1G */ if (an_lp_status & IXGBE_AUTO_NEG_LP_1000BASE_CAP) { *lcd_speed = IXGBE_LINK_SPEED_1GB_FULL; - return status; + return 0; } /* If 10G disabled for LPLU via NVM D10GMP, then return no valid LCD */ if ((hw->bus.lan_id && (word & NVM_INIT_CTRL_3_D10GMP_PORT1)) || (word & NVM_INIT_CTRL_3_D10GMP_PORT0)) - return status; + return 0; /* Link partner not capable of lower speeds, return 10G */ *lcd_speed = IXGBE_LINK_SPEED_10GB_FULL; - return status; + return 0; } /** @@ -3129,7 +3129,7 @@ static int ixgbe_enter_lplu_t_x550em(struct ixgbe_hw *hw) (lcd_speed == IXGBE_LINK_SPEED_1GB_FULL)) || ((speed == IXGBE_MDIO_AUTO_NEG_VENDOR_STATUS_10GB) && (lcd_speed == IXGBE_LINK_SPEED_10GB_FULL))) - return status; + return 0; /* Clear AN completed indication */ status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_VENDOR_TX_ALARM,