From patchwork Fri Jan 26 13:05:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jedrzej Jagielski X-Patchwork-Id: 13532555 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 2FFA11B7F0 for ; Fri, 26 Jan 2024 13:14:35 +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=1706274877; cv=none; b=pf3SfLkVDbad0C7hHpljxpA7fUtV6TQ7wSTptcmYubCP6P3RQyRudAYnlvfEaWKooyfMCtyfequV/IyW9D/eOMM8AKzC8wTsuk6R+64hBjFY0OLqaxcrODF/QWYiwW5q8GshNZAyuVXp12grR68aARkhGaOkqGISCrrxqJ6GQw4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706274877; c=relaxed/simple; bh=XlACIq+pke7jyMx/6tHjCy/1Ha8isa8uojZ683uc0lk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YmEiUbx2w8q2zu5kCEREPiJPnNFJUoBf7YV+RyQyBiuxBFGI3LEJsKVKYraBcPd+678mB0e++82IzDLOLeNS9ryn384WMzWj6x4kuMA+PiIVAcc0q7Pf4JcZ3VFHTXzV7e51ZQ5uh7STtmCyWmnlw0zxuSwVccu/Xi38wDr1Oeg= 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=bw2Ynl55; 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="bw2Ynl55" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706274877; x=1737810877; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XlACIq+pke7jyMx/6tHjCy/1Ha8isa8uojZ683uc0lk=; b=bw2Ynl55CU/xfuEs59b4LmR/r5rvncAWsHo3a3XLl6rTjhFUOnkYDy23 zKHxOTqBK83IOcBHt7hr+lFfx4YlNpFGZcrxpE7ebaqmzj1K9cYWBrlwK pqussiFo4FQ1mbF7POaBkVvnGmXD1J8oRdsnUnnk0SOB9oABWpOQQ9MTC 0I3MeZmCSq9U0V8iiutNigImjGSUuhzNDSwUO17718yVvchP7w07vzNJV mThSCzGTAB9Dl1IBHhDf4GDA5EHSJ3qJe+ZKmOHV8/ca/b2chB1ej2JgV Mw0OMgr/NSePJXsP4BNj7yzIc6QDmPuZ/NY96ab68WTUE3jCeDucp8VQb g==; X-IronPort-AV: E=McAfee;i="6600,9927,10964"; a="15823960" X-IronPort-AV: E=Sophos;i="6.05,216,1701158400"; d="scan'208";a="15823960" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2024 05:14:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,216,1701158400"; d="scan'208";a="2661993" Received: from os-delivery.igk.intel.com ([10.102.18.218]) by fmviesa003.fm.intel.com with ESMTP; 26 Jan 2024 05:14:34 -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 Subject: [PATCH iwl-next v4 3/3] ixgbe: Clarify the values of the returning status Date: Fri, 26 Jan 2024 14:05:03 +0100 Message-Id: <20240126130503.14197-3-jedrzej.jagielski@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240126130503.14197-1-jedrzej.jagielski@intel.com> References: <20240126130503.14197-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/ Signed-off-by: Jedrzej Jagielski Reviewed-by: Simon Horman --- 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,