Re: [PATCH V6 3/8] misc/pvpanic: add MMIO support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Peng,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on v4.19 next-20181102]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Peng-Hao/pvpanic-move-pvpanic-to-misc-as-common-driver/20181102-124907
config: openrisc-allyesconfig (attached as .config)
compiler: or1k-linux-gcc (GCC) 6.0.0 20160327 (experimental)
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=openrisc 

All errors (new ones prefixed by >>):

   drivers//misc/pvpanic.c:36:36: error: array type has incomplete element type 'struct acpi_device_id'
    static const struct acpi_device_id pvpanic_device_ids[] = {
                                       ^~~~~~~~~~~~~~~~~~
   drivers//misc/pvpanic.c:46:15: error: variable 'pvpanic_driver' has initializer but incomplete type
    static struct acpi_driver pvpanic_driver = {
                  ^~~~~~~~~~~
   drivers//misc/pvpanic.c:47:2: error: unknown field 'name' specified in initializer
     .name =  "pvpanic",
     ^
   drivers//misc/pvpanic.c:47:11: warning: excess elements in struct initializer
     .name =  "pvpanic",
              ^~~~~~~~~
   drivers//misc/pvpanic.c:47:11: note: (near initialization for 'pvpanic_driver')
   drivers//misc/pvpanic.c:48:2: error: unknown field 'class' specified in initializer
     .class = "QEMU",
     ^
   drivers//misc/pvpanic.c:48:11: warning: excess elements in struct initializer
     .class = "QEMU",
              ^~~~~~
   drivers//misc/pvpanic.c:48:11: note: (near initialization for 'pvpanic_driver')
   drivers//misc/pvpanic.c:49:2: error: unknown field 'ids' specified in initializer
     .ids =  pvpanic_device_ids,
     ^
   drivers//misc/pvpanic.c:49:10: warning: excess elements in struct initializer
     .ids =  pvpanic_device_ids,
             ^~~~~~~~~~~~~~~~~~
   drivers//misc/pvpanic.c:49:10: note: (near initialization for 'pvpanic_driver')
   drivers//misc/pvpanic.c:50:2: error: unknown field 'ops' specified in initializer
     .ops =  {
     ^
   drivers//misc/pvpanic.c:50:10: error: extra brace group at end of initializer
     .ops =  {
             ^
   drivers//misc/pvpanic.c:50:10: note: (near initialization for 'pvpanic_driver')
   drivers//misc/pvpanic.c:50:10: warning: excess elements in struct initializer
   drivers//misc/pvpanic.c:50:10: note: (near initialization for 'pvpanic_driver')
   drivers//misc/pvpanic.c:54:2: error: unknown field 'owner' specified in initializer
     .owner = THIS_MODULE,
     ^
   In file included from include/linux/linkage.h:7:0,
                    from include/linux/kernel.h:7,
                    from drivers//misc/pvpanic.c:23:
   include/linux/export.h:18:21: warning: excess elements in struct initializer
    #define THIS_MODULE ((struct module *)0)
                        ^
   drivers//misc/pvpanic.c:54:11: note: in expansion of macro 'THIS_MODULE'
     .owner = THIS_MODULE,
              ^~~~~~~~~~~
   include/linux/export.h:18:21: note: (near initialization for 'pvpanic_driver')
    #define THIS_MODULE ((struct module *)0)
                        ^
   drivers//misc/pvpanic.c:54:11: note: in expansion of macro 'THIS_MODULE'
     .owner = THIS_MODULE,
              ^~~~~~~~~~~
   drivers//misc/pvpanic.c: In function 'pvpanic_send_event':
   drivers//misc/pvpanic.c:60:2: error: implicit declaration of function 'iowrite8' [-Werror=implicit-function-declaration]
     iowrite8(event, base);
     ^~~~~~~~
   drivers//misc/pvpanic.c: In function 'pvpanic_walk_resources':
   drivers//misc/pvpanic.c:82:6: error: implicit declaration of function 'acpi_dev_resource_io' [-Werror=implicit-function-declaration]
     if (acpi_dev_resource_io(res, &r)) {
         ^~~~~~~~~~~~~~~~~~~~
>> drivers//misc/pvpanic.c:83:27: error: implicit declaration of function 'ioport_map' [-Werror=implicit-function-declaration]
      base = (void __iomem *) ioport_map(r.start,
                              ^~~~~~~~~~
>> drivers//misc/pvpanic.c:86:13: error: implicit declaration of function 'acpi_dev_resource_memory' [-Werror=implicit-function-declaration]
     } else if (acpi_dev_resource_memory(res, &r)) {
                ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers//misc/pvpanic.c:87:10: error: implicit declaration of function 'ioremap' [-Werror=implicit-function-declaration]
      base = ioremap(r.start, r.end - r.start + 1);
             ^~~~~~~
   drivers//misc/pvpanic.c:87:8: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
      base = ioremap(r.start, r.end - r.start + 1);
           ^
   drivers//misc/pvpanic.c: In function 'pvpanic_add':
   drivers//misc/pvpanic.c:98:8: error: implicit declaration of function 'acpi_bus_get_status' [-Werror=implicit-function-declaration]
     ret = acpi_bus_get_status(device);
           ^~~~~~~~~~~~~~~~~~~
   drivers//misc/pvpanic.c:102:13: error: dereferencing pointer to incomplete type 'struct acpi_device'
     if (!device->status.enabled || !device->status.functional)
                ^~
   drivers//misc/pvpanic.c: In function 'pvpanic_remove':
   drivers//misc/pvpanic.c:122:2: error: implicit declaration of function 'iounmap' [-Werror=implicit-function-declaration]
     iounmap(base);
     ^~~~~~~
   drivers//misc/pvpanic.c: At top level:
   drivers//misc/pvpanic.c:127:1: warning: data definition has no type or storage class
    module_acpi_driver(pvpanic_driver);
    ^~~~~~~~~~~~~~~~~~
   drivers//misc/pvpanic.c:127:1: error: type defaults to 'int' in declaration of 'module_acpi_driver' [-Werror=implicit-int]
   drivers//misc/pvpanic.c:127:1: warning: parameter names (without types) in function declaration
   drivers//misc/pvpanic.c:46:27: error: storage size of 'pvpanic_driver' isn't known
    static struct acpi_driver pvpanic_driver = {
                              ^~~~~~~~~~~~~~
   drivers//misc/pvpanic.c:46:27: warning: 'pvpanic_driver' defined but not used [-Wunused-variable]
   drivers//misc/pvpanic.c:36:36: warning: 'pvpanic_device_ids' defined but not used [-Wunused-variable]
    static const struct acpi_device_id pvpanic_device_ids[] = {
                                       ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/ioport_map +83 drivers//misc/pvpanic.c

    56	
    57	static void
    58	pvpanic_send_event(unsigned int event)
    59	{
  > 60		iowrite8(event, base);
    61	}
    62	
    63	static int
    64	pvpanic_panic_notify(struct notifier_block *nb, unsigned long code,
    65			     void *unused)
    66	{
    67		pvpanic_send_event(PVPANIC_PANICKED);
    68		return NOTIFY_DONE;
    69	}
    70	
    71	static struct notifier_block pvpanic_panic_nb = {
    72		.notifier_call = pvpanic_panic_notify,
    73		.priority = 1, /* let this called before broken drm_fb_helper */
    74	};
    75	
    76	
    77	static acpi_status
    78	pvpanic_walk_resources(struct acpi_resource *res, void *context)
    79	{
    80		struct resource r;
    81	
  > 82		if (acpi_dev_resource_io(res, &r)) {
  > 83			base = (void __iomem *) ioport_map(r.start,
    84						r.end - r.start + 1);
    85			return AE_OK;
  > 86		} else if (acpi_dev_resource_memory(res, &r)) {
    87			base = ioremap(r.start, r.end - r.start + 1);
    88			return AE_OK;
    89		}
    90	
    91		return AE_ERROR;
    92	}
    93	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux