]> www.infradead.org Git - users/mchehab/rasdaemon.git/commitdiff
rasdaemon: Fix few compilation warnings in non standard hisilicon code
authorBing Xia <xiabing14@h-partners.com>
Sun, 19 Jan 2025 11:26:43 +0000 (11:26 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 10 Mar 2025 10:28:00 +0000 (11:28 +0100)
Fix the problem that the type of a constant string does not match
when it is assigned to a character pointer.

Signed-off-by: Bing Xia <xiabing14@h-partners.com>
Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
non-standard-hisi_hip08.c
non-standard-hisilicon.h

index de5b5e903b2ad722a66a07900e2d6ca5f4cbe58e..3b8d93ceb6862f730dc8e87773dac7afdf34bbc5 100644 (file)
@@ -462,7 +462,7 @@ static const char * const oem_submodule_name(const struct hisi_module_info *info
        return "unknown";
 }
 
-static char *pcie_local_sub_module_name(uint8_t id)
+static const char *pcie_local_sub_module_name(uint8_t id)
 {
        switch (id) {
        case HISI_PCIE_SUB_MODULE_ID_AP: return "AP_Layer";
index 44da9e7532afdfe4f314d5ef865a551925fea4fa..afd5e83d74cebedc7a3c54b3844163f6f7d98392 100644 (file)
@@ -24,7 +24,7 @@ enum hisi_oem_data_type {
 };
 
 /* helper functions */
-static inline char *err_severity(uint8_t err_sev)
+static inline const char *err_severity(uint8_t err_sev)
 {
        switch (err_sev) {
        case HISI_ERR_SEVERITY_NFE: return "recoverable";