[PATCH v1 1/2] soc: hisilicon: kunpeng_hccs: Fix discard ‘const’ qualifier compiling warning

From: Huisong Li

Date: Mon Mar 16 2026 - 23:58:15 EST


The link_fsm_map has ‘const’ qualifier, but the 'str' pointer
in link_fsm_map is discarded. So add 'const' for this pointer
to fix the compiling warning.

Signed-off-by: Huisong Li <lihuisong@xxxxxxxxxx>
---
drivers/soc/hisilicon/kunpeng_hccs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/hisilicon/kunpeng_hccs.c b/drivers/soc/hisilicon/kunpeng_hccs.c
index 2af3bfda313e..d6ff7de63836 100644
--- a/drivers/soc/hisilicon/kunpeng_hccs.c
+++ b/drivers/soc/hisilicon/kunpeng_hccs.c
@@ -961,7 +961,7 @@ static ssize_t link_fsm_show(struct kobject *kobj,
struct hccs_link_status link_status = {0};
const struct {
u8 link_fsm;
- char *str;
+ const char *str;
} link_fsm_map[] = {
{HCCS_PORT_RESET, "reset"},
{HCCS_PORT_SETUP, "setup"},
--
2.33.0