Message ID | 20211014141341.2740841-3-u.kleine-koenig@pengutronix.de (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Let spi drivers return 0 in .remove() | expand |
Hi "Uwe, I love your patch! Yet something to improve: [auto build test ERROR on 9e1ff307c779ce1f0f810c7ecce3d95bbae40896] url: https://github.com/0day-ci/linux/commits/Uwe-Kleine-K-nig/Let-spi-drivers-return-0-in-remove/20211014-221546 base: 9e1ff307c779ce1f0f810c7ecce3d95bbae40896 config: hexagon-randconfig-r041-20211014 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6c76d0101193aa4eb891a6954ff047eda2f9cf71) 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/8f3e2ba8c698fe9dc9df832c5f16e6d871ab85a4 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Uwe-Kleine-K-nig/Let-spi-drivers-return-0-in-remove/20211014-221546 git checkout 8f3e2ba8c698fe9dc9df832c5f16e6d871ab85a4 # save the attached .config to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/net/ethernet/wiznet/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): >> drivers/net/ethernet/wiznet/w5100.c:1069:10: error: expected ';' after return statement return 0 ^ ; 1 error generated. vim +1069 drivers/net/ethernet/wiznet/w5100.c 1064 1065 static int w5100_mmio_remove(struct platform_device *pdev) 1066 { 1067 w5100_remove(&pdev->dev); 1068 > 1069 return 0 1070 } 1071 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Hi "Uwe, I love your patch! Yet something to improve: [auto build test ERROR on 9e1ff307c779ce1f0f810c7ecce3d95bbae40896] url: https://github.com/0day-ci/linux/commits/Uwe-Kleine-K-nig/Let-spi-drivers-return-0-in-remove/20211014-221546 base: 9e1ff307c779ce1f0f810c7ecce3d95bbae40896 config: arc-allyesconfig (attached as .config) compiler: arceb-elf-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/8f3e2ba8c698fe9dc9df832c5f16e6d871ab85a4 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Uwe-Kleine-K-nig/Let-spi-drivers-return-0-in-remove/20211014-221546 git checkout 8f3e2ba8c698fe9dc9df832c5f16e6d871ab85a4 # save the attached .config to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): drivers/net/ethernet/wiznet/w5100.c: In function 'w5100_mmio_remove': >> drivers/net/ethernet/wiznet/w5100.c:1069:17: error: expected ';' before '}' token 1069 | return 0 | ^ | ; 1070 | } | ~ vim +1069 drivers/net/ethernet/wiznet/w5100.c 1064 1065 static int w5100_mmio_remove(struct platform_device *pdev) 1066 { 1067 w5100_remove(&pdev->dev); 1068 > 1069 return 0 1070 } 1071 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff --git a/drivers/net/ethernet/wiznet/w5100-spi.c b/drivers/net/ethernet/wiznet/w5100-spi.c index 2b84848dc26a..7779a36da3c8 100644 --- a/drivers/net/ethernet/wiznet/w5100-spi.c +++ b/drivers/net/ethernet/wiznet/w5100-spi.c @@ -463,7 +463,9 @@ static int w5100_spi_probe(struct spi_device *spi) static int w5100_spi_remove(struct spi_device *spi) { - return w5100_remove(&spi->dev); + w5100_remove(&spi->dev); + + return 0; } static const struct spi_device_id w5100_spi_ids[] = { diff --git a/drivers/net/ethernet/wiznet/w5100.c b/drivers/net/ethernet/wiznet/w5100.c index f974e70a82e8..2e8a5ba6b908 100644 --- a/drivers/net/ethernet/wiznet/w5100.c +++ b/drivers/net/ethernet/wiznet/w5100.c @@ -1064,7 +1064,9 @@ static int w5100_mmio_probe(struct platform_device *pdev) static int w5100_mmio_remove(struct platform_device *pdev) { - return w5100_remove(&pdev->dev); + w5100_remove(&pdev->dev); + + return 0 } void *w5100_ops_priv(const struct net_device *ndev) @@ -1210,7 +1212,7 @@ int w5100_probe(struct device *dev, const struct w5100_ops *ops, } EXPORT_SYMBOL_GPL(w5100_probe); -int w5100_remove(struct device *dev) +void w5100_remove(struct device *dev) { struct net_device *ndev = dev_get_drvdata(dev); struct w5100_priv *priv = netdev_priv(ndev); @@ -1226,7 +1228,6 @@ int w5100_remove(struct device *dev) unregister_netdev(ndev); free_netdev(ndev); - return 0; } EXPORT_SYMBOL_GPL(w5100_remove); diff --git a/drivers/net/ethernet/wiznet/w5100.h b/drivers/net/ethernet/wiznet/w5100.h index 5d3d4b541fec..481af3b6d9e8 100644 --- a/drivers/net/ethernet/wiznet/w5100.h +++ b/drivers/net/ethernet/wiznet/w5100.h @@ -31,6 +31,6 @@ void *w5100_ops_priv(const struct net_device *ndev); int w5100_probe(struct device *dev, const struct w5100_ops *ops, int sizeof_ops_priv, const void *mac_addr, int irq, int link_gpio); -int w5100_remove(struct device *dev); +void w5100_remove(struct device *dev); extern const struct dev_pm_ops w5100_pm_ops;
Up to now w5100_remove() returns zero unconditionally. Make it return void instead which makes it easier to see in the callers that there is no error to handle. Also the return value of platform and spi remove callbacks is ignored anyway. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- drivers/net/ethernet/wiznet/w5100-spi.c | 4 +++- drivers/net/ethernet/wiznet/w5100.c | 7 ++++--- drivers/net/ethernet/wiznet/w5100.h | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-)