From: Borislav Petkov <bp@alien8.de>
To: "Ghannam, Yazen" <Yazen.Ghannam@amd.com>
Cc: "linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"bp@suse.de" <bp@suse.de>,
"tony.luck@intel.com" <tony.luck@intel.com>,
"x86@kernel.org" <x86@kernel.org>
Subject: [5/5] EDAC, mce_amd: Print ExtErrorCode and description on a single line
Date: Sun, 3 Feb 2019 13:21:58 +0100 [thread overview]
Message-ID: <20190203122158.GA21750@zn.tnic> (raw)
On Fri, Feb 01, 2019 at 10:55:54PM +0000, Ghannam, Yazen wrote:
> From: Yazen Ghannam <yazen.ghannam@amd.com>
>
> Save a log line by printing the extended error code and the description
> on a single line. This is similar to how errors are printed in other
> subsystems, e.g. "#, description". If we don't have a valid description
> then only the number/code is printed.
>
> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
> ---
> drivers/edac/mce_amd.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c
> index 7e29ceabdf6f..f286b880f981 100644
> --- a/drivers/edac/mce_amd.c
> +++ b/drivers/edac/mce_amd.c
> @@ -965,13 +965,12 @@ static void decode_smca_error(struct mce *m)
>
> ip_name = smca_get_long_name(bank_type);
>
> - pr_emerg(HW_ERR "%s Extended Error Code: %d\n", ip_name, xec);
> + pr_emerg(HW_ERR "%s Ext. Error Code: %d", ip_name, xec);
>
> /* Only print the decode of valid error codes */
> if (xec < smca_mce_descs[bank_type].num_descs &&
> (hwid->xec_bitmap & BIT_ULL(xec))) {
> - pr_emerg(HW_ERR "%s Error: ", ip_name);
> - pr_cont("%s.\n", smca_mce_descs[bank_type].descs[xec]);
> + pr_cont(", %s.\n", smca_mce_descs[bank_type].descs[xec]);
If the if-condition doesn't hit, we never print the \n
WARNING: multiple messages have this Message-ID (diff)
From: Borislav Petkov <bp@alien8.de>
To: "Ghannam, Yazen" <Yazen.Ghannam@amd.com>
Cc: "linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"bp@suse.de" <bp@suse.de>,
"tony.luck@intel.com" <tony.luck@intel.com>,
"x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH 5/5] EDAC, mce_amd: Print ExtErrorCode and description on a single line
Date: Sun, 3 Feb 2019 13:21:58 +0100 [thread overview]
Message-ID: <20190203122158.GA21750@zn.tnic> (raw)
In-Reply-To: <20190201225534.8177-6-Yazen.Ghannam@amd.com>
On Fri, Feb 01, 2019 at 10:55:54PM +0000, Ghannam, Yazen wrote:
> From: Yazen Ghannam <yazen.ghannam@amd.com>
>
> Save a log line by printing the extended error code and the description
> on a single line. This is similar to how errors are printed in other
> subsystems, e.g. "#, description". If we don't have a valid description
> then only the number/code is printed.
>
> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
> ---
> drivers/edac/mce_amd.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c
> index 7e29ceabdf6f..f286b880f981 100644
> --- a/drivers/edac/mce_amd.c
> +++ b/drivers/edac/mce_amd.c
> @@ -965,13 +965,12 @@ static void decode_smca_error(struct mce *m)
>
> ip_name = smca_get_long_name(bank_type);
>
> - pr_emerg(HW_ERR "%s Extended Error Code: %d\n", ip_name, xec);
> + pr_emerg(HW_ERR "%s Ext. Error Code: %d", ip_name, xec);
>
> /* Only print the decode of valid error codes */
> if (xec < smca_mce_descs[bank_type].num_descs &&
> (hwid->xec_bitmap & BIT_ULL(xec))) {
> - pr_emerg(HW_ERR "%s Error: ", ip_name);
> - pr_cont("%s.\n", smca_mce_descs[bank_type].descs[xec]);
> + pr_cont(", %s.\n", smca_mce_descs[bank_type].descs[xec]);
If the if-condition doesn't hit, we never print the \n
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
next reply other threads:[~2019-02-03 12:21 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-03 12:21 Borislav Petkov [this message]
2019-02-03 12:21 ` [PATCH 5/5] EDAC, mce_amd: Print ExtErrorCode and description on a single line Borislav Petkov
-- strict thread matches above, loose matches on Subject: below --
2019-02-04 20:45 [tip:ras/core] " tip-bot for Borislav Petkov
2019-02-04 20:45 ` tip-bot for Yazen Ghannam
2019-02-04 20:44 [tip:ras/core] EDAC, mce_amd: Match error descriptions to latest documentation tip-bot for Borislav Petkov
2019-02-04 20:44 ` tip-bot for Yazen Ghannam
2019-02-04 20:44 [tip:ras/core] x86/MCE/AMD, EDAC/mce_amd: Add new error descriptions for some SMCA bank types tip-bot for Borislav Petkov
2019-02-04 20:44 ` tip-bot for Yazen Ghannam
2019-02-04 20:43 [tip:ras/core] x86/MCE/AMD, EDAC/mce_amd: Add new McaTypes for CS, PSP, and SMU units tip-bot for Borislav Petkov
2019-02-04 20:43 ` tip-bot for Yazen Ghannam
2019-02-04 20:42 [tip:ras/core] x86/MCE/AMD, EDAC/mce_amd: Add new MP5, NBIO, and PCIE SMCA bank types tip-bot for Borislav Petkov
2019-02-04 20:42 ` tip-bot for Yazen Ghannam
2019-02-04 16:36 [5/5] EDAC, mce_amd: Print ExtErrorCode and description on a single line Borislav Petkov
2019-02-04 16:36 ` [PATCH 5/5] " Borislav Petkov
2019-02-04 15:14 [5/5] " Yazen Ghannam
2019-02-04 15:14 ` [PATCH 5/5] " Ghannam, Yazen
2019-02-01 22:55 [5/5] " Yazen Ghannam
2019-02-01 22:55 ` [PATCH 5/5] " Ghannam, Yazen
2019-02-01 22:55 [4/5] EDAC, mce_amd: Match error descriptions to latest documentation Yazen Ghannam
2019-02-01 22:55 ` [PATCH 4/5] " Ghannam, Yazen
2019-02-01 22:55 [3/5] EDAC, mce_amd: Add new error descriptions for some SMCA bank types Yazen Ghannam
2019-02-01 22:55 ` [PATCH 3/5] " Ghannam, Yazen
2019-02-01 22:55 [2/5] x86/MCE/AMD: Add new McaTypes for CS, PSP, and SMU Yazen Ghannam
2019-02-01 22:55 ` [PATCH 2/5] " Ghannam, Yazen
2019-02-01 22:55 [1/5] x86/MCE/AMD: Add new MP5, NBIO, and PCIE SMCA bank types Yazen Ghannam
2019-02-01 22:55 ` [PATCH 1/5] " Ghannam, Yazen
2019-02-01 22:55 [PATCH 0/5] Add new " Ghannam, Yazen
Reply instructions:
You may reply publicly 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=20190203122158.GA21750@zn.tnic \
--to=bp@alien8.de \
--cc=Yazen.Ghannam@amd.com \
--cc=bp@suse.de \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.