5 Star 0 Fork 4

src-openEuler/hikptool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0015-hikptool-fix-print-sas_dqe-info-error-problem.patch 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
veega2022 提交于 2023-05-30 22:10 . sync code for bugfix
From dc15df882b56ec2abff2a5bba45238309a02f5e9 Mon Sep 17 00:00:00 2001
From: FuJia Ni <nifujia1@hisilicon.com>
Date: Thu, 25 May 2023 09:36:39 +0800
Subject: [PATCH 18/18] hikptool: fix print sas_dqe info error problem
the volatile modifier is added because the O2 compilation optimization is enbaled.
As a result, the pointer data is not updated.
Signed-off-by: FuJia Ni <nifujia1@hisilicon.com>
---
sas/sas_func/sas_read_dqe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sas/sas_func/sas_read_dqe.c b/sas/sas_func/sas_read_dqe.c
index fc04682..2f653df 100644
--- a/sas/sas_func/sas_read_dqe.c
+++ b/sas/sas_func/sas_read_dqe.c
@@ -47,7 +47,7 @@ static int sas_get_dqe(const struct tool_sas_cmd *cmd, uint32_t *reg_save, uint3
static void print_dqe_info(const void *reg_save, uint32_t reg_num)
{
- struct hisi_sas_dq_info *dqe = (struct hisi_sas_dq_info *)(reg_save);
+ volatile struct hisi_sas_dq_info *dqe = (volatile struct hisi_sas_dq_info *)(reg_save);
printf("The dqe dw0 information as below:\n");
printf("abort_flag: %u\n", dqe->dw0.abort_flag);
--
2.25.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/hikptool.git
git@gitee.com:src-openeuler/hikptool.git
src-openeuler
hikptool
hikptool
master

搜索帮助