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 BF8094404F; Wed, 12 Jun 2024 17:15:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 05B8D42E9D; Wed, 12 Jun 2024 17:05:24 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id A2B7D42E61 for ; Wed, 12 Jun 2024 17:05:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718204713; x=1749740713; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LJZ7+BRvHs19WhH9X3mtiLwMcoyVM170PZzu38VOAK4=; b=mfjNUOdEFGDIL1ZDp9V2ZGB91Wp7xBFsTWgAwM4HOYgikjc9oh+59qhx OV4iuoSjwW9aKijbylzd/e5Y84Fr4oHTnSWpaS/dwLn5AUvTXzq4P/E7L dUVkH7AGKVTKtZrkgO4O/hvGj59dmQrQ8uI5PwApCA4cDmjO66Rlt37lM LF6iGGfvOUQeNF7T2HJ0Bg8Ssdk+w9KG6zmAo6X3mG6J5fd7zsP5g3gll NDWrDxbvbCFVSR1gGicEVzpbrkmOpvf0F+e5KaO7+awagXhwKUN5qlCn2 V9Mm7Mcumfm52Dit8gFVjaEIHMdsBSGmcU1JiTpFQZfDjBwPUR4hSWa2m w==; X-CSE-ConnectionGUID: yT3I1m0dTMSD+ulw8lkYwA== X-CSE-MsgGUID: TiC0/wJyT26U576stiw1Bg== X-IronPort-AV: E=McAfee;i="6700,10204,11101"; a="32459605" X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="32459605" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2024 08:05:11 -0700 X-CSE-ConnectionGUID: vECMQ0TBSTiEoWlhVfbOtw== X-CSE-MsgGUID: fGlySfhMRmOrMewrsA6Jjg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,233,1712646000"; d="scan'208";a="39925475" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa009.jf.intel.com with ESMTP; 12 Jun 2024 08:05:10 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Ian Stokes , bruce.richardson@intel.com, Yochai Hagvi Subject: [PATCH v2 068/148] net/ice/base: change tmr_idx to u32 Date: Wed, 12 Jun 2024 16:01:02 +0100 Message-ID: <4396c169994dfd47182abaec7458dbf9e1564a88.1718204528.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: <20240430154014.1026-1-ian.stokes@intel.com> 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: Ian Stokes 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 62558ac761..31d6c7cf81 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