Hi Florian,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    
https://github.com/0day-ci/linux/commits/Florian-Fainelli/of-mdio-Fall-back-to-mdiobus_register-with-np-is-NULL/20180516-203317
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-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
        make.cross ARCH=arm 

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

     .runtime_suspend = suspend_fn, \
                        ^~~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:527:21: note: (near initialization 
for 'davinci_mdio_pm_ops.runtime_suspend')
     SET_RUNTIME_PM_OPS(davinci_mdio_runtime_suspend,
                        ^
   include/linux/pm.h:354:21: note: in definition of macro 'SET_RUNTIME_PM_OPS'
     .runtime_suspend = suspend_fn, \
                        ^~~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:528:7: error: initializer element is 
not constant
          davinci_mdio_runtime_resume, NULL)
          ^
   include/linux/pm.h:355:20: note: in definition of macro 'SET_RUNTIME_PM_OPS'
     .runtime_resume = resume_fn, \
                       ^~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:528:7: note: (near initialization 
for 'davinci_mdio_pm_ops.runtime_resume')
          davinci_mdio_runtime_resume, NULL)
          ^
   include/linux/pm.h:355:20: note: in definition of macro 'SET_RUNTIME_PM_OPS'
     .runtime_resume = resume_fn, \
                       ^~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:529:31: error: initializer element 
is not constant
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                  ^
   include/linux/pm.h:330:18: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .suspend_late = suspend_fn, \
                     ^~~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:529:31: note: (near initialization 
for 'davinci_mdio_pm_ops.suspend_late')
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                  ^
   include/linux/pm.h:330:18: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .suspend_late = suspend_fn, \
                     ^~~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:529:53: error: initializer element 
is not constant
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                                        ^
   include/linux/pm.h:331:18: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .resume_early = resume_fn, \
                     ^~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:529:53: note: (near initialization 
for 'davinci_mdio_pm_ops.resume_early')
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                                        ^
   include/linux/pm.h:331:18: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .resume_early = resume_fn, \
                     ^~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:529:31: error: initializer element 
is not constant
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                  ^
   include/linux/pm.h:332:17: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .freeze_late = suspend_fn, \
                    ^~~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:529:31: note: (near initialization 
for 'davinci_mdio_pm_ops.freeze_late')
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                  ^
   include/linux/pm.h:332:17: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .freeze_late = suspend_fn, \
                    ^~~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:529:53: error: initializer element 
is not constant
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                                        ^
   include/linux/pm.h:333:16: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .thaw_early = resume_fn, \
                   ^~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:529:53: note: (near initialization 
for 'davinci_mdio_pm_ops.thaw_early')
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                                        ^
   include/linux/pm.h:333:16: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .thaw_early = resume_fn, \
                   ^~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:529:31: error: initializer element 
is not constant
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                  ^
   include/linux/pm.h:334:19: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .poweroff_late = suspend_fn, \
                      ^~~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:529:31: note: (near initialization 
for 'davinci_mdio_pm_ops.poweroff_late')
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                  ^
   include/linux/pm.h:334:19: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .poweroff_late = suspend_fn, \
                      ^~~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:529:53: error: initializer element 
is not constant
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                                        ^
   include/linux/pm.h:335:19: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .restore_early = resume_fn,
                      ^~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:529:53: note: (near initialization 
for 'davinci_mdio_pm_ops.restore_early')
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                                        ^
   include/linux/pm.h:335:19: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .restore_early = resume_fn,
                      ^~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:539:12: error: initializer element 
is not constant
     .remove = davinci_mdio_remove,
               ^~~~~~~~~~~~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:539:12: note: (near initialization 
for 'davinci_mdio_driver.remove')
   drivers/net//ethernet/ti/davinci_mdio.c:542:19: error: invalid storage class 
for function 'davinci_mdio_init'
    static int __init davinci_mdio_init(void)
                      ^~~~~~~~~~~~~~~~~
   In file included from drivers/net//ethernet/ti/davinci_mdio.c:27:0:
>> include/linux/module.h:130:42: error: invalid storage class for function 
>> '__inittest'
     static inline initcall_t __maybe_unused __inittest(void)  \
                                             ^
   include/linux/module.h:120:30: note: in expansion of macro 'module_init'
    #define device_initcall(fn)  module_init(fn)
                                 ^~~~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:546:1: note: in expansion of macro 
'device_initcall'
    device_initcall(davinci_mdio_init);
    ^~~~~~~~~~~~~~~
>> drivers/net//ethernet/ti/davinci_mdio.c:546:1: warning: 'alias' attribute 
>> ignored [-Wattributes]
   drivers/net//ethernet/ti/davinci_mdio.c:548:20: error: invalid storage class 
for function 'davinci_mdio_exit'
    static void __exit davinci_mdio_exit(void)
                       ^~~~~~~~~~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:548:1: warning: ISO C90 forbids 
mixed declarations and code [-Wdeclaration-after-statement]
    static void __exit davinci_mdio_exit(void)
    ^~~~~~
   In file included from drivers/net//ethernet/ti/davinci_mdio.c:27:0:
>> include/linux/module.h:136:42: error: invalid storage class for function 
>> '__exittest'
     static inline exitcall_t __maybe_unused __exittest(void)  \
                                             ^
   drivers/net//ethernet/ti/davinci_mdio.c:552:1: note: in expansion of macro 
'module_exit'
    module_exit(davinci_mdio_exit);
    ^~~~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:552:1: warning: 'alias' attribute 
ignored [-Wattributes]
   In file included from include/linux/module.h:18:0,
                    from drivers/net//ethernet/ti/davinci_mdio.c:27:
   include/linux/moduleparam.h:22:1: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
    static const char __UNIQUE_ID(name)[]       \
    ^
   include/linux/module.h:161:32: note: in expansion of macro '__MODULE_INFO'
    #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
                                   ^~~~~~~~~~~~~
   include/linux/module.h:199:34: note: in expansion of macro 'MODULE_INFO'
    #define MODULE_LICENSE(_license) MODULE_INFO(license, _license)
                                     ^~~~~~~~~~~
   drivers/net//ethernet/ti/davinci_mdio.c:554:1: note: in expansion of macro 
'MODULE_LICENSE'
    MODULE_LICENSE("GPL");
    ^~~~~~~~~~~~~~
>> drivers/net//ethernet/ti/davinci_mdio.c:555:1: error: expected declaration 
>> or statement at end of input
    MODULE_DESCRIPTION("DaVinci MDIO driver");
    ^~~~~~~~~~~~~~~~~~
   At top level:
   drivers/net//ethernet/ti/davinci_mdio.c:357:12: warning: 
'davinci_mdio_probe' defined but not used [-Wunused-function]
    static int davinci_mdio_probe(struct platform_device *pdev)
               ^~~~~~~~~~~~~~~~~~
--
     .runtime_suspend = suspend_fn, \
                        ^~~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:527:21: note: (near initialization 
for 'davinci_mdio_pm_ops.runtime_suspend')
     SET_RUNTIME_PM_OPS(davinci_mdio_runtime_suspend,
                        ^
   include/linux/pm.h:354:21: note: in definition of macro 'SET_RUNTIME_PM_OPS'
     .runtime_suspend = suspend_fn, \
                        ^~~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:528:7: error: initializer element is 
not constant
          davinci_mdio_runtime_resume, NULL)
          ^
   include/linux/pm.h:355:20: note: in definition of macro 'SET_RUNTIME_PM_OPS'
     .runtime_resume = resume_fn, \
                       ^~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:528:7: note: (near initialization for 
'davinci_mdio_pm_ops.runtime_resume')
          davinci_mdio_runtime_resume, NULL)
          ^
   include/linux/pm.h:355:20: note: in definition of macro 'SET_RUNTIME_PM_OPS'
     .runtime_resume = resume_fn, \
                       ^~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:529:31: error: initializer element is 
not constant
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                  ^
   include/linux/pm.h:330:18: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .suspend_late = suspend_fn, \
                     ^~~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:529:31: note: (near initialization 
for 'davinci_mdio_pm_ops.suspend_late')
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                  ^
   include/linux/pm.h:330:18: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .suspend_late = suspend_fn, \
                     ^~~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:529:53: error: initializer element is 
not constant
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                                        ^
   include/linux/pm.h:331:18: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .resume_early = resume_fn, \
                     ^~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:529:53: note: (near initialization 
for 'davinci_mdio_pm_ops.resume_early')
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                                        ^
   include/linux/pm.h:331:18: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .resume_early = resume_fn, \
                     ^~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:529:31: error: initializer element is 
not constant
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                  ^
   include/linux/pm.h:332:17: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .freeze_late = suspend_fn, \
                    ^~~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:529:31: note: (near initialization 
for 'davinci_mdio_pm_ops.freeze_late')
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                  ^
   include/linux/pm.h:332:17: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .freeze_late = suspend_fn, \
                    ^~~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:529:53: error: initializer element is 
not constant
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                                        ^
   include/linux/pm.h:333:16: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .thaw_early = resume_fn, \
                   ^~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:529:53: note: (near initialization 
for 'davinci_mdio_pm_ops.thaw_early')
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                                        ^
   include/linux/pm.h:333:16: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .thaw_early = resume_fn, \
                   ^~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:529:31: error: initializer element is 
not constant
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                  ^
   include/linux/pm.h:334:19: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .poweroff_late = suspend_fn, \
                      ^~~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:529:31: note: (near initialization 
for 'davinci_mdio_pm_ops.poweroff_late')
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                  ^
   include/linux/pm.h:334:19: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .poweroff_late = suspend_fn, \
                      ^~~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:529:53: error: initializer element is 
not constant
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                                        ^
   include/linux/pm.h:335:19: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .restore_early = resume_fn,
                      ^~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:529:53: note: (near initialization 
for 'davinci_mdio_pm_ops.restore_early')
     SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
                                                        ^
   include/linux/pm.h:335:19: note: in definition of macro 
'SET_LATE_SYSTEM_SLEEP_PM_OPS'
     .restore_early = resume_fn,
                      ^~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:539:12: error: initializer element is 
not constant
     .remove = davinci_mdio_remove,
               ^~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:539:12: note: (near initialization 
for 'davinci_mdio_driver.remove')
   drivers/net/ethernet/ti/davinci_mdio.c:542:19: error: invalid storage class 
for function 'davinci_mdio_init'
    static int __init davinci_mdio_init(void)
                      ^~~~~~~~~~~~~~~~~
   In file included from drivers/net/ethernet/ti/davinci_mdio.c:27:0:
>> include/linux/module.h:130:42: error: invalid storage class for function 
>> '__inittest'
     static inline initcall_t __maybe_unused __inittest(void)  \
                                             ^
   include/linux/module.h:120:30: note: in expansion of macro 'module_init'
    #define device_initcall(fn)  module_init(fn)
                                 ^~~~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:546:1: note: in expansion of macro 
'device_initcall'
    device_initcall(davinci_mdio_init);
    ^~~~~~~~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:546:1: warning: 'alias' attribute 
ignored [-Wattributes]
   drivers/net/ethernet/ti/davinci_mdio.c:548:20: error: invalid storage class 
for function 'davinci_mdio_exit'
    static void __exit davinci_mdio_exit(void)
                       ^~~~~~~~~~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:548:1: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
    static void __exit davinci_mdio_exit(void)
    ^~~~~~
   In file included from drivers/net/ethernet/ti/davinci_mdio.c:27:0:
>> include/linux/module.h:136:42: error: invalid storage class for function 
>> '__exittest'
     static inline exitcall_t __maybe_unused __exittest(void)  \
                                             ^
   drivers/net/ethernet/ti/davinci_mdio.c:552:1: note: in expansion of macro 
'module_exit'
    module_exit(davinci_mdio_exit);
    ^~~~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:552:1: warning: 'alias' attribute 
ignored [-Wattributes]
   In file included from include/linux/module.h:18:0,
                    from drivers/net/ethernet/ti/davinci_mdio.c:27:
   include/linux/moduleparam.h:22:1: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
    static const char __UNIQUE_ID(name)[]       \
    ^
   include/linux/module.h:161:32: note: in expansion of macro '__MODULE_INFO'
    #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
                                   ^~~~~~~~~~~~~
   include/linux/module.h:199:34: note: in expansion of macro 'MODULE_INFO'
    #define MODULE_LICENSE(_license) MODULE_INFO(license, _license)
                                     ^~~~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:554:1: note: in expansion of macro 
'MODULE_LICENSE'
    MODULE_LICENSE("GPL");
    ^~~~~~~~~~~~~~
   drivers/net/ethernet/ti/davinci_mdio.c:555:1: error: expected declaration or 
statement at end of input
    MODULE_DESCRIPTION("DaVinci MDIO driver");
    ^~~~~~~~~~~~~~~~~~
   At top level:
   drivers/net/ethernet/ti/davinci_mdio.c:357:12: warning: 'davinci_mdio_probe' 
defined but not used [-Wunused-function]
    static int davinci_mdio_probe(struct platform_device *pdev)
               ^~~~~~~~~~~~~~~~~~

vim +/__inittest +130 include/linux/module.h

0fd972a7 Paul Gortmaker 2015-05-01  127  
0fd972a7 Paul Gortmaker 2015-05-01  128  /* Each module must use one 
module_init(). */
0fd972a7 Paul Gortmaker 2015-05-01  129  #define module_init(initfn)            
                        \
1f318a8b Arnd Bergmann  2017-02-01 @130         static inline initcall_t 
__maybe_unused __inittest(void)                \
0fd972a7 Paul Gortmaker 2015-05-01  131         { return initfn; }              
                        \
0fd972a7 Paul Gortmaker 2015-05-01  132         int init_module(void) 
__attribute__((alias(#initfn)));
0fd972a7 Paul Gortmaker 2015-05-01  133  
0fd972a7 Paul Gortmaker 2015-05-01  134  /* This is only required if you want 
to be unloadable. */
0fd972a7 Paul Gortmaker 2015-05-01  135  #define module_exit(exitfn)            
                        \
1f318a8b Arnd Bergmann  2017-02-01 @136         static inline exitcall_t 
__maybe_unused __exittest(void)                \
0fd972a7 Paul Gortmaker 2015-05-01  137         { return exitfn; }              
                        \
0fd972a7 Paul Gortmaker 2015-05-01  138         void cleanup_module(void) 
__attribute__((alias(#exitfn)));
0fd972a7 Paul Gortmaker 2015-05-01  139  

:::::: The code at line 130 was first introduced by commit
:::::: 1f318a8bafcfba9f0d623f4870c4e890fd22e659 modules: mark 
__inittest/__exittest as __maybe_unused

:::::: TO: Arnd Bergmann <a...@arndb.de>
:::::: CC: Jessica Yu <j...@redhat.com>

---
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