Linux-EDAC Archive on lore.kernel.org
 help / color / Atom feed
From: Xiaofei Tan <tanxiaofei@huawei.com>
To: <mchehab@kernel.org>, <linux-edac@vger.kernel.org>
Cc: Xiaofei Tan <tanxiaofei@huawei.com>, <linuxarm@huawei.com>,
	<shiju.jose@huawei.com>, <jonathan.cameron@huawei.com>
Subject: [PATCH 2/5] rasdaemon: add underscore(_) for some logging item names for hip08
Date: Tue, 8 Oct 2019 20:38:55 +0800
Message-ID: <1570538338-230884-3-git-send-email-tanxiaofei@huawei.com> (raw)
In-Reply-To: <1570538338-230884-1-git-send-email-tanxiaofei@huawei.com>

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>
---
 non-standard-hisi_hip08.c | 48 +++++++++++++++++++++++------------------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/non-standard-hisi_hip08.c b/non-standard-hisi_hip08.c
index 393053d..9de7be8 100644
--- a/non-standard-hisi_hip08.c
+++ b/non-standard-hisi_hip08.c
@@ -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);
-- 
2.8.1


  parent reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-08 12:38 [PATCH 0/5] some optimizations of hip08 oem error records Xiaofei Tan
2019-10-08 12:38 ` [PATCH 1/5] rasdaemon: optimize sqlite3 DB record of register fields for hip08 Xiaofei Tan
2019-10-10 17:34   ` Mauro Carvalho Chehab
2019-10-08 12:38 ` Xiaofei Tan [this message]
2019-10-08 12:38 ` [PATCH 3/5] rasdaemon: change submodule ID of sqlite3 DB field to text " Xiaofei Tan
2019-10-08 12:38 ` [PATCH 4/5] rasdaemon: add timestamp for hip08 OEM error records in sqlite3 DB Xiaofei Tan
2019-10-08 12:38 ` [PATCH 5/5] rasdaemon: support three more modules for OEM type1 error for hip08 Xiaofei Tan

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1570538338-230884-3-git-send-email-tanxiaofei@huawei.com \
    --to=tanxiaofei@huawei.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mchehab@kernel.org \
    --cc=shiju.jose@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-EDAC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-edac/0 linux-edac/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-edac linux-edac/ https://lore.kernel.org/linux-edac \
		linux-edac@vger.kernel.org
	public-inbox-index linux-edac

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-edac


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git