lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201811021530.7T9NspGw%fengguang.wu@intel.com>
Date:   Fri, 2 Nov 2018 15:39:50 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Peng Hao <peng.hao2@....com.cn>
Cc:     kbuild-all@...org, robh+dt@...nel.org, mark.rutland@....com,
        arnd@...db.de, gregkh@...uxfoundation.org, andy@...radead.org,
        dvhart@...radead.org, linux-kernel@...r.kernel.org,
        platform-driver-x86@...r.kernel.org, hutao@...fujitsu.com,
        linux-doc@...r.kernel.org, Peng Hao <peng.hao2@....com.cn>
Subject: Re: [PATCH V6 1/8]  pvpanic: move pvpanic to misc as common driver

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: sh-allyesconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
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
        GCC_VERSION=7.2.0 make.cross ARCH=sh 

All error/warnings (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:3: error: 'struct acpi_driver' has no member named 'name'
     .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:3: error: 'struct acpi_driver' has no member named 'class'
     .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:3: error: 'struct acpi_driver' has no member named 'ids'
     .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:3: error: 'struct acpi_driver' has no member named 'ops'
     .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:3: error: 'struct acpi_driver' has no member named 'owner'
     .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 'outb' [-Werror=implicit-function-declaration]
     outb(event, port);
     ^~~~
   drivers/misc/pvpanic.c: In function 'pvpanic_add':
>> drivers/misc/pvpanic.c:97:8: error: implicit declaration of function 'acpi_bus_get_status'; did you mean 'acpi_get_gpe_status'? [-Werror=implicit-function-declaration]
     ret = acpi_bus_get_status(device);
           ^~~~~~~~~~~~~~~~~~~
           acpi_get_gpe_status
>> drivers/misc/pvpanic.c:101:13: error: dereferencing pointer to incomplete type 'struct acpi_device'
     if (!device->status.enabled || !device->status.functional)
                ^~
   drivers/misc/pvpanic.c: At top level:
   drivers/misc/pvpanic.c:124:1: warning: data definition has no type or storage class
    module_acpi_driver(pvpanic_driver);
    ^~~~~~~~~~~~~~~~~~
   drivers/misc/pvpanic.c:124:1: error: type defaults to 'int' in declaration of 'module_acpi_driver' [-Werror=implicit-int]
   drivers/misc/pvpanic.c:124: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 +/pvpanic_driver +46 drivers/misc/pvpanic.c

8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   35  
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  @36  static const struct acpi_device_id pvpanic_device_ids[] = {
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   37  	{ "QEMU0001", 0 },
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   38  	{ "", 0 },
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   39  };
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   40  MODULE_DEVICE_TABLE(acpi, pvpanic_device_ids);
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   41  
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   42  #define PVPANIC_PANICKED	(1 << 0)
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   43  
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   44  static u16 port;
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   45  
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  @46  static struct acpi_driver pvpanic_driver = {
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  @47  	.name =		"pvpanic",
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  @48  	.class =	"QEMU",
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  @49  	.ids =		pvpanic_device_ids,
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  @50  	.ops =		{
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   51  				.add =		pvpanic_add,
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   52  				.remove =	pvpanic_remove,
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   53  			},
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  @54  	.owner =	THIS_MODULE,
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   55  };
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   56  
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   57  static void
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   58  pvpanic_send_event(unsigned int event)
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   59  {
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  @60  	outb(event, port);
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   61  }
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   62  
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   63  static int
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   64  pvpanic_panic_notify(struct notifier_block *nb, unsigned long code,
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   65  		     void *unused)
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   66  {
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   67  	pvpanic_send_event(PVPANIC_PANICKED);
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   68  	return NOTIFY_DONE;
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   69  }
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   70  
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   71  static struct notifier_block pvpanic_panic_nb = {
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   72  	.notifier_call = pvpanic_panic_notify,
7939831ea drivers/platform/x86/pvpanic.c Takashi Iwai 2014-05-06   73  	.priority = 1, /* let this called before broken drm_fb_helper */
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   74  };
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   75  
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   76  
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   77  static acpi_status
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   78  pvpanic_walk_resources(struct acpi_resource *res, void *context)
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   79  {
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   80  	switch (res->type) {
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   81  	case ACPI_RESOURCE_TYPE_END_TAG:
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   82  		return AE_OK;
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   83  
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   84  	case ACPI_RESOURCE_TYPE_IO:
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   85  		port = res->data.io.minimum;
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   86  		return AE_OK;
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   87  
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   88  	default:
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   89  		return AE_ERROR;
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   90  	}
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   91  }
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   92  
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   93  static int pvpanic_add(struct acpi_device *device)
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   94  {
55cd3f01d drivers/platform/x86/pvpanic.c Radim Krčmář 2015-05-29   95  	int ret;
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08   96  
55cd3f01d drivers/platform/x86/pvpanic.c Radim Krčmář 2015-05-29  @97  	ret = acpi_bus_get_status(device);
55cd3f01d drivers/platform/x86/pvpanic.c Radim Krčmář 2015-05-29   98  	if (ret < 0)
55cd3f01d drivers/platform/x86/pvpanic.c Radim Krčmář 2015-05-29   99  		return ret;
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  100  
55cd3f01d drivers/platform/x86/pvpanic.c Radim Krčmář 2015-05-29 @101  	if (!device->status.enabled || !device->status.functional)
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  102  		return -ENODEV;
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  103  
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  104  	acpi_walk_resources(device->handle, METHOD_NAME__CRS,
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  105  			    pvpanic_walk_resources, NULL);
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  106  
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  107  	if (!port)
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  108  		return -ENODEV;
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  109  
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  110  	atomic_notifier_chain_register(&panic_notifier_list,
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  111  				       &pvpanic_panic_nb);
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  112  
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  113  	return 0;
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  114  }
8b10acd74 drivers/platform/x86/pvpanic.c Hu Tao       2013-05-08  115  

:::::: The code at line 46 was first introduced by commit
:::::: 8b10acd74cdad9063c7a63468e31759d9ac877d9 pvpanic: pvpanic device driver

:::::: TO: Hu Tao <hutao@...fujitsu.com>
:::::: CC: Matthew Garrett <matthew.garrett@...ula.com>

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

Download attachment ".config.gz" of type "application/gzip" (50483 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ