44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
|
|
From 1a4f58e149d14146d399878418bdba9dc824e0a6 Mon Sep 17 00:00:00 2001
|
||
|
|
From: veega2022 <zhuweijia@huawei.com>
|
||
|
|
Date: Thu, 6 Apr 2023 11:33:14 +0000
|
||
|
|
Subject: [PATCH] hikptool: fix print sas_dev 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: veega2022 <zhuweijia@huawei.com>
|
||
|
|
---
|
||
|
|
sas/sas_func/sas_read_dev.c | 2 +-
|
||
|
|
tool_lib/tool_lib.h | 2 +-
|
||
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/sas/sas_func/sas_read_dev.c b/sas/sas_func/sas_read_dev.c
|
||
|
|
index 382a1ef..d01f95f 100644
|
||
|
|
--- a/sas/sas_func/sas_read_dev.c
|
||
|
|
+++ b/sas/sas_func/sas_read_dev.c
|
||
|
|
@@ -77,7 +77,7 @@ static void print_dev_link(const uint32_t *reg_save, uint32_t reg_num)
|
||
|
|
|
||
|
|
static void print_dev_info(const void *reg_save, uint32_t reg_num)
|
||
|
|
{
|
||
|
|
- struct hikp_sas_itct *itct = (struct hikp_sas_itct *)reg_save;
|
||
|
|
+ volatile struct hikp_sas_itct *itct = (volatile struct hikp_sas_itct *)reg_save;
|
||
|
|
|
||
|
|
printf("The device information as below:\n");
|
||
|
|
printf("dev_type: %d\n", itct->dw0.dev_type);
|
||
|
|
diff --git a/tool_lib/tool_lib.h b/tool_lib/tool_lib.h
|
||
|
|
index 29e7e8c..b211175 100644
|
||
|
|
--- a/tool_lib/tool_lib.h
|
||
|
|
+++ b/tool_lib/tool_lib.h
|
||
|
|
@@ -18,7 +18,7 @@
|
||
|
|
|
||
|
|
#define TOOL_NAME "hikptool"
|
||
|
|
|
||
|
|
-#define TOOL_VER "1.0.12"
|
||
|
|
+#define TOOL_VER "1.0.13"
|
||
|
|
|
||
|
|
#define HI_GET_BITFIELD(value, start, mask) (((value) >> (start)) & (mask))
|
||
|
|
#define HI_SET_FIELD(origin, shift, val) ((origin) |= (val) << (shift))
|
||
|
|
--
|
||
|
|
2.25.1
|
||
|
|
|