Re: [PATCH v2 1/1] PCI: Add KUnit tests for __pci_read_base()
From: kernel test robot
Date: Wed Nov 17 2021 - 20:16:38 EST
Hi Naveen,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on helgaas-pci/next]
[also build test ERROR on v5.16-rc1 next-20211117]
[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]
url: https://github.com/0day-ci/linux/commits/Naveen-Naidu/PCI-Initial-KUnit-test-fixture-for-resource-assignment/20211115-142802
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: um-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/b8f5b94d52de6904d367ff34aa924593d931a853
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Naveen-Naidu/PCI-Initial-KUnit-test-fixture-for-resource-assignment/20211115-142802
git checkout b8f5b94d52de6904d367ff34aa924593d931a853
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=um SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
>> drivers/pci/pci-read-base-test.c:355:13: error: conflicting types for 'init_registers'
355 | static void init_registers(void)
| ^~~~~~~~~~~~~~
In file included from arch/um/include/asm/processor-generic.h:14,
from arch/x86/um/asm/processor.h:41,
from include/linux/spinlock_up.h:8,
from include/linux/spinlock.h:96,
from include/linux/mm_types.h:9,
from include/linux/buildid.h:5,
from include/linux/module.h:14,
from include/kunit/test.h:15,
from drivers/pci/pci-read-base-test.c:7:
arch/um/include/shared/registers.h:20:12: note: previous declaration of 'init_registers' was here
20 | extern int init_registers(int pid);
| ^~~~~~~~~~~~~~
vim +/init_registers +355 drivers/pci/pci-read-base-test.c
348
349 /*
350 * -----------------------------------------------------------------------
351 * Functions for managing test values
352 * -----------------------------------------------------------------------
353 */
354
> 355 static void init_registers(void)
356 {
357 unsigned int i, array_size;
358 struct config_space_bitfield *type_hdr;
359
360 if (type_header_test_case == PCI_HEADER_TYPE_NORMAL) {
361 type_hdr = type_0_header;
362 array_size = ARRAY_SIZE(type_0_header);
363 } else {
364 type_hdr = type_1_header;
365 array_size = ARRAY_SIZE(type_1_header);
366 }
367
368 for (i = 0; i < array_size; i++, type_hdr++)
369 set_register(type_hdr->offset, type_hdr->value, type_hdr->size);
370 }
371
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip