Skip to contentSkip to conversation

lib/test_objagg.c:923 test_hints_case2() error: uninitialized symbol 'errmsg'.

PATCH kernel test robot 1 participant 1 message Jun 28, 2025

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw

BCC: [email protected]
CC: [email protected]
TO: Arnd Bergmann <[email protected]>
CC: Andrew Morton <[email protected]>
CC: Linux Memory Management List <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   2aeda9592360c200085898a258c4754bfe879921
commit: 8c8f1e89eb88d49b5bf26eca8185505c18bbbcdf [4213/4739] lib: test_objagg: split test_hints_case() into two functions

:::::: branch date: 21 hours ago
:::::: commit date: 5 days ago
config: powerpc64-randconfig-r072-20250627 (https://download.01.org/0day-ci/archive/20250628/[email protected]/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project e04c938cc08a90ae60440ce22d072ebc69d67ee8)

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 <[email protected]>
| Reported-by: Dan Carpenter <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

smatch warnings:
lib/test_objagg.c:923 test_hints_case2() error: uninitialized symbol 'errmsg'.

vim +/errmsg +923 lib/test_objagg.c

9069a3817d82b0 Jiri Pirko    2019-02-07  908  
8c8f1e89eb88d4 Arnd Bergmann 2025-06-20  909  static int test_hints_case2(const struct hints_case *hints_case,
8c8f1e89eb88d4 Arnd Bergmann 2025-06-20  910  			    struct objagg_hints *hints, struct objagg *objagg)
9069a3817d82b0 Jiri Pirko    2019-02-07  911  {
9069a3817d82b0 Jiri Pirko    2019-02-07  912  	struct objagg_obj *objagg_obj;
9069a3817d82b0 Jiri Pirko    2019-02-07  913  	struct world world2 = {};
9069a3817d82b0 Jiri Pirko    2019-02-07  914  	struct objagg *objagg2;
9069a3817d82b0 Jiri Pirko    2019-02-07  915  	const char *errmsg;
9069a3817d82b0 Jiri Pirko    2019-02-07  916  	int i;
9069a3817d82b0 Jiri Pirko    2019-02-07  917  	int err;
9069a3817d82b0 Jiri Pirko    2019-02-07  918  
9069a3817d82b0 Jiri Pirko    2019-02-07  919  	pr_debug_hints_stats(hints);
9069a3817d82b0 Jiri Pirko    2019-02-07  920  	err = check_expect_hints_stats(hints, &hints_case->expect_stats_hints,
9069a3817d82b0 Jiri Pirko    2019-02-07  921  				       &errmsg);
9069a3817d82b0 Jiri Pirko    2019-02-07  922  	if (err) {
9069a3817d82b0 Jiri Pirko    2019-02-07 @923  		pr_err("Hints stats: %s\n", errmsg);
8c8f1e89eb88d4 Arnd Bergmann 2025-06-20  924  		return err;
9069a3817d82b0 Jiri Pirko    2019-02-07  925  	}
9069a3817d82b0 Jiri Pirko    2019-02-07  926  
9069a3817d82b0 Jiri Pirko    2019-02-07  927  	objagg2 = objagg_create(&delta_ops, hints, &world2);
951d3d6fcd72f1 Dan Carpenter 2019-02-13  928  	if (IS_ERR(objagg2))
951d3d6fcd72f1 Dan Carpenter 2019-02-13  929  		return PTR_ERR(objagg2);
9069a3817d82b0 Jiri Pirko    2019-02-07  930  
9069a3817d82b0 Jiri Pirko    2019-02-07  931  	for (i = 0; i < hints_case->key_ids_count; i++) {
9069a3817d82b0 Jiri Pirko    2019-02-07  932  		objagg_obj = world_obj_get(&world2, objagg2,
9069a3817d82b0 Jiri Pirko    2019-02-07  933  					   hints_case->key_ids[i]);
9069a3817d82b0 Jiri Pirko    2019-02-07  934  		if (IS_ERR(objagg_obj)) {
9069a3817d82b0 Jiri Pirko    2019-02-07  935  			err = PTR_ERR(objagg_obj);
9069a3817d82b0 Jiri Pirko    2019-02-07  936  			goto err_world2_obj_get;
9069a3817d82b0 Jiri Pirko    2019-02-07  937  		}
9069a3817d82b0 Jiri Pirko    2019-02-07  938  	}
9069a3817d82b0 Jiri Pirko    2019-02-07  939  
9069a3817d82b0 Jiri Pirko    2019-02-07  940  	pr_debug_stats(objagg2);
9069a3817d82b0 Jiri Pirko    2019-02-07  941  	err = check_expect_stats(objagg2, &hints_case->expect_stats_hints,
9069a3817d82b0 Jiri Pirko    2019-02-07  942  				 &errmsg);
9069a3817d82b0 Jiri Pirko    2019-02-07  943  	if (err) {
9069a3817d82b0 Jiri Pirko    2019-02-07  944  		pr_err("Stats2: %s\n", errmsg);
9069a3817d82b0 Jiri Pirko    2019-02-07  945  		goto err_check_expect_stats2;
9069a3817d82b0 Jiri Pirko    2019-02-07  946  	}
9069a3817d82b0 Jiri Pirko    2019-02-07  947  
9069a3817d82b0 Jiri Pirko    2019-02-07  948  	err = 0;
9069a3817d82b0 Jiri Pirko    2019-02-07  949  
9069a3817d82b0 Jiri Pirko    2019-02-07  950  err_check_expect_stats2:
9069a3817d82b0 Jiri Pirko    2019-02-07  951  err_world2_obj_get:
9069a3817d82b0 Jiri Pirko    2019-02-07  952  	for (i--; i >= 0; i--)
9069a3817d82b0 Jiri Pirko    2019-02-07  953  		world_obj_put(&world2, objagg, hints_case->key_ids[i]);
9069a3817d82b0 Jiri Pirko    2019-02-07  954  	i = hints_case->key_ids_count;
a6379f0ad6375a Aditya Pakki  2020-06-12  955  	objagg_destroy(objagg2);
8c8f1e89eb88d4 Arnd Bergmann 2025-06-20  956  
8c8f1e89eb88d4 Arnd Bergmann 2025-06-20  957  	return err;
8c8f1e89eb88d4 Arnd Bergmann 2025-06-20  958  }
8c8f1e89eb88d4 Arnd Bergmann 2025-06-20  959  

:::::: The code at line 923 was first introduced by commit
:::::: 9069a3817d82b01b3a55da382c774e3575946130 lib: objagg: implement optimization hints assembly and use hints for object creation

:::::: TO: Jiri Pirko <[email protected]>
:::::: CC: David S. Miller <[email protected]>

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