Hi David,

[auto build test WARNING on chanwoo-extcon/extcon-next]
[also build test WARNING on v4.9 next-20161216]
[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/Hans-de-Goede/extcon-3gpio-add-driver-for-USB-OTG-port-controlled-by-3-GPIOs/20161219-082834
base:   https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon.git 
extcon-next
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=alpha 

All warnings (new ones prefixed by >>):

   drivers/extcon/extcon-3gpio_otg.c:185:1: warning: data definition has no 
type or storage class
    MODULE_DEVICE_TABLE(acpi, usb_otg_acpi_match);
    ^~~~~~~~~~~~~~~~~~~
   drivers/extcon/extcon-3gpio_otg.c:185:1: error: type defaults to 'int' in 
declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int]
   drivers/extcon/extcon-3gpio_otg.c:185:1: warning: parameter names (without 
types) in function declaration
   In file included from include/linux/acpi.h:27:0,
                    from drivers/extcon/extcon-3gpio_otg.c:21:
   include/linux/device.h:1353:1: warning: data definition has no type or 
storage class
    module_init(__driver##_init); \
    ^
   include/linux/platform_device.h:228:2: note: in expansion of macro 
'module_driver'
     module_driver(__platform_driver, platform_driver_register, \
     ^~~~~~~~~~~~~
   drivers/extcon/extcon-3gpio_otg.c:197:1: note: in expansion of macro 
'module_platform_driver'
    module_platform_driver(usb_otg_driver);
    ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/device.h:1353:1: error: type defaults to 'int' in declaration 
of 'module_init' [-Werror=implicit-int]
    module_init(__driver##_init); \
    ^
   include/linux/platform_device.h:228:2: note: in expansion of macro 
'module_driver'
     module_driver(__platform_driver, platform_driver_register, \
     ^~~~~~~~~~~~~
   drivers/extcon/extcon-3gpio_otg.c:197:1: note: in expansion of macro 
'module_platform_driver'
    module_platform_driver(usb_otg_driver);
    ^~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:6:0,
                    from include/linux/kernel.h:6,
                    from include/linux/list.h:8,
                    from include/linux/resource_ext.h:17,
                    from include/linux/acpi.h:26,
                    from drivers/extcon/extcon-3gpio_otg.c:21:
>> include/linux/export.h:37:30: warning: parameter names (without types) in 
>> function declaration
    #define THIS_MODULE ((struct module *)0)
                                 ^
>> include/linux/platform_device.h:198:34: note: in expansion of macro 
>> 'THIS_MODULE'
     __platform_driver_register(drv, THIS_MODULE)
                                     ^~~~~~~~~~~
>> include/linux/device.h:1351:9: note: in expansion of macro 
>> 'platform_driver_register'
     return __register(&(__driver) , ##__VA_ARGS__); \
            ^~~~~~~~~~
   include/linux/platform_device.h:228:2: note: in expansion of macro 
'module_driver'
     module_driver(__platform_driver, platform_driver_register, \
     ^~~~~~~~~~~~~
   drivers/extcon/extcon-3gpio_otg.c:197:1: note: in expansion of macro 
'module_platform_driver'
    module_platform_driver(usb_otg_driver);
    ^~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/acpi.h:27:0,
                    from drivers/extcon/extcon-3gpio_otg.c:21:
   include/linux/device.h:1358:1: warning: data definition has no type or 
storage class
    module_exit(__driver##_exit);
    ^
   include/linux/platform_device.h:228:2: note: in expansion of macro 
'module_driver'
     module_driver(__platform_driver, platform_driver_register, \
     ^~~~~~~~~~~~~
   drivers/extcon/extcon-3gpio_otg.c:197:1: note: in expansion of macro 
'module_platform_driver'
    module_platform_driver(usb_otg_driver);
    ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/device.h:1358:1: error: type defaults to 'int' in declaration 
of 'module_exit' [-Werror=implicit-int]
    module_exit(__driver##_exit);
    ^
   include/linux/platform_device.h:228:2: note: in expansion of macro 
'module_driver'
     module_driver(__platform_driver, platform_driver_register, \
     ^~~~~~~~~~~~~
   drivers/extcon/extcon-3gpio_otg.c:197:1: note: in expansion of macro 
'module_platform_driver'
    module_platform_driver(usb_otg_driver);
    ^~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:6:0,
                    from include/linux/kernel.h:6,
                    from include/linux/list.h:8,
                    from include/linux/resource_ext.h:17,
                    from include/linux/acpi.h:26,
                    from drivers/extcon/extcon-3gpio_otg.c:21:
>> include/linux/export.h:37:30: warning: parameter names (without types) in 
>> function declaration
    #define THIS_MODULE ((struct module *)0)
                                 ^
>> include/linux/platform_device.h:198:34: note: in expansion of macro 
>> 'THIS_MODULE'
     __platform_driver_register(drv, THIS_MODULE)
                                     ^~~~~~~~~~~
>> include/linux/device.h:1351:9: note: in expansion of macro 
>> 'platform_driver_register'
     return __register(&(__driver) , ##__VA_ARGS__); \
            ^~~~~~~~~~
   include/linux/platform_device.h:228:2: note: in expansion of macro 
'module_driver'
     module_driver(__platform_driver, platform_driver_register, \
     ^~~~~~~~~~~~~
   drivers/extcon/extcon-3gpio_otg.c:197:1: note: in expansion of macro 
'module_platform_driver'
    module_platform_driver(usb_otg_driver);
    ^~~~~~~~~~~~~~~~~~~~~~
   drivers/extcon/extcon-3gpio_otg.c:199:15: error: expected declaration 
specifiers or '...' before string constant
    MODULE_AUTHOR("Hans de Goede <hdego...@redhat.com>");
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/extcon/extcon-3gpio_otg.c:200:20: error: expected declaration 
specifiers or '...' before string constant
    MODULE_DESCRIPTION("3 GPIO USB OTG extcon driver");
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/extcon/extcon-3gpio_otg.c:201:16: error: expected declaration 
specifiers or '...' before string constant
    MODULE_LICENSE("GPL");
                   ^~~~~
   In file included from include/linux/acpi.h:27:0,
                    from drivers/extcon/extcon-3gpio_otg.c:21:
   drivers/extcon/extcon-3gpio_otg.c:197:24: warning: 'usb_otg_driver_init' 
defined but not used [-Wunused-function]
    module_platform_driver(usb_otg_driver);
                           ^
   include/linux/device.h:1349:19: note: in definition of macro 'module_driver'
    static int __init __driver##_init(void) \
                      ^~~~~~~~
   drivers/extcon/extcon-3gpio_otg.c:197:1: note: in expansion of macro 
'module_platform_driver'
    module_platform_driver(usb_otg_driver);
    ^~~~~~~~~~~~~~~~~~~~~~
   drivers/extcon/extcon-3gpio_otg.c:181:30: warning: 'usb_otg_acpi_match' 
defined but not used [-Wunused-variable]
    static struct acpi_device_id usb_otg_acpi_match[] = {
                                 ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/THIS_MODULE +198 include/linux/platform_device.h

00d3dcdd Russell King     2005-11-09  182       int (*remove)(struct 
platform_device *);
00d3dcdd Russell King     2005-11-09  183       void (*shutdown)(struct 
platform_device *);
00d3dcdd Russell King     2005-11-09  184       int (*suspend)(struct 
platform_device *, pm_message_t state);
00d3dcdd Russell King     2005-11-09  185       int (*resume)(struct 
platform_device *);
00d3dcdd Russell King     2005-11-09  186       struct device_driver driver;
831fad2f Uwe Kleine-König 2010-01-26  187       const struct platform_device_id 
*id_table;
3f9120b0 Johan Hovold     2013-09-23  188       bool prevent_deferred_probe;
00d3dcdd Russell King     2005-11-09  189  };
00d3dcdd Russell King     2005-11-09  190  
10dbc5e3 Rob Herring      2013-04-21  191  #define to_platform_driver(drv)      
(container_of((drv), struct platform_driver, \
10dbc5e3 Rob Herring      2013-04-21  192                                
driver))
10dbc5e3 Rob Herring      2013-04-21  193  
9447057e Libo Chen        2013-05-25  194  /*
9447057e Libo Chen        2013-05-25  195   * use a macro to avoid include 
chaining to get THIS_MODULE
9447057e Libo Chen        2013-05-25  196   */
9447057e Libo Chen        2013-05-25  197  #define 
platform_driver_register(drv) \
9447057e Libo Chen        2013-05-25 @198       __platform_driver_register(drv, 
THIS_MODULE)
9447057e Libo Chen        2013-05-25  199  extern int 
__platform_driver_register(struct platform_driver *,
9447057e Libo Chen        2013-05-25  200                                       
struct module *);
00d3dcdd Russell King     2005-11-09  201  extern void 
platform_driver_unregister(struct platform_driver *);
00d3dcdd Russell King     2005-11-09  202  
c67334fb David Brownell   2006-11-16  203  /* non-hotpluggable platform devices 
may use this so that probe() and
c67334fb David Brownell   2006-11-16  204   * its support may live in __init 
sections, conserving runtime memory.
c67334fb David Brownell   2006-11-16  205   */
c3b50dc2 Wolfram Sang     2014-10-28  206  #define platform_driver_probe(drv, 
probe) \

:::::: The code at line 198 was first introduced by commit
:::::: 9447057eaff871dd7c63c808de761b8732407169 platform_device: use a macro 
instead of platform_driver_register

:::::: TO: Libo Chen <clbchenlibo.c...@huawei.com>
:::::: CC: Greg Kroah-Hartman <gre...@linuxfoundation.org>

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

Attachment: .config.gz
Description: application/gzip

Reply via email to