All of lore.kernel.org
 help / color / mirror / Atom feed
* [jpirko-mlxsw:wip_attestation_pre_rfc_draft1 23/26] drivers/attestation/core/mr.c:57:1: error: static declaration of 'attestation_mr_info_alloc' follows non-static declaration
@ 2026-09-30  7:29 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-30  7:29 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: oe-kbuild-all

tree:   https://github.com/jpirko/linux_mlxsw wip_attestation_pre_rfc_draft1
head:   a18af4e1b514bf11f88ca42d29b7b68f3b375378
commit: 1fbb59be0a8c4b5d5f56b10f397f6b085018733e [23/26] attestation: add core KUnit tests
config: arc-randconfig-r2101-20260930 (https://download.01.org/0day-ci/archive/20260930/202609300905.9hycDcRI-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260930/202609300905.9hycDcRI-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/202609300905.9hycDcRI-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

>> drivers/attestation/core/core.c:247:1: warning: 'attestation_test_find_device' defined but not used [-Wunused-function]
    attestation_test_find_device(const struct ctlv_device *ctlvdev)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
>> drivers/attestation/core/mr.c:57:1: error: static declaration of 'attestation_mr_info_alloc' follows non-static declaration
    attestation_mr_info_alloc(const struct attestation_mr *mr)
    ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/attestation/core/mr.c:10:
   drivers/attestation/core/internal.h:150:1: note: previous declaration of 'attestation_mr_info_alloc' was here
    attestation_mr_info_alloc(const struct attestation_mr *mr);
    ^~~~~~~~~~~~~~~~~~~~~~~~~


vim +/attestation_mr_info_alloc +57 drivers/attestation/core/mr.c

7c3e9198f02658 Jiri Pirko 2026-09-29  54  
1fbb59be0a8c4b Jiri Pirko 2026-09-29  55  VISIBLE_IF_KUNIT
7c3e9198f02658 Jiri Pirko 2026-09-29  56  struct attestation_mr_log_entry_info *
7c3e9198f02658 Jiri Pirko 2026-09-29 @57  attestation_mr_info_alloc(const struct attestation_mr *mr)
7c3e9198f02658 Jiri Pirko 2026-09-29  58  {
7c3e9198f02658 Jiri Pirko 2026-09-29  59  	struct attestation_mr_log_entry_info *info;
7c3e9198f02658 Jiri Pirko 2026-09-29  60  	enum hash_algo *algorithms;
7c3e9198f02658 Jiri Pirko 2026-09-29  61  	char *name;
7c3e9198f02658 Jiri Pirko 2026-09-29  62  
1fbb59be0a8c4b Jiri Pirko 2026-09-29  63  	KUNIT_STATIC_STUB_REDIRECT(attestation_mr_info_alloc, mr);
1fbb59be0a8c4b Jiri Pirko 2026-09-29  64  
7c3e9198f02658 Jiri Pirko 2026-09-29  65  	info = kzalloc_obj(*info, GFP_KERNEL);
7c3e9198f02658 Jiri Pirko 2026-09-29  66  	if (!info)
7c3e9198f02658 Jiri Pirko 2026-09-29  67  		return ERR_PTR(-ENOMEM);
7c3e9198f02658 Jiri Pirko 2026-09-29  68  	name = kstrdup(mr->props->name, GFP_KERNEL);
7c3e9198f02658 Jiri Pirko 2026-09-29  69  	if (!name)
7c3e9198f02658 Jiri Pirko 2026-09-29  70  		goto err_info;
7c3e9198f02658 Jiri Pirko 2026-09-29  71  	algorithms = kmemdup_array(mr->props->algorithms,
7c3e9198f02658 Jiri Pirko 2026-09-29  72  				   mr->props->algorithms_count,
7c3e9198f02658 Jiri Pirko 2026-09-29  73  				   sizeof(*algorithms), GFP_KERNEL);
7c3e9198f02658 Jiri Pirko 2026-09-29  74  	if (!algorithms)
7c3e9198f02658 Jiri Pirko 2026-09-29  75  		goto err_name;
7c3e9198f02658 Jiri Pirko 2026-09-29  76  	info->entry.type = ATTESTATION_MR_LOG_ENTRY_INFO;
7c3e9198f02658 Jiri Pirko 2026-09-29  77  	info->entry.mr_id = mr->props->id;
7c3e9198f02658 Jiri Pirko 2026-09-29  78  	info->props = *mr->props;
7c3e9198f02658 Jiri Pirko 2026-09-29  79  	info->props.name = name;
7c3e9198f02658 Jiri Pirko 2026-09-29  80  	info->props.algorithms = algorithms;
7c3e9198f02658 Jiri Pirko 2026-09-29  81  	return info;
7c3e9198f02658 Jiri Pirko 2026-09-29  82  
7c3e9198f02658 Jiri Pirko 2026-09-29  83  err_name:
7c3e9198f02658 Jiri Pirko 2026-09-29  84  	kfree(name);
7c3e9198f02658 Jiri Pirko 2026-09-29  85  err_info:
7c3e9198f02658 Jiri Pirko 2026-09-29  86  	kfree(info);
7c3e9198f02658 Jiri Pirko 2026-09-29  87  	return ERR_PTR(-ENOMEM);
7c3e9198f02658 Jiri Pirko 2026-09-29  88  }
1fbb59be0a8c4b Jiri Pirko 2026-09-29  89  EXPORT_SYMBOL_IF_KUNIT(attestation_mr_info_alloc);
7c3e9198f02658 Jiri Pirko 2026-09-29  90  

:::::: The code at line 57 was first introduced by commit
:::::: 7c3e9198f02658988c2f0ea335cdfd75b93236e0 attestation: introduce the core framework

:::::: TO: Jiri Pirko <jiri@nvidia.com>
:::::: CC: Jiri Pirko <jiri@nvidia.com>

--
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:[~2026-09-30  7:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-30  7:29 [jpirko-mlxsw:wip_attestation_pre_rfc_draft1 23/26] drivers/attestation/core/mr.c:57:1: error: static declaration of 'attestation_mr_info_alloc' follows non-static declaration kernel test robot

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.