Re: [PATCH] gcov: use memcpy for counter value dump in convert_to_gcda
From: kernel test robot
Date: Wed Sep 02 2026 - 21:07:14 EST
Hi Bradley,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master v7.3-rc1 next-20260902]
[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/Bradley-Morgan/gcov-use-memcpy-for-counter-value-dump-in-convert_to_gcda/20260901-090622
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20260901090622.18431-1-include%40grrlz.net
patch subject: [PATCH] gcov: use memcpy for counter value dump in convert_to_gcda
config: alpha-randconfig-r061-20260903 (https://download.01.org/0day-ci/archive/20260903/202609030814.OqCixUGW-lkp@xxxxxxxxx/config)
compiler: alpha-linux-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260903/202609030814.OqCixUGW-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/202609030814.OqCixUGW-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
kernel/gcov/gcc_4_7.c: In function 'convert_to_gcda':
>> kernel/gcov/gcc_4_7.c:389:15: warning: unused variable 'cv_idx' [-Wunused-variable]
389 | unsigned int cv_idx;
| ^~~~~~
vim +/cv_idx +389 kernel/gcov/gcc_4_7.c
5f41ea0386a534 Frantisek Hrbata 2013-11-12 375
5f41ea0386a534 Frantisek Hrbata 2013-11-12 376 /**
5f41ea0386a534 Frantisek Hrbata 2013-11-12 377 * convert_to_gcda - convert profiling data set to gcda file format
5f41ea0386a534 Frantisek Hrbata 2013-11-12 378 * @buffer: the buffer to store file data or %NULL if no data should be stored
5f41ea0386a534 Frantisek Hrbata 2013-11-12 379 * @info: profiling data set to be converted
5f41ea0386a534 Frantisek Hrbata 2013-11-12 380 *
5f41ea0386a534 Frantisek Hrbata 2013-11-12 381 * Returns the number of bytes that were/would have been stored into the buffer.
5f41ea0386a534 Frantisek Hrbata 2013-11-12 382 */
7a1d55b987dfcb Johannes Berg 2021-05-06 383 size_t convert_to_gcda(char *buffer, struct gcov_info *info)
5f41ea0386a534 Frantisek Hrbata 2013-11-12 384 {
5f41ea0386a534 Frantisek Hrbata 2013-11-12 385 struct gcov_fn_info *fi_ptr;
5f41ea0386a534 Frantisek Hrbata 2013-11-12 386 struct gcov_ctr_info *ci_ptr;
5f41ea0386a534 Frantisek Hrbata 2013-11-12 387 unsigned int fi_idx;
5f41ea0386a534 Frantisek Hrbata 2013-11-12 388 unsigned int ct_idx;
5f41ea0386a534 Frantisek Hrbata 2013-11-12 @389 unsigned int cv_idx;
5f41ea0386a534 Frantisek Hrbata 2013-11-12 390 size_t pos = 0;
5f41ea0386a534 Frantisek Hrbata 2013-11-12 391
5f41ea0386a534 Frantisek Hrbata 2013-11-12 392 /* File header. */
5f41ea0386a534 Frantisek Hrbata 2013-11-12 393 pos += store_gcov_u32(buffer, pos, GCOV_DATA_MAGIC);
5f41ea0386a534 Frantisek Hrbata 2013-11-12 394 pos += store_gcov_u32(buffer, pos, info->version);
5f41ea0386a534 Frantisek Hrbata 2013-11-12 395 pos += store_gcov_u32(buffer, pos, info->stamp);
5f41ea0386a534 Frantisek Hrbata 2013-11-12 396
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki