]> www.infradead.org Git - users/mchehab/rasdaemon.git/commitdiff
rasdaemon: add underscore(_) for some logging item names for hip08
authorXiaofei Tan <tanxiaofei@huawei.com>
Tue, 8 Oct 2019 12:38:55 +0000 (20:38 +0800)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 10 Oct 2019 17:33:14 +0000 (14:33 -0300)
Add underscore(_) for some logging item names for hip08. Then we can
match and catch specific fields of the log easily if needed.

Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
non-standard-hisi_hip08.c

index 393053dd13f54bf7db76953aca0ac19350513cec..9de7be8a52db01657c6bf7610cb0a3612dcc752c 100644 (file)
@@ -264,11 +264,11 @@ static char *oem_type2_sub_module_id(char *p, uint8_t module_id,
 static char *pcie_local_sub_module_name(uint8_t id)
 {
        switch (id) {
-       case HISI_PCIE_SUB_MODULE_ID_AP: return "AP Layer";
-       case HISI_PCIE_SUB_MODULE_ID_TL: return "TL Layer";
-       case HISI_PCIE_SUB_MODULE_ID_MAC: return "MAC Layer";
-       case HISI_PCIE_SUB_MODULE_ID_DL: return "DL Layer";
-       case HISI_PCIE_SUB_MODULE_ID_SDI: return "SDI Layer";
+       case HISI_PCIE_SUB_MODULE_ID_AP: return "AP_Layer";
+       case HISI_PCIE_SUB_MODULE_ID_TL: return "TL_Layer";
+       case HISI_PCIE_SUB_MODULE_ID_MAC: return "MAC_Layer";
+       case HISI_PCIE_SUB_MODULE_ID_DL: return "DL_Layer";
+       case HISI_PCIE_SUB_MODULE_ID_SDI: return "SDI_Layer";
        }
        return "unknown";
 }
@@ -411,26 +411,26 @@ static int decode_hip08_oem_type1_error(struct ras_events *ras,
 #endif
 
        p += sprintf(p, "[ ");
-       p += sprintf(p, "Table version=%d ", err->version);
+       p += sprintf(p, "table_version=%d ", err->version);
        record_vendor_data(dec_tab, hisi_oem_data_type_int,
                           hip08_oem_type1_field_version, err->version, NULL);
 
        if (err->val_bits & HISI_OEM_VALID_SOC_ID) {
-               p += sprintf(p, "SOC ID=%d ", err->soc_id);
+               p += sprintf(p, "SOC_ID=%d ", err->soc_id);
                record_vendor_data(dec_tab, hisi_oem_data_type_int,
                                   hip08_oem_type1_field_soc_id,
                                   err->soc_id, NULL);
        }
 
        if (err->val_bits & HISI_OEM_VALID_SOCKET_ID) {
-               p += sprintf(p, "socket ID=%d ", err->socket_id);
+               p += sprintf(p, "socket_ID=%d ", err->socket_id);
                record_vendor_data(dec_tab, hisi_oem_data_type_int,
                                   hip08_oem_type1_field_socket_id,
                                   err->socket_id, NULL);
        }
 
        if (err->val_bits & HISI_OEM_VALID_NIMBUS_ID) {
-               p += sprintf(p, "nimbus ID=%d ", err->nimbus_id);
+               p += sprintf(p, "nimbus_ID=%d ", err->nimbus_id);
                record_vendor_data(dec_tab, hisi_oem_data_type_int,
                                   hip08_oem_type1_field_nimbus_id,
                                   err->nimbus_id, NULL);
@@ -451,7 +451,7 @@ static int decode_hip08_oem_type1_error(struct ras_events *ras,
        }
 
        if (err->val_bits & HISI_OEM_VALID_ERR_SEVERITY) {
-               p += sprintf(p, "error severity=%s ",
+               p += sprintf(p, "error_severity=%s ",
                             err_severity(err->err_severity));
                record_vendor_data(dec_tab, hisi_oem_data_type_text,
                                   hip08_oem_type1_field_err_sev,
@@ -528,26 +528,26 @@ static int decode_hip08_oem_type2_error(struct ras_events *ras,
        }
 #endif
        p += sprintf(p, "[ ");
-       p += sprintf(p, "Table version=%d ", err->version);
+       p += sprintf(p, "table_version=%d ", err->version);
        record_vendor_data(dec_tab, hisi_oem_data_type_int,
                           hip08_oem_type2_field_version,
                           err->version, NULL);
        if (err->val_bits & HISI_OEM_VALID_SOC_ID) {
-               p += sprintf(p, "SOC ID=%d ", err->soc_id);
+               p += sprintf(p, "SOC_ID=%d ", err->soc_id);
                record_vendor_data(dec_tab, hisi_oem_data_type_int,
                                   hip08_oem_type2_field_soc_id,
                                   err->soc_id, NULL);
        }
 
        if (err->val_bits & HISI_OEM_VALID_SOCKET_ID) {
-               p += sprintf(p, "socket ID=%d ", err->socket_id);
+               p += sprintf(p, "socket_ID=%d ", err->socket_id);
                record_vendor_data(dec_tab, hisi_oem_data_type_int,
                                   hip08_oem_type2_field_socket_id,
                                   err->socket_id, NULL);
        }
 
        if (err->val_bits & HISI_OEM_VALID_NIMBUS_ID) {
-               p += sprintf(p, "nimbus ID=%d ", err->nimbus_id);
+               p += sprintf(p, "nimbus_ID=%d ", err->nimbus_id);
                record_vendor_data(dec_tab, hisi_oem_data_type_int,
                                   hip08_oem_type2_field_nimbus_id,
                                   err->nimbus_id, NULL);
@@ -570,7 +570,7 @@ static int decode_hip08_oem_type2_error(struct ras_events *ras,
        }
 
        if (err->val_bits & HISI_OEM_VALID_ERR_SEVERITY) {
-               p += sprintf(p, "error severity=%s ",
+               p += sprintf(p, "error_severity=%s ",
                             err_severity(err->err_severity));
                record_vendor_data(dec_tab, hisi_oem_data_type_text,
                                   hip08_oem_type2_field_err_sev,
@@ -660,33 +660,33 @@ static int decode_hip08_pcie_local_error(struct ras_events *ras,
        }
 #endif
        p += sprintf(p, "[ ");
-       p += sprintf(p, "Table version=%d ", err->version);
+       p += sprintf(p, "table_version=%d ", err->version);
        record_vendor_data(dec_tab, hisi_oem_data_type_int,
                           hip08_pcie_local_field_version,
                           err->version, NULL);
        if (err->val_bits & HISI_PCIE_LOCAL_VALID_SOC_ID) {
-               p += sprintf(p, "SOC ID=%d ", err->soc_id);
+               p += sprintf(p, "SOC_ID=%d ", err->soc_id);
                record_vendor_data(dec_tab, hisi_oem_data_type_int,
                                   hip08_pcie_local_field_soc_id,
                                   err->soc_id, NULL);
        }
 
        if (err->val_bits & HISI_PCIE_LOCAL_VALID_SOCKET_ID) {
-               p += sprintf(p, "socket ID=%d ", err->socket_id);
+               p += sprintf(p, "socket_ID=%d ", err->socket_id);
                record_vendor_data(dec_tab, hisi_oem_data_type_int,
                                   hip08_pcie_local_field_socket_id,
                                   err->socket_id, NULL);
        }
 
        if (err->val_bits & HISI_PCIE_LOCAL_VALID_NIMBUS_ID) {
-               p += sprintf(p, "nimbus ID=%d ", err->nimbus_id);
+               p += sprintf(p, "nimbus_ID=%d ", err->nimbus_id);
                record_vendor_data(dec_tab, hisi_oem_data_type_int,
                                   hip08_pcie_local_field_nimbus_id,
                                   err->nimbus_id, NULL);
        }
 
        if (err->val_bits & HISI_PCIE_LOCAL_VALID_SUB_MODULE_ID) {
-               p += sprintf(p, "sub module=%s ",
+               p += sprintf(p, "submodule=%s ",
                             pcie_local_sub_module_name(err->sub_module_id));
                record_vendor_data(dec_tab, hisi_oem_data_type_text,
                                   hip08_pcie_local_field_sub_module_id,
@@ -694,21 +694,21 @@ static int decode_hip08_pcie_local_error(struct ras_events *ras,
        }
 
        if (err->val_bits & HISI_PCIE_LOCAL_VALID_CORE_ID) {
-               p += sprintf(p, "core ID=core%d ", err->core_id);
+               p += sprintf(p, "core_ID=core%d ", err->core_id);
                record_vendor_data(dec_tab, hisi_oem_data_type_int,
                                   hip08_pcie_local_field_core_id,
                                   err->core_id, NULL);
        }
 
        if (err->val_bits & HISI_PCIE_LOCAL_VALID_PORT_ID) {
-               p += sprintf(p, "port ID=port%d ", err->port_id);
+               p += sprintf(p, "port_ID=port%d ", err->port_id);
                record_vendor_data(dec_tab, hisi_oem_data_type_int,
                                   hip08_pcie_local_field_port_id,
                                   err->port_id, NULL);
        }
 
        if (err->val_bits & HISI_PCIE_LOCAL_VALID_ERR_SEVERITY) {
-               p += sprintf(p, "error severity=%s ",
+               p += sprintf(p, "error_severity=%s ",
                             err_severity(err->err_severity));
                record_vendor_data(dec_tab, hisi_oem_data_type_text,
                                   hip08_pcie_local_field_err_sev,
@@ -716,7 +716,7 @@ static int decode_hip08_pcie_local_error(struct ras_events *ras,
        }
 
        if (err->val_bits & HISI_PCIE_LOCAL_VALID_ERR_TYPE) {
-               p += sprintf(p, "error type=0x%x ", err->err_type);
+               p += sprintf(p, "error_type=0x%x ", err->err_type);
                record_vendor_data(dec_tab, hisi_oem_data_type_int,
                                   hip08_pcie_local_field_err_type,
                                   err->err_type, NULL);