From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 58E1B454EF; Tue, 25 Jun 2024 13:22:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5158C42F35; Tue, 25 Jun 2024 13:17:58 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by mails.dpdk.org (Postfix) with ESMTP id EE0A642D7D for ; Tue, 25 Jun 2024 13:16:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719314213; x=1750850213; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Z1nTrTkGZfhJ7MHxRQ/fAOduTAnM1BgCNfBXL3AtSEU=; b=H9DFi3Xp7CJEfmbZmwHR3PbmX6huT6pskRwzLm5OaJuV17GZK2t1DHEQ U+UmE5doN4K11XssdmpOJiKSavoCBGzv5M1XwuO58Cq2pjolU/Wa8Jg2c mPXRef3S1btTWozD2adi4zG0C+TEbeIvAsuoS6SoEoB/zbHh8KQ0G5Cqw /dT9sBWH5fhwJsm0e8G3VcLt4PxsBNUbRUFqqbHOJgG2fXS0tbG1cUuzX rSXbYFqrkqbXgyWle3Z/PaESd/Nfj5Tu4VWrlhwVnfGal+tV3OZ66MX/9 Y0bMx24UuwsGMRi65I3NUxBkVfTMH589dD3wHZJqm3oqMcU9tSLoaPhk6 A==; X-CSE-ConnectionGUID: tddiUCTySNSD4izjeHdruw== X-CSE-MsgGUID: rb5wRcp+S7uLmR6XEa/Ukw== X-IronPort-AV: E=McAfee;i="6700,10204,11113"; a="16080257" X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="16080257" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2024 04:16:28 -0700 X-CSE-ConnectionGUID: 4x1arEpjTDO2eJya2n0tqg== X-CSE-MsgGUID: zR3R1pCETLWjm9zsvs3LHw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,263,1712646000"; d="scan'208";a="43719224" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 25 Jun 2024 04:16:28 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Yochai Hagvi , bruce.richardson@intel.com, ian.stokes@intel.com Subject: [PATCH v3 054/129] net/ice/base: change tmr_idx to u32 Date: Tue, 25 Jun 2024 12:12:59 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Yochai Hagvi When converting to source timer command value, tmr_idx is left shifted by 8 (CPK_SRC_SEL), which overflows the 8-bit data type. Change to 32-bit. Signed-off-by: Yochai Hagvi Signed-off-by: Ian Stokes --- drivers/net/ice/base/ice_ptp_hw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ice/base/ice_ptp_hw.c b/drivers/net/ice/base/ice_ptp_hw.c index 7fae6c7a93..9a60b5daeb 100644 --- a/drivers/net/ice/base/ice_ptp_hw.c +++ b/drivers/net/ice/base/ice_ptp_hw.c @@ -797,8 +797,7 @@ static int ice_init_cgu_e82x(struct ice_hw *hw) static u32 ice_ptp_tmr_cmd_to_src_reg(struct ice_hw *hw, enum ice_ptp_tmr_cmd cmd) { - u32 cmd_val; - u8 tmr_idx; + u32 cmd_val, tmr_idx; switch (cmd) { case ICE_PTP_INIT_TIME: -- 2.43.0