Re: [PATCH v3 14/17] tracing: Add kho serialization of trace events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alexander,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[cannot apply to tip/x86/core arm64/for-next/core akpm-mm/mm-everything v6.7 next-20240117]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Alexander-Graf/mm-memblock-Add-support-for-scratch-memory/20240117-225136
base:   linus/master
patch link:    https://lore.kernel.org/r/20240117144704.602-15-graf%40amazon.com
patch subject: [PATCH v3 14/17] tracing: Add kho serialization of trace events
config: i386-randconfig-141-20240118 (https://download.01.org/0day-ci/archive/20240118/202401181352.qC85XHgx-lkp@xxxxxxxxx/config)
compiler: ClangBuiltLinux clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240118/202401181352.qC85XHgx-lkp@xxxxxxxxx/reproduce)

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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401181352.qC85XHgx-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> kernel/trace/trace_output.c:731:12: warning: unsequenced modification and access to 'count' [-Wunsequenced]
     731 |                 map[count++] = (struct trace_event_map) {
         |                          ^
     732 |                         .crc32 = count,
         |                                  ~~~~~
   1 warning generated.


vim +/count +731 kernel/trace/trace_output.c

   710	
   711	static int __maybe_unused _trace_kho_write_events(void *fdt)
   712	{
   713		struct trace_event_call *call;
   714		int count = __TRACE_LAST_TYPE - 1;
   715		struct trace_event_map *map;
   716		int err = 0;
   717		int i;
   718	
   719		down_read(&trace_event_sem);
   720		/* Allocate an array that we can place all maps into */
   721		list_for_each_entry(call, &ftrace_events, list)
   722			count++;
   723	
   724		map = vmalloc(count * sizeof(*map));
   725		if (!map)
   726			return -ENOMEM;
   727	
   728		/* Then fill the array with all crc32 values */
   729		count = 0;
   730		for (i = 1; i < __TRACE_LAST_TYPE; i++)
 > 731			map[count++] = (struct trace_event_map) {
   732				.crc32 = count,
   733				.type = count,
   734			};
   735	
   736		list_for_each_entry(call, &ftrace_events, list) {
   737			struct trace_event *event = &call->event;
   738	
   739			map[count++] = (struct trace_event_map) {
   740				.crc32 = event2fp(event),
   741				.type = event->type,
   742			};
   743		}
   744		up_read(&trace_event_sem);
   745	
   746		/* And finally write it into a DT variable */
   747		err |= fdt_property(fdt, "events", map, count * sizeof(*map));
   748	
   749		vfree(map);
   750		return err;
   751	}
   752	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux