* [PATCH] x86, mce, severity: Fix warning about intended braces
@ 2015-03-31 15:04 Aravind Gopalakrishnan
2015-04-01 12:26 ` Borislav Petkov
0 siblings, 1 reply; 2+ messages in thread
From: Aravind Gopalakrishnan @ 2015-03-31 15:04 UTC (permalink / raw)
To: tglx, mingo, hpa, tony.luck, bp, x86, linux-kernel, linux-edac
Cc: Aravind Gopalakrishnan
Dan reported compiler warnings about intended curly braces
around if (!(m->mcgstatus & MCG_STATUS_RIPV)).
This can be fixed by reindenting return MCE_AR_SEVERITY
correctly to single tab.
While at it, chain ctx == IN_KERNEL check with mcgstatus
check to make it cleaner as suggested by Boris.
No functional changes are introduced by the patch
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
---
arch/x86/kernel/cpu/mcheck/mce-severity.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/cpu/mcheck/mce-severity.c b/arch/x86/kernel/cpu/mcheck/mce-severity.c
index 155c926..8329c6b 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-severity.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-severity.c
@@ -208,12 +208,12 @@ static int mce_severity_amd(struct mce *m, int tolerant, char **msg, bool is_exc
*/
if (mce_flags.overflow_recov) {
/* software can try to contain */
- if (!(m->mcgstatus & MCG_STATUS_RIPV))
- if (ctx == IN_KERNEL)
- return MCE_PANIC_SEVERITY;
+ if (!(m->mcgstatus & MCG_STATUS_RIPV) &&
+ ctx == IN_KERNEL)
+ return MCE_PANIC_SEVERITY;
- /* kill current process */
- return MCE_AR_SEVERITY;
+ /* kill current process */
+ return MCE_AR_SEVERITY;
} else {
/* at least one error was not logged */
if (m->status & MCI_STATUS_OVER)
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86, mce, severity: Fix warning about intended braces
2015-03-31 15:04 [PATCH] x86, mce, severity: Fix warning about intended braces Aravind Gopalakrishnan
@ 2015-04-01 12:26 ` Borislav Petkov
0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2015-04-01 12:26 UTC (permalink / raw)
To: Aravind Gopalakrishnan
Cc: tglx, mingo, hpa, tony.luck, x86, linux-kernel, linux-edac
On Tue, Mar 31, 2015 at 10:04:41AM -0500, Aravind Gopalakrishnan wrote:
> Dan reported compiler warnings about intended curly braces
> around if (!(m->mcgstatus & MCG_STATUS_RIPV)).
> This can be fixed by reindenting return MCE_AR_SEVERITY
> correctly to single tab.
>
> While at it, chain ctx == IN_KERNEL check with mcgstatus
> check to make it cleaner as suggested by Boris.
>
> No functional changes are introduced by the patch
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
> ---
> arch/x86/kernel/cpu/mcheck/mce-severity.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
Applied, thanks.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-01 12:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-31 15:04 [PATCH] x86, mce, severity: Fix warning about intended braces Aravind Gopalakrishnan
2015-04-01 12:26 ` Borislav Petkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).