[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1337187913.6724.53.camel@gandalf.stny.rr.com>
Date: Wed, 16 May 2012 13:05:13 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Mauro Carvalho Chehab <mchehab@...hat.com>
Cc: Borislav Petkov <bp@...64.org>, "Luck, Tony" <tony.luck@...el.com>,
Linux Edac Mailing List <linux-edac@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Doug Thompson <norsk5@...oo.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH v22] edac, ras/hw_event.h: use events to handle hw issues
On Wed, 2012-05-16 at 12:24 -0300, Mauro Carvalho Chehab wrote:
> > Here's another trick if you want to get rid of the space and keep both
> > fields:
> >
> > TP_printk("%s error:%s on memory stick \"%s\" (mc:%d %s %s%s%s)",
> > (__entry->err_type == HW_EVENT_ERR_CORRECTED) ? "Corrected" :
> > ((__entry->err_type == HW_EVENT_ERR_FATAL) ?
> > "Fatal" : "Uncorrected"),
> >
> > __get_str(msg),
> > __get_str(label),
> > __entry->mc_index,
> > __get_str(location),
> > __get_str(detail),
> > strlen(__get_str(detail)) &&
> > strlen(__get_str(driver_detail) ? " ": "",
> > __get_str(driver_detail))
>
> Great! I'll use that trick, thanks!
strlen() may be too overblown. The following should work and is more
efficient:
(((char *)__get_str(detail))[0] &&
((char *)__get_str(driver_detail))[0]) ? " " : "",
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists