From: Daniel Bristot de Oliveira <bristot@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
Trond Myklebust <trond.myklebust@primarydata.com>,
Anna Schumaker <anna.schumaker@netapp.com>,
linux-nfs@vger.kernel.org
Subject: [PATCH 2/4] tracing, RAS: Cleanup on __get_str() usage
Date: Fri, 1 Jul 2016 20:44:35 -0300 [thread overview]
Message-ID: <6f2db5be7705da2cb483923320c91283d7c712a7.1467407618.git.bristot@redhat.com> (raw)
In-Reply-To: <cover.1467407618.git.bristot@redhat.com>
__get_str(msg) does not need (char *) operator overloading to access
mgs's elements anymore. This patch substitutes
((char *)__get_str(msg))[0] usage to __get_str(msg)[0].
It is just a code cleanup, no changes on tracepoint ABI.
Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-kernel@vger.kernel.org
---
include/ras/ras_event.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/ras/ras_event.h b/include/ras/ras_event.h
index 1443d79..1791a12 100644
--- a/include/ras/ras_event.h
+++ b/include/ras/ras_event.h
@@ -147,7 +147,7 @@ TRACE_EVENT(mc_event,
__entry->error_count,
mc_event_error_type(__entry->error_type),
__entry->error_count > 1 ? "s" : "",
- ((char *)__get_str(msg))[0] ? " " : "",
+ __get_str(msg)[0] ? " " : "",
__get_str(msg),
__get_str(label),
__entry->mc_index,
@@ -157,7 +157,7 @@ TRACE_EVENT(mc_event,
__entry->address,
1 << __entry->grain_bits,
__entry->syndrome,
- ((char *)__get_str(driver_detail))[0] ? " " : "",
+ __get_str(driver_detail)[0] ? " " : "",
__get_str(driver_detail))
);
--
2.7.4
next prev parent reply other threads:[~2016-07-01 23:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-01 23:44 [PATCH 0/4] tracing: printk:console fix and __get_str() cleanup Daniel Bristot de Oliveira
2016-07-01 23:44 ` [PATCH 1/4] tracing: Use outer () on __get_str() definition Daniel Bristot de Oliveira
2016-07-01 23:44 ` Daniel Bristot de Oliveira [this message]
2016-07-01 23:44 ` [PATCH 3/4] tracing: Use __get_str() when manipulating strings Daniel Bristot de Oliveira
2016-07-01 23:44 ` [PATCH 4/4] printk, tracing: Avoiding unneeded blank lines Daniel Bristot de Oliveira
2016-07-15 19:53 ` [PATCH 0/4] tracing: printk:console fix and __get_str() cleanup Daniel Bristot de Oliveira
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=6f2db5be7705da2cb483923320c91283d7c712a7.1467407618.git.bristot@redhat.com \
--to=bristot@redhat.com \
--cc=anna.schumaker@netapp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=trond.myklebust@primarydata.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®