5 Star 0 Fork 7

src-openEuler/hikptool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0086-hikptool-The-macro_num-error-is-rectified-and-the-of.patch 2.31 KB
一键复制 编辑 原始数据 按行查看 历史
From f8edb8f7f8882aaa68b24d7bb37659f2589c90ca Mon Sep 17 00:00:00 2001
From: Bingquan Mou <moubingquan@huawei.com>
Date: Sat, 12 Oct 2024 17:11:38 +0800
Subject: [PATCH 24/27] hikptool: The macro_num error is rectified, and the
offset writing is incorrect.
category: feature
bugzilla: NA
CVE: NA
1.It is reasonable that core0 has three macros. Therefore, macro_num == 3 is reasonable.
2.The offset writing is incorrect.
Signed-off-by: Bingquan Mou <moubingquan@huawei.com>
---
pcie/func_lib/pcie_func/pcie_link_ltssm.c | 2 +-
pcie/func_lib/pcie_func/pcie_link_ltssm.h | 2 +-
pcie/func_lib/pcie_func/pcie_statistics.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pcie/func_lib/pcie_func/pcie_link_ltssm.c b/pcie/func_lib/pcie_func/pcie_link_ltssm.c
index 1bc2edb..d3534f5 100644
--- a/pcie/func_lib/pcie_func/pcie_link_ltssm.c
+++ b/pcie/func_lib/pcie_func/pcie_link_ltssm.c
@@ -211,7 +211,7 @@ static int pcie_print_ltssm_trace(const uint64_t *ltssm_input, uint32_t ltssm_nu
(uint32_t)ltssm_val.bits.any_change_pipe_req,
(uint32_t)ltssm_val.bits.rxl0s_st,
(uint32_t)ltssm_val.bits.train_bit_map1,
- (((uint32_t)ltssm_val.bits.rxl0s_st) << GEN5_BIT_OFFEST) |
+ (((uint32_t)ltssm_val.bits.rxl0s_st) << GEN5_BIT_OFFSET) |
((uint32_t)ltssm_val.bits.mac_rate),
(uint32_t)ltssm_val.bits.duration_counter,
(uint32_t)ltssm_val.bits.ltssm_state,
diff --git a/pcie/func_lib/pcie_func/pcie_link_ltssm.h b/pcie/func_lib/pcie_func/pcie_link_ltssm.h
index 9986f7a..278f3e4 100644
--- a/pcie/func_lib/pcie_func/pcie_link_ltssm.h
+++ b/pcie/func_lib/pcie_func/pcie_link_ltssm.h
@@ -19,7 +19,7 @@
#define TRACE_STR_NUM 0x20
#define TRACER_DEPTH 65
#define PM_TRACE_STR_NUM 0x28
-#define GEN5_BIT_OFFEST 2
+#define GEN5_BIT_OFFSET 2
struct pcie_ltssm_num_string {
int ltssm;
diff --git a/pcie/func_lib/pcie_func/pcie_statistics.c b/pcie/func_lib/pcie_func/pcie_statistics.c
index 54d4edb..be187f2 100644
--- a/pcie/func_lib/pcie_func/pcie_statistics.c
+++ b/pcie/func_lib/pcie_func/pcie_statistics.c
@@ -70,7 +70,7 @@ static int pcie_portid_serdes_relation(const struct pcie_macro_info *macro_info,
return -1;
}
- if (macro_num >= MAX_MACRO_ONEPORT) {
+ if (macro_num > MAX_MACRO_ONEPORT) {
Info("macro_num [%u] exceeds the maximum array length\n", macro_num);
return -1;
}
--
2.45.0.windows.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/hikptool.git
git@gitee.com:src-openeuler/hikptool.git
src-openeuler
hikptool
hikptool
master

搜索帮助