]> www.infradead.org Git - users/mchehab/rasdaemon.git/commitdiff
parse_ras_data: initialize record.cpu before pevent_print_event().
authorSergio Gelato <Sergio.Gelato@astro.su.se>
Wed, 19 Sep 2018 14:58:31 +0000 (11:58 -0300)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 4 Sep 2019 23:48:38 +0000 (20:48 -0300)
pevent_print_event() prints record.cpu; make sure it's initialized.
The cpu field from pthread_data is my best guess at a suitable value:
parse_ras_data() was already printing it separately.

Signed-off-by: Sergio Gelato <Sergio.Gelato@astro.su.se>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
ras-events.c

index 9c3f210489570ab5f4663206b1993d0c8d6a8f9a..3cdac19afb637751e1799cf31cdcb1693e5f3037 100644 (file)
@@ -302,6 +302,7 @@ static void parse_ras_data(struct pthread_data *pdata, struct kbuffer *kbuf,
        record.size = kbuffer_event_size(kbuf);
        record.data = data;
        record.offset = kbuffer_curr_offset(kbuf);
+       record.cpu = pdata->cpu;
 
        /* note offset is just offset in subbuffer */
        record.missed_events = kbuffer_missed_events(kbuf);
@@ -309,7 +310,6 @@ static void parse_ras_data(struct pthread_data *pdata, struct kbuffer *kbuf,
 
        /* TODO - logging */
        trace_seq_init(&s);
-       printf("cpu %02d:", pdata->cpu);
        pevent_print_event(pdata->ras->pevent, &s, &record);
        trace_seq_do_printf(&s);
        printf("\n");