Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Gerhard Engleder <gerhard@engleder-embedded.com>,
	davem@davemloft.net, kuba@kernel.org, robh+dt@kernel.org,
	michal.simek@xilinx.com
Cc: kbuild-all@lists.01.org, netdev@vger.kernel.org,
	devicetree@vger.kernel.org,
	Gerhard Engleder <gerhard@engleder-embedded.com>
Subject: Re: [PATCH net-next 4/5] tsnep: Add TSN endpoint Ethernet MAC driver
Date: Tue, 27 Jul 2021 07:25:39 +0800	[thread overview]
Message-ID: <202107270713.u7sFJyph-lkp@intel.com> (raw)
In-Reply-To: <20210726194603.14671-5-gerhard@engleder-embedded.com>

[-- Attachment #1: Type: text/plain, Size: 8627 bytes --]

Hi Gerhard,

Thank you for the patch! Perhaps something to improve:

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

url:    https://github.com/0day-ci/linux/commits/Gerhard-Engleder/TSN-endpoint-Ethernet-MAC-driver/20210727-034844
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git af996031e1545c47423dfdd024840702ceb5a26c
config: nios2-allyesconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 10.3.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/baa5afadb5272e5895a95696f63e2e2e5fc9f44c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Gerhard-Engleder/TSN-endpoint-Ethernet-MAC-driver/20210727-034844
        git checkout baa5afadb5272e5895a95696f63e2e2e5fc9f44c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.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 warnings (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
                    from include/linux/platform_device.h:13,
                    from drivers/net/ethernet/engleder/tsnep.h:9,
                    from drivers/net/ethernet/engleder/tsnep_main.c:25:
   drivers/net/ethernet/engleder/tsnep_main.c: In function 'tsnep_probe':
>> drivers/net/ethernet/engleder/tsnep_main.c:1355:4: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
    1355 |    "device version %d.%02d at 0x%llx-0x%llx, IRQ %d\n",
         |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
      19 | #define dev_fmt(fmt) fmt
         |                      ^~~
   drivers/net/ethernet/engleder/tsnep_main.c:1354:2: note: in expansion of macro 'dev_info'
    1354 |  dev_info(&adapter->pdev->dev,
         |  ^~~~~~~~
   drivers/net/ethernet/engleder/tsnep_main.c:1355:36: note: format string is defined here
    1355 |    "device version %d.%02d at 0x%llx-0x%llx, IRQ %d\n",
         |                                 ~~~^
         |                                    |
         |                                    long long unsigned int
         |                                 %x
   In file included from include/linux/device.h:15,
                    from include/linux/platform_device.h:13,
                    from drivers/net/ethernet/engleder/tsnep.h:9,
                    from drivers/net/ethernet/engleder/tsnep_main.c:25:
   drivers/net/ethernet/engleder/tsnep_main.c:1355:4: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 6 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
    1355 |    "device version %d.%02d at 0x%llx-0x%llx, IRQ %d\n",
         |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
      19 | #define dev_fmt(fmt) fmt
         |                      ^~~
   drivers/net/ethernet/engleder/tsnep_main.c:1354:2: note: in expansion of macro 'dev_info'
    1354 |  dev_info(&adapter->pdev->dev,
         |  ^~~~~~~~
   drivers/net/ethernet/engleder/tsnep_main.c:1355:43: note: format string is defined here
    1355 |    "device version %d.%02d at 0x%llx-0x%llx, IRQ %d\n",
         |                                        ~~~^
         |                                           |
         |                                           long long unsigned int
         |                                        %x
--
   drivers/net/ethernet/engleder/tsnep_tc.c: In function 'tsnep_write_gcl_operation':
>> drivers/net/ethernet/engleder/tsnep_tc.c:42:6: warning: variable 'tmp' set but not used [-Wunused-but-set-variable]
      42 |  u32 tmp;
         |      ^~~


vim +1355 drivers/net/ethernet/engleder/tsnep_main.c

  1253	
  1254	static int tsnep_probe(struct platform_device *pdev)
  1255	{
  1256		struct tsnep_adapter *adapter;
  1257		struct net_device *netdev;
  1258		struct resource *io;
  1259		u32 type;
  1260		int revision;
  1261		int version;
  1262		int queue_count;
  1263		int retval;
  1264	
  1265		netdev = devm_alloc_etherdev_mqs(&pdev->dev,
  1266						 sizeof(struct tsnep_adapter),
  1267						 TSNEP_MAX_QUEUES, TSNEP_MAX_QUEUES);
  1268		if (!netdev)
  1269			return -ENODEV;
  1270		SET_NETDEV_DEV(netdev, &pdev->dev);
  1271		adapter = netdev_priv(netdev);
  1272		platform_set_drvdata(pdev, adapter);
  1273		adapter->pdev = pdev;
  1274		adapter->netdev = netdev;
  1275		adapter->msg_enable = NETIF_MSG_DRV | NETIF_MSG_PROBE |
  1276				      NETIF_MSG_LINK | NETIF_MSG_IFUP |
  1277				      NETIF_MSG_IFDOWN | NETIF_MSG_TX_QUEUED;
  1278	
  1279		netdev->min_mtu = ETH_MIN_MTU;
  1280		netdev->max_mtu = TSNEP_MAX_FRAME_SIZE;
  1281	
  1282		spin_lock_init(&adapter->irq_lock);
  1283		mutex_init(&adapter->md_lock);
  1284		init_waitqueue_head(&adapter->md_wait);
  1285		mutex_init(&adapter->gate_control_lock);
  1286	
  1287		io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  1288		adapter->addr = devm_ioremap_resource(&pdev->dev, io);
  1289		if (IS_ERR(adapter->addr))
  1290			return PTR_ERR(adapter->addr);
  1291		adapter->size = io->end - io->start + 1;
  1292		adapter->irq = platform_get_irq(pdev, 0);
  1293		netdev->mem_start = io->start;
  1294		netdev->mem_end = io->end;
  1295		netdev->irq = adapter->irq;
  1296	
  1297		type = ioread32(adapter->addr + ECM_TYPE);
  1298		revision = (type & ECM_REVISION_MASK) >> ECM_REVISION_SHIFT;
  1299		version = (type & ECM_VERSION_MASK) >> ECM_VERSION_SHIFT;
  1300		queue_count = (type & ECM_QUEUE_COUNT_MASK) >> ECM_QUEUE_COUNT_SHIFT;
  1301		adapter->gate_control = type & ECM_GATE_CONTROL;
  1302	
  1303		/* first TX/RX queue pair for netdev, rest for stream interface */
  1304		adapter->num_tx_queues = TSNEP_QUEUES;
  1305		adapter->num_rx_queues = TSNEP_QUEUES;
  1306		adapter->stream_count = queue_count - TSNEP_QUEUES;
  1307	
  1308		iowrite32(0, adapter->addr + ECM_INT_ENABLE);
  1309		retval = devm_request_irq(&adapter->pdev->dev, adapter->irq, tsnep_irq,
  1310					  0, TSNEP, adapter);
  1311		if (retval != 0) {
  1312			dev_err(&adapter->pdev->dev, "can't get assigned irq %d.",
  1313				adapter->irq);
  1314			return retval;
  1315		}
  1316		tsnep_enable_irq(adapter, ECM_INT_MD | ECM_INT_LINK);
  1317	
  1318		retval = tsnep_mac_init(adapter);
  1319		if (retval)
  1320			goto mac_init_failed;
  1321	
  1322		retval = tsnep_mdio_init(adapter);
  1323		if (retval)
  1324			goto mdio_init_failed;
  1325	
  1326		retval = tsnep_phy_init(adapter);
  1327		if (retval)
  1328			goto phy_init_failed;
  1329	
  1330		retval = tsnep_ptp_init(adapter);
  1331		if (retval)
  1332			goto ptp_init_failed;
  1333	
  1334		retval = tsnep_tc_init(adapter);
  1335		if (retval)
  1336			goto tc_init_failed;
  1337	
  1338		netdev->netdev_ops = &tsnep_netdev_ops;
  1339		netdev->ethtool_ops = &tsnep_ethtool_ops;
  1340		netdev->features = NETIF_F_SG;
  1341		netdev->hw_features = netdev->features;
  1342	
  1343		/* carrier off reporting is important to ethtool even BEFORE open */
  1344		netif_carrier_off(netdev);
  1345	
  1346		retval = register_netdev(netdev);
  1347		if (retval)
  1348			goto register_failed;
  1349	
  1350		retval = tsnep_stream_init(adapter);
  1351		if (retval)
  1352			goto stream_failed;
  1353	
  1354		dev_info(&adapter->pdev->dev,
> 1355			 "device version %d.%02d at 0x%llx-0x%llx, IRQ %d\n",
  1356			 version, revision, io->start, io->end, adapter->irq);
  1357		dev_info(&adapter->pdev->dev, "%d streams\n", adapter->stream_count);
  1358		if (adapter->gate_control)
  1359			dev_info(&adapter->pdev->dev, "gate control detected\n");
  1360	
  1361		return 0;
  1362	
  1363		tsnep_stream_cleanup(adapter);
  1364	stream_failed:
  1365		unregister_netdev(adapter->netdev);
  1366	register_failed:
  1367		tsnep_tc_cleanup(adapter);
  1368	tc_init_failed:
  1369		tsnep_ptp_cleanup(adapter);
  1370	ptp_init_failed:
  1371	phy_init_failed:
  1372		mdiobus_unregister(adapter->mdiobus);
  1373		mdiobus_free(adapter->mdiobus);
  1374	mdio_init_failed:
  1375	mac_init_failed:
  1376		return retval;
  1377	}
  1378	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 60033 bytes --]

  parent reply	other threads:[~2021-07-26 23:26 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26 19:45 [PATCH net-next 0/5] " Gerhard Engleder
2021-07-26 19:45 ` [PATCH net-next 1/5] dt-bindings: Add vendor prefix for Engleder Gerhard Engleder
2021-07-26 19:46 ` [PATCH net-next 2/5] dt-bindings: net: Add tsnep Ethernet controller Gerhard Engleder
2021-07-26 23:35   ` Rob Herring
2021-07-27 18:34     ` Gerhard Engleder
2021-07-27 20:25       ` Rob Herring
2021-07-27 20:33         ` Gerhard Engleder
2021-07-28  5:13         ` Michal Simek
2021-07-28  7:44           ` Gerhard Engleder
2021-07-28 10:55             ` Michal Simek
2021-07-28 20:14               ` Gerhard Engleder
2021-07-29  5:07                 ` Michal Simek
2021-07-29  7:07                   ` Gerhard Engleder
2021-07-29  7:57                     ` Michal Simek
2021-07-26 19:46 ` [PATCH net-next 3/5] dt-bindings: arm: Add Engleder bindings Gerhard Engleder
2021-07-26 19:46 ` [PATCH net-next 4/5] tsnep: Add TSN endpoint Ethernet MAC driver Gerhard Engleder
2021-07-26 20:49   ` Andrew Lunn
2021-07-27 20:18     ` Gerhard Engleder
2021-07-26 21:15   ` Andrew Lunn
2021-07-27 20:49     ` Gerhard Engleder
2021-07-26 21:29   ` Andrew Lunn
2021-07-27 22:05     ` Gerhard Engleder
2021-07-27 22:41       ` Andrew Lunn
2021-07-28  8:24         ` Gerhard Engleder
2021-07-26 23:25   ` kernel test robot [this message]
2021-07-26 19:46 ` [PATCH net-next 5/5] arm64: dts: zynqmp: Add ZCU104 based TSN endpoint Gerhard Engleder
2021-07-26 23:40   ` Rob Herring
2021-07-27 20:10     ` Gerhard Engleder
2021-07-27 20:17       ` Rob Herring
2021-07-27 20:23         ` Gerhard Engleder
2021-07-28  5:10           ` Michal Simek
2021-07-28  8:19             ` Gerhard Engleder
2021-07-28 10:58               ` Michal Simek
2021-07-28 20:51                 ` Gerhard Engleder
2021-07-29  5:22                   ` Michal Simek
2021-07-29  6:47                     ` Gerhard Engleder

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=202107270713.u7sFJyph-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=gerhard@engleder-embedded.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --subject='Re: [PATCH net-next 4/5] tsnep: Add TSN endpoint Ethernet MAC driver' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).