public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [PATCH RFC v3 3/9] fdt-select-board: Add test tool for selecting dtbs based on board-id
       [not found] <20240521-board-ids-v3-3-e6c71d05f4d2@quicinc.com>
@ 2024-05-22 10:30 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-05-22 10:30 UTC (permalink / raw)
  To: Elliot Berman; +Cc: llvm, oe-kbuild-all

Hi Elliot,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:

[auto build test WARNING on e8f897f4afef0031fe618a8e94127a0934896aba]

url:    https://github.com/intel-lab-lkp/linux/commits/Elliot-Berman/libfdt-board-id-Implement-board-id-scoring/20240522-024327
base:   e8f897f4afef0031fe618a8e94127a0934896aba
patch link:    https://lore.kernel.org/r/20240521-board-ids-v3-3-e6c71d05f4d2%40quicinc.com
patch subject: [PATCH RFC v3 3/9] fdt-select-board: Add test tool for selecting dtbs based on board-id
config: riscv-defconfig (https://download.01.org/0day-ci/archive/20240522/202405221814.0p3cU5R2-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project fa9b1be45088dce1e4b602d451f118128b94237b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240522/202405221814.0p3cU5R2-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405221814.0p3cU5R2-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> scripts/dtc/fdt-select-board.c:119:8: warning: passing 'const void *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
     119 |                 free(fdt);
         |                      ^~~
   /usr/include/stdlib.h:687:25: note: passing argument to parameter '__ptr' here
     687 | extern void free (void *__ptr) __THROW;
         |                         ^
   1 warning generated.
--
>> scripts/dtc/fdt-select-board.c:119:8: warning: passing 'const void *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
     119 |                 free(fdt);
         |                      ^~~
   /usr/include/stdlib.h:687:25: note: passing argument to parameter '__ptr' here
     687 | extern void free (void *__ptr) __THROW;
         |                         ^
   1 warning generated.
   In file included from arch/riscv/kernel/asm-offsets.c:10:
   In file included from include/linux/mm.h:2188:
   include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     522 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   1 warning generated.


vim +119 scripts/dtc/fdt-select-board.c

    48	
    49	int main(int argc, char *argv[])
    50	{
    51		int opt;
    52		char *input_filename = NULL;
    53		const void *fdt;
    54		const void *ref;
    55		int ref_node;
    56		int max_score = -1;
    57		const char *best_match = NULL;
    58		struct context ctx;
    59		int all = 0;
    60	
    61		while ((opt = util_getopt_long()) != EOF) {
    62			switch (opt) {
    63			case_USAGE_COMMON_FLAGS
    64	
    65			case 'a':
    66				all = 1;
    67				break;
    68			case 'r':
    69				input_filename = optarg;
    70				break;
    71			case 'v':
    72				verbose = 1;
    73				break;
    74			}
    75		}
    76	
    77		if (!input_filename)
    78			usage("missing reference file");
    79	
    80		argv += optind;
    81		argc -= optind;
    82	
    83		if (argc <= 0)
    84			usage("missing candidate dtbs");
    85	
    86		ref = utilfdt_read(input_filename, NULL);
    87		if (!ref) {
    88			fprintf(stderr, "failed to read reference %s\n", input_filename);
    89			return -1;
    90		}
    91	
    92		ref_node = fdt_path_offset(ref, "/board-id");
    93		if (ref_node < 0) {
    94			fprintf(stderr, "reference blob doesn't have a board-id\n");
    95			return -1;
    96		}
    97	
    98		ctx.fdt = ref;
    99		ctx.node = ref_node;
   100	
   101		for (; argc > 0; --argc, ++argv) {
   102			int score;
   103	
   104			fdt = utilfdt_read(*argv, NULL);
   105			if (!fdt) {
   106				fprintf(stderr, "failed to read %s\n", *argv);
   107				return -1;
   108			}
   109	
   110			score = fdt_board_id_score(fdt, get_board_id, &ctx);
   111			if (verbose || (score > 0 && all))
   112				printf("%s: %d\n", *argv, score);
   113	
   114			if (score > max_score) {
   115				max_score = score;
   116				best_match = *argv;
   117			}
   118	
 > 119			free(fdt);

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-22 10:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20240521-board-ids-v3-3-e6c71d05f4d2@quicinc.com>
2024-05-22 10:30 ` [PATCH RFC v3 3/9] fdt-select-board: Add test tool for selecting dtbs based on board-id kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox