net: hns3: add missing const qualifier to hclge_log_error() reg parameter

The reg parameter of hclge_log_error() is never modified within the
function, but is declared as 'char *'. Callers pass const strings,
causing a compiler warning about discarding the 'const' qualifier.
Add the missing const to fix the warning.

Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260807095435.2959246-3-shaojijie@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Jijie Shao
2026-08-07 17:54:34 +08:00
committed by Paolo Abeni
parent 4f20c628b6
commit b8f554e138

View File

@@ -1762,7 +1762,7 @@ static const struct hclge_hw_type_id hclge_hw_type_id_st[] = {
},
};
static void hclge_log_error(struct device *dev, char *reg,
static void hclge_log_error(struct device *dev, const char *reg,
const struct hclge_hw_error *err,
u32 err_sts, unsigned long *reset_requests)
{