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 04D2045500; Wed, 26 Jun 2024 13:58:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C3466433A1; Wed, 26 Jun 2024 13:55:41 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mails.dpdk.org (Postfix) with ESMTP id 697C742E95 for ; Wed, 26 Jun 2024 13:43:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719402238; x=1750938238; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RI6jiEoF6TCBBHGIlcW2QFaukKhKYgZguAPgoVpabQ4=; b=dEsGKJiCYqfcswWoqAz+/Q5jZkcHpdN2Okh3Uov/e2NDCvZzeDp7o4qY /vqqN/ZJVlRFLNDCEV25usGX1RJxVuqGAvjQo2kGL62PCUbDfrIFDf22B wEUAJYwXYNkFamvdLeq3WHCViKtBBCuQs9jb33foMpm8N2ibZutxsI6nX 6BvAi8kGXtyq4OkRKRGYHo97gbi2Q5gnJxTp59NMTvNwW6+qr6txBE62k ne79Z6FzhOXWwzyF5w9nKwAAdREch6My+pGj7mFLVXHE5doVn3muZ89ZZ 9ZmiOv8BmWfXlOknS//LciK+qmuJGQWDsiNjwMPiAMmL0voXh6jK5MpVh g==; X-CSE-ConnectionGUID: 6lWXB1mrQWufi871Fh+5LQ== X-CSE-MsgGUID: sw4loN5mQg2M8h9TO0ju2A== X-IronPort-AV: E=McAfee;i="6700,10204,11114"; a="38979386" X-IronPort-AV: E=Sophos;i="6.08,266,1712646000"; d="scan'208";a="38979386" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2024 04:43:58 -0700 X-CSE-ConnectionGUID: n0FkQ98STBWuTGPbgdqFyw== X-CSE-MsgGUID: lobCB16lQjO+4E9ldXG/Iw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,266,1712646000"; d="scan'208";a="43873680" Received: from unknown (HELO silpixa00401119.ir.intel.com) ([10.55.129.167]) by orviesa010.jf.intel.com with ESMTP; 26 Jun 2024 04:43:57 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: Yochai Hagvi , ian.stokes@intel.com, bruce.richardson@intel.com Subject: [PATCH v4 034/103] net/ice/base: change tmr_idx to u32 Date: Wed, 26 Jun 2024 12:41:22 +0100 Message-ID: <8c164d792931c471c2b087f680dd888b7605b241.1719401848.git.anatoly.burakov@intel.com> 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 22f7b86284..fa9be98444 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