From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [android-common:android12-kiwi-5.10 236/236] kernel/trace/trace_events_synth.c:548 trace_event_raw_event_synth() warn: inconsistent indenting
Date: Thu, 28 May 2026 03:55:33 +0800 [thread overview]
Message-ID: <202605280319.sbXBYYIP-lkp@intel.com> (raw)
tree: https://android.googlesource.com/kernel/common android12-kiwi-5.10
head: 699e15bcf547a7d68dda803fa0f49872de5be052
commit: b9453380c1c542fd095a4dbe9251eeba4022bbce [236/236] tracing: Allow synthetic events to pass around stacktraces
config: x86_64-randconfig-161-20260527 (https://download.01.org/0day-ci/archive/20260528/202605280319.sbXBYYIP-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
smatch: v0.5.0-9185-gbcc58b9c
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605280319.sbXBYYIP-lkp@intel.com/
smatch warnings:
kernel/trace/trace_events_synth.c:548 trace_event_raw_event_synth() warn: inconsistent indenting
vim +548 kernel/trace/trace_events_synth.c
495
496 static notrace void trace_event_raw_event_synth(void *__data,
497 u64 *var_ref_vals,
498 unsigned int *var_ref_idx)
499 {
500 unsigned int i, n_u64, val_idx, len, data_size = 0;
501 struct trace_event_file *trace_file = __data;
502 struct synth_trace_event *entry;
503 struct trace_event_buffer fbuffer;
504 struct trace_buffer *buffer;
505 struct synth_event *event;
506 int fields_size = 0;
507
508 event = trace_file->event_call->data;
509
510 if (trace_trigger_soft_disabled(trace_file))
511 return;
512
513 fields_size = event->n_u64 * sizeof(u64);
514
515 for (i = 0; i < event->n_dynamic_fields; i++) {
516 unsigned int field_pos = event->dynamic_fields[i]->field_pos;
517 char *str_val;
518
519 val_idx = var_ref_idx[field_pos];
520 str_val = (char *)(long)var_ref_vals[val_idx];
521
522 len = strlen(str_val) + 1;
523
524 fields_size += len;
525 }
526
527 /*
528 * Avoid ring buffer recursion detection, as this event
529 * is being performed within another event.
530 */
531 buffer = trace_file->tr->array_buffer.buffer;
532 ring_buffer_nest_start(buffer);
533
534 entry = trace_event_buffer_reserve(&fbuffer, trace_file,
535 sizeof(*entry) + fields_size);
536 if (!entry)
537 goto out;
538
539 for (i = 0, n_u64 = 0; i < event->n_fields; i++) {
540 val_idx = var_ref_idx[i];
541 if (event->fields[i]->is_string) {
542 char *str_val = (char *)(long)var_ref_vals[val_idx];
543
544 len = trace_string(entry, event, str_val,
545 event->fields[i]->is_dynamic,
546 data_size, &n_u64);
547 data_size += len; /* only dynamic string increments */
> 548 } if (event->fields[i]->is_stack) {
549 long *stack = (long *)(long)var_ref_vals[val_idx];
550
551 len = trace_stack(entry, event, stack,
552 data_size, &n_u64);
553 data_size += len;
554 } else {
555 struct synth_field *field = event->fields[i];
556 u64 val = var_ref_vals[val_idx];
557
558 switch (field->size) {
559 case 1:
560 *(u8 *)&entry->fields[n_u64] = (u8)val;
561 break;
562
563 case 2:
564 *(u16 *)&entry->fields[n_u64] = (u16)val;
565 break;
566
567 case 4:
568 *(u32 *)&entry->fields[n_u64] = (u32)val;
569 break;
570
571 default:
572 entry->fields[n_u64] = val;
573 break;
574 }
575 n_u64++;
576 }
577 }
578
579 trace_event_buffer_commit(&fbuffer);
580 out:
581 ring_buffer_nest_end(buffer);
582 }
583
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-05-27 19:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202605280319.sbXBYYIP-lkp@intel.com \
--to=lkp@intel.com \
--cc=cros-kernel-buildreports@googlegroups.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.