All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Rosen Penev <rosenp@gmail.com>, netdev@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, andrew@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, linux-kernel@vger.kernel.org, olek2@wp.pl,
	shannon.nelson@amd.com
Subject: Re: [PATCHv2 net-next 08/10] net: lantiq_etop: use module_platform_driver_probe
Date: Fri, 4 Oct 2024 01:55:56 +0800	[thread overview]
Message-ID: <202410040101.1HX2nS2j-lkp@intel.com> (raw)
In-Reply-To: <20241001184607.193461-9-rosenp@gmail.com>

Hi Rosen,

kernel test robot noticed the following build errors:

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

url:    https://github.com/intel-lab-lkp/linux/commits/Rosen-Penev/net-lantiq_etop-use-netif_receive_skb_list/20241002-025104
base:   net-next/main
patch link:    https://lore.kernel.org/r/20241001184607.193461-9-rosenp%40gmail.com
patch subject: [PATCHv2 net-next 08/10] net: lantiq_etop: use module_platform_driver_probe
config: mips-xway_defconfig (https://download.01.org/0day-ci/archive/20241004/202410040101.1HX2nS2j-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 13.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241004/202410040101.1HX2nS2j-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410040101.1HX2nS2j-lkp@intel.com/

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

   In file included from drivers/net/ethernet/lantiq_etop.c:21:
>> drivers/net/ethernet/lantiq_etop.c:689:30: error: expected identifier or '(' before '&' token
     689 | module_platform_driver_probe(&ltq_mii_driver, ltq_etop_probe);
         |                              ^
   include/linux/platform_device.h:320:19: note: in definition of macro 'module_platform_driver_probe'
     320 | static int __init __platform_driver##_init(void) \
         |                   ^~~~~~~~~~~~~~~~~
   In file included from <command-line>:
>> include/linux/init.h:214:17: error: pasting "_" and "&" does not give a valid preprocessing token
     214 |         __PASTE(_, fn))))))
         |                 ^
   include/linux/compiler_types.h:83:23: note: in definition of macro '___PASTE'
      83 | #define ___PASTE(a,b) a##b
         |                       ^
   include/linux/init.h:214:9: note: in expansion of macro '__PASTE'
     214 |         __PASTE(_, fn))))))
         |         ^~~~~~~
   include/linux/init.h:280:42: note: in expansion of macro '__initcall_id'
     280 |         __unique_initcall(fn, id, __sec, __initcall_id(fn))
         |                                          ^~~~~~~~~~~~~
   include/linux/init.h:282:35: note: in expansion of macro '___define_initcall'
     282 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
         |                                   ^~~~~~~~~~~~~~~~~~
   include/linux/init.h:311:41: note: in expansion of macro '__define_initcall'
     311 | #define device_initcall(fn)             __define_initcall(fn, 6)
         |                                         ^~~~~~~~~~~~~~~~~
   include/linux/init.h:316:24: note: in expansion of macro 'device_initcall'
     316 | #define __initcall(fn) device_initcall(fn)
         |                        ^~~~~~~~~~~~~~~
   include/linux/module.h:88:25: note: in expansion of macro '__initcall'
      88 | #define module_init(x)  __initcall(x);
         |                         ^~~~~~~~~~
   include/linux/platform_device.h:325:1: note: in expansion of macro 'module_init'
     325 | module_init(__platform_driver##_init); \
         | ^~~~~~~~~~~
   drivers/net/ethernet/lantiq_etop.c:689:1: note: in expansion of macro 'module_platform_driver_probe'
     689 | module_platform_driver_probe(&ltq_mii_driver, ltq_etop_probe);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/printk.h:6,
                    from include/linux/kernel.h:31,
                    from drivers/net/ethernet/lantiq_etop.c:7:
>> drivers/net/ethernet/lantiq_etop.c:689:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before '&' token
     689 | module_platform_driver_probe(&ltq_mii_driver, ltq_etop_probe);
         |                              ^
   include/linux/init.h:269:27: note: in definition of macro '____define_initcall'
     269 |         static initcall_t __name __used                         \
         |                           ^~~~~~
   include/linux/compiler_types.h:84:22: note: in expansion of macro '___PASTE'
      84 | #define __PASTE(a,b) ___PASTE(a,b)
         |                      ^~~~~~~~
   include/linux/init.h:218:9: note: in expansion of macro '__PASTE'
     218 |         __PASTE(__,                                             \
         |         ^~~~~~~
   include/linux/compiler_types.h:84:22: note: in expansion of macro '___PASTE'
      84 | #define __PASTE(a,b) ___PASTE(a,b)
         |                      ^~~~~~~~
   include/linux/init.h:219:9: note: in expansion of macro '__PASTE'
     219 |         __PASTE(prefix,                                         \
         |         ^~~~~~~
   include/linux/compiler_types.h:84:22: note: in expansion of macro '___PASTE'
      84 | #define __PASTE(a,b) ___PASTE(a,b)
         |                      ^~~~~~~~
   include/linux/init.h:220:9: note: in expansion of macro '__PASTE'
     220 |         __PASTE(__,                                             \
         |         ^~~~~~~
   include/linux/compiler_types.h:84:22: note: in expansion of macro '___PASTE'
      84 | #define __PASTE(a,b) ___PASTE(a,b)
         |                      ^~~~~~~~
   include/linux/init.h:221:9: note: in expansion of macro '__PASTE'
     221 |         __PASTE(__iid, id))))
         |         ^~~~~~~
   include/linux/init.h:276:17: note: in expansion of macro '__initcall_name'
     276 |                 __initcall_name(initcall, __iid, id),           \
         |                 ^~~~~~~~~~~~~~~
   include/linux/init.h:280:9: note: in expansion of macro '__unique_initcall'
     280 |         __unique_initcall(fn, id, __sec, __initcall_id(fn))
         |         ^~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:84:22: note: in expansion of macro '___PASTE'
      84 | #define __PASTE(a,b) ___PASTE(a,b)
         |                      ^~~~~~~~
   include/linux/init.h:209:9: note: in expansion of macro '__PASTE'
     209 |         __PASTE(__KBUILD_MODNAME,                               \
         |         ^~~~~~~
   include/linux/compiler_types.h:84:22: note: in expansion of macro '___PASTE'
      84 | #define __PASTE(a,b) ___PASTE(a,b)
         |                      ^~~~~~~~
   include/linux/init.h:210:9: note: in expansion of macro '__PASTE'
     210 |         __PASTE(__,                                             \
         |         ^~~~~~~
   include/linux/compiler_types.h:84:22: note: in expansion of macro '___PASTE'
      84 | #define __PASTE(a,b) ___PASTE(a,b)
         |                      ^~~~~~~~
   include/linux/init.h:211:9: note: in expansion of macro '__PASTE'
     211 |         __PASTE(__COUNTER__,                                    \
         |         ^~~~~~~
   include/linux/compiler_types.h:84:22: note: in expansion of macro '___PASTE'
      84 | #define __PASTE(a,b) ___PASTE(a,b)
         |                      ^~~~~~~~
   include/linux/init.h:212:9: note: in expansion of macro '__PASTE'
     212 |         __PASTE(_,                                              \
         |         ^~~~~~~
   include/linux/compiler_types.h:84:22: note: in expansion of macro '___PASTE'
      84 | #define __PASTE(a,b) ___PASTE(a,b)
         |                      ^~~~~~~~
   include/linux/init.h:213:9: note: in expansion of macro '__PASTE'
     213 |         __PASTE(__LINE__,                                       \
         |         ^~~~~~~
   include/linux/compiler_types.h:84:22: note: in expansion of macro '___PASTE'
      84 | #define __PASTE(a,b) ___PASTE(a,b)
         |                      ^~~~~~~~
   include/linux/init.h:214:9: note: in expansion of macro '__PASTE'
     214 |         __PASTE(_, fn))))))
         |         ^~~~~~~
   include/linux/init.h:280:42: note: in expansion of macro '__initcall_id'
     280 |         __unique_initcall(fn, id, __sec, __initcall_id(fn))
         |                                          ^~~~~~~~~~~~~
   include/linux/init.h:282:35: note: in expansion of macro '___define_initcall'
     282 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
         |                                   ^~~~~~~~~~~~~~~~~~
   include/linux/init.h:311:41: note: in expansion of macro '__define_initcall'
     311 | #define device_initcall(fn)             __define_initcall(fn, 6)
         |                                         ^~~~~~~~~~~~~~~~~
   include/linux/init.h:316:24: note: in expansion of macro 'device_initcall'
     316 | #define __initcall(fn) device_initcall(fn)
         |                        ^~~~~~~~~~~~~~~
   include/linux/module.h:88:25: note: in expansion of macro '__initcall'
      88 | #define module_init(x)  __initcall(x);
         |                         ^~~~~~~~~~
   include/linux/platform_device.h:325:1: note: in expansion of macro 'module_init'
     325 | module_init(__platform_driver##_init); \
         | ^~~~~~~~~~~
   drivers/net/ethernet/lantiq_etop.c:689:1: note: in expansion of macro 'module_platform_driver_probe'
     689 | module_platform_driver_probe(&ltq_mii_driver, ltq_etop_probe);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/lantiq_etop.c:689:30: error: expected identifier or '(' before '&' token
     689 | module_platform_driver_probe(&ltq_mii_driver, ltq_etop_probe);
         |                              ^
   include/linux/platform_device.h:326:20: note: in definition of macro 'module_platform_driver_probe'
     326 | static void __exit __platform_driver##_exit(void) \
         |                    ^~~~~~~~~~~~~~~~~
>> include/linux/init.h:319:27: error: pasting "__exitcall_" and "&" does not give a valid preprocessing token
     319 |         static exitcall_t __exitcall_##fn __exit_call = fn
         |                           ^~~~~~~~~~~
   include/linux/module.h:100:25: note: in expansion of macro '__exitcall'
     100 | #define module_exit(x)  __exitcall(x);
         |                         ^~~~~~~~~~
   include/linux/platform_device.h:330:1: note: in expansion of macro 'module_exit'
     330 | module_exit(__platform_driver##_exit);
         | ^~~~~~~~~~~
   drivers/net/ethernet/lantiq_etop.c:689:1: note: in expansion of macro 'module_platform_driver_probe'
     689 | module_platform_driver_probe(&ltq_mii_driver, ltq_etop_probe);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/lantiq_etop.c:689:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before '&' token
     689 | module_platform_driver_probe(&ltq_mii_driver, ltq_etop_probe);
         |                              ^
   include/linux/init.h:319:40: note: in definition of macro '__exitcall'
     319 |         static exitcall_t __exitcall_##fn __exit_call = fn
         |                                        ^~
   include/linux/platform_device.h:330:1: note: in expansion of macro 'module_exit'
     330 | module_exit(__platform_driver##_exit);
         | ^~~~~~~~~~~
   drivers/net/ethernet/lantiq_etop.c:689:1: note: in expansion of macro 'module_platform_driver_probe'
     689 | module_platform_driver_probe(&ltq_mii_driver, ltq_etop_probe);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/lantiq_etop.c:682:31: warning: 'ltq_mii_driver' defined but not used [-Wunused-variable]
     682 | static struct platform_driver ltq_mii_driver = {
         |                               ^~~~~~~~~~~~~~
>> drivers/net/ethernet/lantiq_etop.c:618:1: warning: 'ltq_etop_probe' defined but not used [-Wunused-function]
     618 | ltq_etop_probe(struct platform_device *pdev)
         | ^~~~~~~~~~~~~~


vim +689 drivers/net/ethernet/lantiq_etop.c

   616	
   617	static int __init
 > 618	ltq_etop_probe(struct platform_device *pdev)
   619	{
   620		struct net_device *dev;
   621		struct ltq_etop_priv *priv;
   622		int err;
   623		int i;
   624	
   625		ltq_etop_membase = devm_platform_ioremap_resource(pdev, 0);
   626		if (IS_ERR(ltq_etop_membase)) {
   627			dev_err(&pdev->dev, "failed to remap etop engine %d", pdev->id);
   628			return PTR_ERR(ltq_etop_membase);
   629		}
   630	
   631		dev = devm_alloc_etherdev_mqs(&pdev->dev, sizeof(struct ltq_etop_priv),
   632					      4, 4);
   633		if (!dev)
   634			return -ENOMEM;
   635		dev->netdev_ops = &ltq_eth_netdev_ops;
   636		dev->ethtool_ops = &ltq_etop_ethtool_ops;
   637		priv = netdev_priv(dev);
   638		priv->pdev = pdev;
   639		priv->pldata = dev_get_platdata(&pdev->dev);
   640		priv->netdev = dev;
   641		spin_lock_init(&priv->lock);
   642		SET_NETDEV_DEV(dev, &pdev->dev);
   643	
   644		err = device_property_read_u32(&pdev->dev, "lantiq,tx-burst-length", &priv->tx_burst_len);
   645		if (err < 0)
   646			return dev_err_probe(&pdev->dev, err,
   647					     "unable to read tx-burst-length property");
   648	
   649		err = device_property_read_u32(&pdev->dev, "lantiq,rx-burst-length", &priv->rx_burst_len);
   650		if (err < 0)
   651			return dev_err_probe(&pdev->dev, err,
   652					     "unable to read rx-burst-length property");
   653	
   654		for (i = 0; i < MAX_DMA_CHAN; i++) {
   655			if (IS_TX(i))
   656				netif_napi_add_weight(dev, &priv->ch[i].napi,
   657						      ltq_etop_poll_tx, 8);
   658			else if (IS_RX(i))
   659				netif_napi_add_weight(dev, &priv->ch[i].napi,
   660						      ltq_etop_poll_rx, 32);
   661			priv->ch[i].netdev = dev;
   662		}
   663	
   664		err = devm_register_netdev(&pdev->dev, dev);
   665		if (err)
   666			return err;
   667	
   668		platform_set_drvdata(pdev, dev);
   669		return 0;
   670	}
   671	
   672	static void ltq_etop_remove(struct platform_device *pdev)
   673	{
   674		struct net_device *dev = platform_get_drvdata(pdev);
   675	
   676		if (dev) {
   677			netif_tx_stop_all_queues(dev);
   678			ltq_etop_hw_exit(dev);
   679		}
   680	}
   681	
 > 682	static struct platform_driver ltq_mii_driver = {
   683		.remove_new = ltq_etop_remove,
   684		.driver = {
   685			.name = "ltq_etop",
   686		},
   687	};
   688	
 > 689	module_platform_driver_probe(&ltq_mii_driver, ltq_etop_probe);
   690	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2024-10-03 17:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-01 18:45 [PATCHv2 net-next 00/10] net: lantiq_etop: some cleanups Rosen Penev
2024-10-01 18:45 ` [PATCHv2 net-next 01/10] net: lantiq_etop: use netif_receive_skb_list Rosen Penev
2024-10-01 22:40   ` Andrew Lunn
2024-10-01 23:39     ` Rosen Penev
2024-10-01 18:45 ` [PATCHv2 net-next 02/10] net: lantiq_etop: use devm_alloc_etherdev_mqs Rosen Penev
2024-10-01 18:46 ` [PATCHv2 net-next 03/10] net: lantiq_etop: use devm for register_netdev Rosen Penev
2024-10-01 22:48   ` Andrew Lunn
2024-10-01 18:46 ` [PATCHv2 net-next 04/10] net: lantiq_etop: use devm for mdiobus Rosen Penev
2024-10-01 22:51   ` Andrew Lunn
2024-10-01 18:46 ` [PATCHv2 net-next 05/10] net: lantiq_etop: move phy_disconnect to stop Rosen Penev
2024-10-01 22:56   ` Andrew Lunn
2024-10-03 21:09   ` Aleksander Jan Bajkowski
2024-10-01 18:46 ` [PATCHv2 net-next 06/10] net: lantiq_etop: use devm_err_probe Rosen Penev
2024-10-01 18:46 ` [PATCHv2 net-next 07/10] net: lantiq_etop: remove struct resource Rosen Penev
2024-10-01 18:46 ` [PATCHv2 net-next 08/10] net: lantiq_etop: use module_platform_driver_probe Rosen Penev
2024-10-03 17:55   ` kernel test robot [this message]
2024-10-03 23:26   ` kernel test robot
2024-10-01 18:46 ` [PATCHv2 net-next 09/10] net: lantiq_etop: no queue stop in remove Rosen Penev
2024-10-01 18:46 ` [PATCHv2 net-next 10/10] net: lantiq_etop: return by register_netdev Rosen Penev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202410040101.1HX2nS2j-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=olek2@wp.pl \
    --cc=pabeni@redhat.com \
    --cc=rosenp@gmail.com \
    --cc=shannon.nelson@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.