[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-edac
Subject:    Re: [PATCH] rasdaemon: unnecessary comma for empty mc_location string
From:       Aristeu Rozanski <aris () redhat ! com>
Date:       2015-06-12 13:31:25
Message-ID: 20150612133125.GH14408 () redhat ! com
[Download RAW message or body]

On Thu, Jun 11, 2015 at 08:49:55AM +0900, Seiichi Ikarashi wrote:
> Into the /var/log/messages, rasdaemon sometimes prints an unnecessary comma ", "
> between mca= and cpu_type= like below:
> 
> Jun  9 02:44:39 localhost rasdaemon: <...>-4585  [1638893312]  1031.109000: \
> mce_record:           2015-06-08 10:07:28 +0900 bank=3, status= 9c0000000000017a, \
> mci=Corrected_error Error_enabled, mca=Generic CACHE Level-2 Eviction Error, , \
> cpu_type= Intel Xeon v3 (Haswell) EP/EX, cpu= 1, socketid= 0, misc= \
> 4004000000000080, addr= 204fffffff, mcgstatus= 0, mcgcap= 7000c16, apicid= 2 
> That's the comma for mc_location which is printed even if mc_location is empty
> due to a wrong if condition.
> 
> Signed-off-by: Seiichi Ikarashi <s.ikarashi@jp.fujitsu.com>
> 
> diff --git a/ras-mce-handler.c b/ras-mce-handler.c
> index fb6db8a..07252a0 100644
> --- a/ras-mce-handler.c
> +++ b/ras-mce-handler.c
> @@ -278,7 +278,7 @@ static void report_mce_event(struct ras_events *ras,
> 	if (*e->user_action)
> 		trace_seq_printf(s, " %s", e->user_action);
> 
> -	if (e->mc_location)
> +	if (*e->mc_location)
> 		trace_seq_printf(s, ", %s", e->mc_location);
> 
> #if 0

Acked-by: Aristeu Rozanski <aris@redhat.com>

-- 
Aristeu

--
To unsubscribe from this list: send the line "unsubscribe linux-edac" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic