[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-edac
Subject: Re: [PATCH 08/11] rasd: map the events buffers on all CPUs
From: Borislav Petkov <bp () alien8 ! de>
Date: 2014-09-23 9:27:26
Message-ID: 20140923092726.GD22072 () pd ! tnic
[Download RAW message or body]
On Wed, Sep 10, 2014 at 05:14:01PM +0200, Jean Pihet wrote:
> Allows multiple events to be read from all CPUs buffers
>
> Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
> ---
> src/rasd.c | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/src/rasd.c b/src/rasd.c
> index c30525c..248ae44 100644
> --- a/src/rasd.c
> +++ b/src/rasd.c
> @@ -71,6 +71,7 @@ static int add_tp_event(char *event_str)
> struct perf_evsel *tp;
> int ret;
> struct rasd_event *rasd_event;
> + static int idx = 0;
ERROR: do not initialise statics to 0 or NULL
#30: FILE: src/rasd.c:74:
+ static int idx = 0;
Please integrate checkpatch.pl into your workflow as a git commit hook,
for example. But make sure to take it with a grain of salt. :-)
>
> rasd.sys = zalloc(EVENT_STR_MAX_LENGTH);
> if (!rasd.sys)
> @@ -85,7 +86,7 @@ static int add_tp_event(char *event_str)
> err("invalid event specified, syntax is sys:name");
>
> /* Initialize tracepoint evsel */
> - tp = perf_evsel__newtp_idx(rasd.sys, rasd.name, 0);
> + tp = perf_evsel__newtp_idx(rasd.sys, rasd.name, idx++);
> if (!tp)
> err("init tracepoint evsel");
Add the index to the err() message.
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
--
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