Message ID | 20210813122932.46152-4-andriy.shevchenko@linux.intel.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [v1,net-next,1/7] ptp_pch: use mac_pton() | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | warning | Series does not have a cover letter |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | success | CCed 2 of 2 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | warning | WARNING: Duplicate signature |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
Hi Andy, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ptp_pch-use-mac_pton/20210813-203135 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git b769cf44ed55f4b277b89cf53df6092f0c9082d0 config: nios2-randconfig-r023-20210813 (attached as .config) compiler: nios2-linux-gcc (GCC) 11.2.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/6c1fff5c80fe8f1a12c20bac2d28ebfa5960bde7 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Andy-Shevchenko/ptp_pch-use-mac_pton/20210813-203135 git checkout 6c1fff5c80fe8f1a12c20bac2d28ebfa5960bde7 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All error/warnings (new ones prefixed by >>): >> drivers/ptp/ptp_pch.c:604:1: warning: data definition has no type or storage class 604 | module_pci_driver(pch_driver); | ^~~~~~~~~~~~~~~~~ >> drivers/ptp/ptp_pch.c:604:1: error: type defaults to 'int' in declaration of 'module_pci_driver' [-Werror=implicit-int] >> drivers/ptp/ptp_pch.c:604:1: warning: parameter names (without types) in function declaration drivers/ptp/ptp_pch.c:597:26: warning: 'pch_driver' defined but not used [-Wunused-variable] 597 | static struct pci_driver pch_driver = { | ^~~~~~~~~~ cc1: some warnings being treated as errors vim +604 drivers/ptp/ptp_pch.c 596 597 static struct pci_driver pch_driver = { 598 .name = KBUILD_MODNAME, 599 .id_table = pch_ieee1588_pcidev_id, 600 .probe = pch_probe, 601 .remove = pch_remove, 602 .driver.pm = &pch_pm_ops, 603 }; > 604 module_pci_driver(pch_driver); 605 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
On Fri, Aug 13, 2021 at 10:34:17PM +0800, kernel test robot wrote: > Hi Andy, > > I love your patch! Yet something to improve: > > [auto build test ERROR on net-next/master] > > url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ptp_pch-use-mac_pton/20210813-203135 > base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git b769cf44ed55f4b277b89cf53df6092f0c9082d0 > config: nios2-randconfig-r023-20210813 (attached as .config) > compiler: nios2-linux-gcc (GCC) 11.2.0 > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://github.com/0day-ci/linux/commit/6c1fff5c80fe8f1a12c20bac2d28ebfa5960bde7 > git remote add linux-review https://github.com/0day-ci/linux > git fetch --no-tags linux-review Andy-Shevchenko/ptp_pch-use-mac_pton/20210813-203135 > git checkout 6c1fff5c80fe8f1a12c20bac2d28ebfa5960bde7 > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot <lkp@intel.com> Thanks! Definitely I have compiled it in my local branch. I'll check what is the root cause of this.
On Fri, Aug 13, 2021 at 06:13:21PM +0300, Andy Shevchenko wrote: > On Fri, Aug 13, 2021 at 10:34:17PM +0800, kernel test robot wrote: > > Hi Andy, > > > > I love your patch! Yet something to improve: > > > > [auto build test ERROR on net-next/master] > > > > url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ptp_pch-use-mac_pton/20210813-203135 > > base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git b769cf44ed55f4b277b89cf53df6092f0c9082d0 > > config: nios2-randconfig-r023-20210813 (attached as .config) > > compiler: nios2-linux-gcc (GCC) 11.2.0 > > reproduce (this is a W=1 build): > > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > > chmod +x ~/bin/make.cross > > # https://github.com/0day-ci/linux/commit/6c1fff5c80fe8f1a12c20bac2d28ebfa5960bde7 > > git remote add linux-review https://github.com/0day-ci/linux > > git fetch --no-tags linux-review Andy-Shevchenko/ptp_pch-use-mac_pton/20210813-203135 > > git checkout 6c1fff5c80fe8f1a12c20bac2d28ebfa5960bde7 > > # save the attached .config to linux build tree > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2 > > > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot <lkp@intel.com> > > Thanks! > > Definitely I have compiled it in my local branch. I'll check what is the root > cause of this. Kconfig misses PCI dependency. I will send a separate patch, there is nothing to do here.
Hi Andy, I love your patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ptp_pch-use-mac_pton/20210813-203135 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git b769cf44ed55f4b277b89cf53df6092f0c9082d0 config: powerpc64-randconfig-r034-20210813 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 62df4df41c939205b2dc0a2a3bfb75b8c1ed74fa) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install powerpc64 cross compiling tool for clang build # apt-get install binutils-powerpc-linux-gnu # https://github.com/0day-ci/linux/commit/6c1fff5c80fe8f1a12c20bac2d28ebfa5960bde7 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Andy-Shevchenko/ptp_pch-use-mac_pton/20210813-203135 git checkout 6c1fff5c80fe8f1a12c20bac2d28ebfa5960bde7 # save the attached .config to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/ptp/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All error/warnings (new ones prefixed by >>): __do_insb ^ arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb' #define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from drivers/ptp/ptp_pch.c:13: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:619: arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:174:1: note: expanded from here __do_insw ^ arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw' #define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from drivers/ptp/ptp_pch.c:13: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:619: arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:176:1: note: expanded from here __do_insl ^ arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl' #define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from drivers/ptp/ptp_pch.c:13: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:619: arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:178:1: note: expanded from here __do_outsb ^ arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb' #define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from drivers/ptp/ptp_pch.c:13: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:619: arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:180:1: note: expanded from here __do_outsw ^ arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw' #define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from drivers/ptp/ptp_pch.c:13: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:619: arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:182:1: note: expanded from here __do_outsl ^ arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl' #define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ >> drivers/ptp/ptp_pch.c:604:1: warning: declaration specifier missing, defaulting to 'int' module_pci_driver(pch_driver); ^ int >> drivers/ptp/ptp_pch.c:604:19: error: a parameter list without types is only allowed in a function definition module_pci_driver(pch_driver); ^ 13 warnings and 1 error generated. vim +604 drivers/ptp/ptp_pch.c 596 597 static struct pci_driver pch_driver = { 598 .name = KBUILD_MODNAME, 599 .id_table = pch_ieee1588_pcidev_id, 600 .probe = pch_probe, 601 .remove = pch_remove, 602 .driver.pm = &pch_pm_ops, 603 }; > 604 module_pci_driver(pch_driver); 605 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
On Fri, 13 Aug 2021 18:39:14 +0300 Andy Shevchenko wrote: > On Fri, Aug 13, 2021 at 06:13:21PM +0300, Andy Shevchenko wrote: > > On Fri, Aug 13, 2021 at 10:34:17PM +0800, kernel test robot wrote: > > > Hi Andy, > > > > > > I love your patch! Yet something to improve: > > > > > > [auto build test ERROR on net-next/master] > > > > > > url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ptp_pch-use-mac_pton/20210813-203135 > > > base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git b769cf44ed55f4b277b89cf53df6092f0c9082d0 > > > config: nios2-randconfig-r023-20210813 (attached as .config) > > > compiler: nios2-linux-gcc (GCC) 11.2.0 > > > reproduce (this is a W=1 build): > > > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > > > chmod +x ~/bin/make.cross > > > # https://github.com/0day-ci/linux/commit/6c1fff5c80fe8f1a12c20bac2d28ebfa5960bde7 > > > git remote add linux-review https://github.com/0day-ci/linux > > > git fetch --no-tags linux-review Andy-Shevchenko/ptp_pch-use-mac_pton/20210813-203135 > > > git checkout 6c1fff5c80fe8f1a12c20bac2d28ebfa5960bde7 > > > # save the attached .config to linux build tree > > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2 > > > > > > If you fix the issue, kindly add following tag as appropriate > > > Reported-by: kernel test robot <lkp@intel.com> > > > > Thanks! > > > > Definitely I have compiled it in my local branch. I'll check what is the root > > cause of this. > > Kconfig misses PCI dependency. I will send a separate patch, there is nothing > to do here. That patch has to be before this one, tho. There is a static inline stub for pci_register_driver() etc. if !PCI, but there isn't for module_pci_driver(), meaning in builds without PCI this driver used to be harmlessly pointless, now it's breaking build. Am I missing something? Adding Bjorn in case he has a preference on adding the dependency vs stubbing out module_pci_driver().
On Fri, Aug 13, 2021 at 9:23 PM Jakub Kicinski <kuba@kernel.org> wrote: > On Fri, 13 Aug 2021 18:39:14 +0300 Andy Shevchenko wrote: > > On Fri, Aug 13, 2021 at 06:13:21PM +0300, Andy Shevchenko wrote: > > > On Fri, Aug 13, 2021 at 10:34:17PM +0800, kernel test robot wrote: > > > > Hi Andy, > > > > > > > > I love your patch! Yet something to improve: > > > > > > > > [auto build test ERROR on net-next/master] > > > > > > > > url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ptp_pch-use-mac_pton/20210813-203135 > > > > base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git b769cf44ed55f4b277b89cf53df6092f0c9082d0 > > > > config: nios2-randconfig-r023-20210813 (attached as .config) > > > > compiler: nios2-linux-gcc (GCC) 11.2.0 > > > > reproduce (this is a W=1 build): > > > > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > > > > chmod +x ~/bin/make.cross > > > > # https://github.com/0day-ci/linux/commit/6c1fff5c80fe8f1a12c20bac2d28ebfa5960bde7 > > > > git remote add linux-review https://github.com/0day-ci/linux > > > > git fetch --no-tags linux-review Andy-Shevchenko/ptp_pch-use-mac_pton/20210813-203135 > > > > git checkout 6c1fff5c80fe8f1a12c20bac2d28ebfa5960bde7 > > > > # save the attached .config to linux build tree > > > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2 > > > > > > > > If you fix the issue, kindly add following tag as appropriate > > > > Reported-by: kernel test robot <lkp@intel.com> > > > > > > Thanks! > > > > > > Definitely I have compiled it in my local branch. I'll check what is the root > > > cause of this. > > > > Kconfig misses PCI dependency. I will send a separate patch, there is nothing > > to do here. > > That patch has to be before this one, tho. Yes, I have sent it as a fix to the net, this series is to the net-next. Am I missing something in the process here? Because I have been told a few times that I mustn't collect net and net-next patches in one series in the usual cases. > There is a static inline > stub for pci_register_driver() etc. if !PCI, but there isn't for > module_pci_driver(), meaning in builds without PCI this driver used > to be harmlessly pointless, now it's breaking build. > Am I missing something? > > Adding Bjorn in case he has a preference on adding the dependency vs > stubbing out module_pci_driver(). I went all the same way but I have checked SPI and I²C how they are doing. It seems the common practice is to use direct dependency. Nevertheless, the stubs in PCI puzzled me a bit, why do we have them in the first place?
On Fri, Aug 13, 2021 at 10:26 PM Andy Shevchenko <andy.shevchenko@gmail.com> wrote: > On Fri, Aug 13, 2021 at 9:23 PM Jakub Kicinski <kuba@kernel.org> wrote: > > On Fri, 13 Aug 2021 18:39:14 +0300 Andy Shevchenko wrote: > > > On Fri, Aug 13, 2021 at 06:13:21PM +0300, Andy Shevchenko wrote: ... > > > Kconfig misses PCI dependency. I will send a separate patch, there is nothing > > > to do here. > > > > That patch has to be before this one, tho. > > Yes, I have sent it as a fix to the net, this series is to the > net-next. For the sake of reference: https://lore.kernel.org/netdev/20210813173328.16512-1-andriy.shevchenko@linux.intel.com/T/#u And by the way, dependency (although implicit) was there, see above commit message.
On Fri, Aug 13, 2021 at 11:23:12AM -0700, Jakub Kicinski wrote: > On Fri, 13 Aug 2021 18:39:14 +0300 Andy Shevchenko wrote: > > On Fri, Aug 13, 2021 at 06:13:21PM +0300, Andy Shevchenko wrote: > > > On Fri, Aug 13, 2021 at 10:34:17PM +0800, kernel test robot wrote: > > > > If you fix the issue, kindly add following tag as appropriate > > > > Reported-by: kernel test robot <lkp@intel.com> > > > > > > Thanks! > > > > > > Definitely I have compiled it in my local branch. I'll check what is the root > > > cause of this. > > > > Kconfig misses PCI dependency. I will send a separate patch, there is nothing > > to do here. > > That patch has to be before this one, tho. There is a static inline > stub for pci_register_driver() etc. if !PCI, but there isn't for > module_pci_driver(), meaning in builds without PCI this driver used > to be harmlessly pointless, now it's breaking build. > > Am I missing something? Because the PCI dependency has been restored, can we now apply this series? FYI, It was also reported that without PCI dependency and even w/o this path the build can be broken on some architectures due to other reasons (PCI_IOBASE is one of them IIRC).
diff --git a/drivers/ptp/ptp_pch.c b/drivers/ptp/ptp_pch.c index e7e31d4357e7..f3aafe45e1a6 100644 --- a/drivers/ptp/ptp_pch.c +++ b/drivers/ptp/ptp_pch.c @@ -10,7 +10,6 @@ #include <linux/device.h> #include <linux/err.h> -#include <linux/init.h> #include <linux/interrupt.h> #include <linux/io.h> #include <linux/io-64-nonatomic-lo-hi.h> @@ -602,24 +601,7 @@ static struct pci_driver pch_driver = { .remove = pch_remove, .driver.pm = &pch_pm_ops, }; - -static void __exit ptp_pch_exit(void) -{ - pci_unregister_driver(&pch_driver); -} - -static s32 __init ptp_pch_init(void) -{ - s32 ret; - - /* register the driver with the pci core */ - ret = pci_register_driver(&pch_driver); - - return ret; -} - -module_init(ptp_pch_init); -module_exit(ptp_pch_exit); +module_pci_driver(pch_driver); module_param_string(station, pch_param.station, sizeof(pch_param.station), 0444);
Eliminate some boilerplate code by using module_pci_driver() instead of init/exit, and, if needed, moving the salient bits from init into probe. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/ptp/ptp_pch.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-)