netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Edward Cree <ecree@solarflare.com>,
	linux-net-drivers@solarflare.com, davem@davemloft.net
Cc: kbuild-all@lists.01.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 03/15] sfc_ef100: skeleton EF100 PF driver
Date: Sat, 4 Jul 2020 12:16:34 +0800	[thread overview]
Message-ID: <202007041218.2NXltj0z%lkp@intel.com> (raw)
In-Reply-To: <b9ccfacc-93c8-5f60-d3a5-ecd87fcef5ee@solarflare.com>

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

Hi Edward,

I love your patch! Perhaps something to improve:

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

url:    https://github.com/0day-ci/linux/commits/Edward-Cree/sfc_ef100-driver-for-EF100-family-NICs-part-1/20200703-233750
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 8c8278a5b1a81e099ba883d8a0f9e3df9bdb1a74
config: m68k-randconfig-c003-20200701 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


coccinelle warnings: (new ones prefixed by >>)

>> drivers/net/ethernet/sfc/ptp.c:1442:1-4: alloc with no test, possible model on line 1457

vim +1442 drivers/net/ethernet/sfc/ptp.c

5d0dab01175bff0 Ben Hutchings   2013-10-16  1434  
ac36baf817c39fc Ben Hutchings   2013-10-15  1435  /* Initialise PTP state. */
ac36baf817c39fc Ben Hutchings   2013-10-15  1436  int efx_ptp_probe(struct efx_nic *efx, struct efx_channel *channel)
7c236c43b838221 Stuart Hodgson  2012-09-03  1437  {
7c236c43b838221 Stuart Hodgson  2012-09-03  1438  	struct efx_ptp_data *ptp;
7c236c43b838221 Stuart Hodgson  2012-09-03  1439  	int rc = 0;
7c236c43b838221 Stuart Hodgson  2012-09-03  1440  	unsigned int pos;
7c236c43b838221 Stuart Hodgson  2012-09-03  1441  
7c236c43b838221 Stuart Hodgson  2012-09-03 @1442  	ptp = kzalloc(sizeof(struct efx_ptp_data), GFP_KERNEL);
7c236c43b838221 Stuart Hodgson  2012-09-03  1443  	efx->ptp_data = ptp;
7c236c43b838221 Stuart Hodgson  2012-09-03  1444  	if (!efx->ptp_data)
7c236c43b838221 Stuart Hodgson  2012-09-03  1445  		return -ENOMEM;
7c236c43b838221 Stuart Hodgson  2012-09-03  1446  
ac36baf817c39fc Ben Hutchings   2013-10-15  1447  	ptp->efx = efx;
ac36baf817c39fc Ben Hutchings   2013-10-15  1448  	ptp->channel = channel;
bd9a265db26cdbf Jon Cooper      2013-11-18  1449  	ptp->rx_ts_inline = efx_nic_rev(efx) >= EFX_REV_HUNT_A0;
ac36baf817c39fc Ben Hutchings   2013-10-15  1450  
0d19a540beb7849 Ben Hutchings   2012-09-18  1451  	rc = efx_nic_alloc_buffer(efx, &ptp->start, sizeof(int), GFP_KERNEL);
7c236c43b838221 Stuart Hodgson  2012-09-03  1452  	if (rc != 0)
7c236c43b838221 Stuart Hodgson  2012-09-03  1453  		goto fail1;
7c236c43b838221 Stuart Hodgson  2012-09-03  1454  
7c236c43b838221 Stuart Hodgson  2012-09-03  1455  	skb_queue_head_init(&ptp->rxq);
7c236c43b838221 Stuart Hodgson  2012-09-03  1456  	skb_queue_head_init(&ptp->txq);
7c236c43b838221 Stuart Hodgson  2012-09-03 @1457  	ptp->workwq = create_singlethread_workqueue("sfc_ptp");
7c236c43b838221 Stuart Hodgson  2012-09-03  1458  	if (!ptp->workwq) {
7c236c43b838221 Stuart Hodgson  2012-09-03  1459  		rc = -ENOMEM;
7c236c43b838221 Stuart Hodgson  2012-09-03  1460  		goto fail2;
7c236c43b838221 Stuart Hodgson  2012-09-03  1461  	}
7c236c43b838221 Stuart Hodgson  2012-09-03  1462  
2935e3c38228ad9 Edward Cree     2018-01-25  1463  	if (efx_ptp_use_mac_tx_timestamps(efx)) {
23418dc131464ff Martin Habets   2018-01-25  1464  		ptp->xmit_skb = efx_ptp_xmit_skb_queue;
2935e3c38228ad9 Edward Cree     2018-01-25  1465  		/* Request sync events on this channel. */
2935e3c38228ad9 Edward Cree     2018-01-25  1466  		channel->sync_events_state = SYNC_EVENTS_QUIESCENT;
2935e3c38228ad9 Edward Cree     2018-01-25  1467  	} else {
23418dc131464ff Martin Habets   2018-01-25  1468  		ptp->xmit_skb = efx_ptp_xmit_skb_mc;
2935e3c38228ad9 Edward Cree     2018-01-25  1469  	}
23418dc131464ff Martin Habets   2018-01-25  1470  
7c236c43b838221 Stuart Hodgson  2012-09-03  1471  	INIT_WORK(&ptp->work, efx_ptp_worker);
7c236c43b838221 Stuart Hodgson  2012-09-03  1472  	ptp->config.flags = 0;
7c236c43b838221 Stuart Hodgson  2012-09-03  1473  	ptp->config.tx_type = HWTSTAMP_TX_OFF;
7c236c43b838221 Stuart Hodgson  2012-09-03  1474  	ptp->config.rx_filter = HWTSTAMP_FILTER_NONE;
7c236c43b838221 Stuart Hodgson  2012-09-03  1475  	INIT_LIST_HEAD(&ptp->evt_list);
7c236c43b838221 Stuart Hodgson  2012-09-03  1476  	INIT_LIST_HEAD(&ptp->evt_free_list);
7c236c43b838221 Stuart Hodgson  2012-09-03  1477  	spin_lock_init(&ptp->evt_lock);
7c236c43b838221 Stuart Hodgson  2012-09-03  1478  	for (pos = 0; pos < MAX_RECEIVE_EVENTS; pos++)
7c236c43b838221 Stuart Hodgson  2012-09-03  1479  		list_add(&ptp->rx_evts[pos].link, &ptp->evt_free_list);
7c236c43b838221 Stuart Hodgson  2012-09-03  1480  
a6f73460b592404 Laurence Evans  2013-12-04  1481  	/* Get the NIC PTP attributes and set up time conversions */
a6f73460b592404 Laurence Evans  2013-12-04  1482  	rc = efx_ptp_get_attributes(efx);
a6f73460b592404 Laurence Evans  2013-12-04  1483  	if (rc < 0)
a6f73460b592404 Laurence Evans  2013-12-04  1484  		goto fail3;
a6f73460b592404 Laurence Evans  2013-12-04  1485  
a6f73460b592404 Laurence Evans  2013-12-04  1486  	/* Get the timestamp corrections */
a6f73460b592404 Laurence Evans  2013-12-04  1487  	rc = efx_ptp_get_timestamp_corrections(efx);
a6f73460b592404 Laurence Evans  2013-12-04  1488  	if (rc < 0)
a6f73460b592404 Laurence Evans  2013-12-04  1489  		goto fail3;
a6f73460b592404 Laurence Evans  2013-12-04  1490  
9aecda95d0a2865 Ben Hutchings   2013-12-05  1491  	if (efx->mcdi->fn_flags &
9aecda95d0a2865 Ben Hutchings   2013-12-05  1492  	    (1 << MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_PRIMARY)) {
5d0dab01175bff0 Ben Hutchings   2013-10-16  1493  		ptp->phc_clock_info = efx_phc_clock_info;
1ef761582c07444 Richard Cochran 2012-09-22  1494  		ptp->phc_clock = ptp_clock_register(&ptp->phc_clock_info,
1ef761582c07444 Richard Cochran 2012-09-22  1495  						    &efx->pci_dev->dev);
155d940a78fd076 Wei Yongjun     2013-05-07  1496  		if (IS_ERR(ptp->phc_clock)) {
155d940a78fd076 Wei Yongjun     2013-05-07  1497  			rc = PTR_ERR(ptp->phc_clock);
7c236c43b838221 Stuart Hodgson  2012-09-03  1498  			goto fail3;
efee95f42b5ddde Nicolas Pitre   2016-09-20  1499  		} else if (ptp->phc_clock) {
7c236c43b838221 Stuart Hodgson  2012-09-03  1500  			INIT_WORK(&ptp->pps_work, efx_ptp_pps_worker);
7c236c43b838221 Stuart Hodgson  2012-09-03  1501  			ptp->pps_workwq = create_singlethread_workqueue("sfc_pps");
7c236c43b838221 Stuart Hodgson  2012-09-03  1502  			if (!ptp->pps_workwq) {
7c236c43b838221 Stuart Hodgson  2012-09-03  1503  				rc = -ENOMEM;
7c236c43b838221 Stuart Hodgson  2012-09-03  1504  				goto fail4;
7c236c43b838221 Stuart Hodgson  2012-09-03  1505  			}
9aecda95d0a2865 Ben Hutchings   2013-12-05  1506  		}
efee95f42b5ddde Nicolas Pitre   2016-09-20  1507  	}
7c236c43b838221 Stuart Hodgson  2012-09-03  1508  	ptp->nic_ts_enabled = false;
7c236c43b838221 Stuart Hodgson  2012-09-03  1509  
7c236c43b838221 Stuart Hodgson  2012-09-03  1510  	return 0;
7c236c43b838221 Stuart Hodgson  2012-09-03  1511  fail4:
7c236c43b838221 Stuart Hodgson  2012-09-03  1512  	ptp_clock_unregister(efx->ptp_data->phc_clock);
7c236c43b838221 Stuart Hodgson  2012-09-03  1513  
7c236c43b838221 Stuart Hodgson  2012-09-03  1514  fail3:
7c236c43b838221 Stuart Hodgson  2012-09-03  1515  	destroy_workqueue(efx->ptp_data->workwq);
7c236c43b838221 Stuart Hodgson  2012-09-03  1516  
7c236c43b838221 Stuart Hodgson  2012-09-03  1517  fail2:
7c236c43b838221 Stuart Hodgson  2012-09-03  1518  	efx_nic_free_buffer(efx, &ptp->start);
7c236c43b838221 Stuart Hodgson  2012-09-03  1519  
7c236c43b838221 Stuart Hodgson  2012-09-03  1520  fail1:
7c236c43b838221 Stuart Hodgson  2012-09-03  1521  	kfree(efx->ptp_data);
7c236c43b838221 Stuart Hodgson  2012-09-03  1522  	efx->ptp_data = NULL;
7c236c43b838221 Stuart Hodgson  2012-09-03  1523  
7c236c43b838221 Stuart Hodgson  2012-09-03  1524  	return rc;
7c236c43b838221 Stuart Hodgson  2012-09-03  1525  }
7c236c43b838221 Stuart Hodgson  2012-09-03  1526  

---
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: 28439 bytes --]

  parent reply	other threads:[~2020-07-04  4:17 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03 15:28 [PATCH net-next 00/15] sfc_ef100: driver for EF100 family NICs, part 1 Edward Cree
2020-07-03 15:30 ` [PATCH net-next 01/15] sfc_ef100: add EF100 register definitions Edward Cree
2020-07-03 15:30 ` [PATCH net-next 02/15] sfc_ef100: register accesses on EF100 Edward Cree
2020-07-03 15:31 ` [PATCH net-next 03/15] sfc_ef100: skeleton EF100 PF driver Edward Cree
2020-07-03 17:43   ` Jakub Kicinski
2020-07-03 17:46   ` kernel test robot
2020-07-08 19:16     ` Edward Cree
2020-07-03 17:46   ` [RFC PATCH] sfc_ef100: ef100_hard_start_xmit() can be static kernel test robot
2020-07-03 19:41   ` [PATCH net-next 03/15] sfc_ef100: skeleton EF100 PF driver kernel test robot
2020-07-04  4:16   ` kernel test robot [this message]
2020-07-07 18:34     ` Edward Cree
2020-07-08  3:15       ` [kbuild-all] " Xia, Hui
2020-07-03 15:31 ` [PATCH net-next 04/15] sfc_ef100: reset-handling stub Edward Cree
2020-07-03 15:32 ` [PATCH net-next 05/15] sfc_ef100: PHY probe stub Edward Cree
2020-07-03 15:32 ` [PATCH net-next 06/15] sfc_ef100: don't call efx_reset_down()/up() on EF100 Edward Cree
2020-07-04  2:15   ` kernel test robot
2020-07-03 15:33 ` [PATCH net-next 07/15] sfc_ef100: implement MCDI transport Edward Cree
2020-07-03 15:33 ` [PATCH net-next 08/15] sfc_ef100: implement ndo_open/close and EVQ probing Edward Cree
2020-07-03 15:34 ` [PATCH net-next 09/15] sfc_ef100: process events for MCDI completions Edward Cree
2020-07-03 15:34 ` [PATCH net-next 10/15] sfc_ef100: read datapath caps, implement check_caps Edward Cree
2020-07-03 15:35 ` [PATCH net-next 11/15] sfc_ef100: extend ef100_check_caps to cover datapath_caps3 Edward Cree
2020-07-03 15:35 ` [PATCH net-next 12/15] sfc_ef100: actually perform resets Edward Cree
2020-07-03 15:35 ` [PATCH net-next 13/15] sfc_ef100: probe the PHY and configure the MAC Edward Cree
2020-07-03 15:36 ` [PATCH net-next 14/15] sfc_ef100: read device MAC address at probe time Edward Cree
2020-07-03 15:36 ` [PATCH net-next 15/15] sfc_ef100: implement ndo_get_phys_port_{id,name} Edward Cree

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=202007041218.2NXltj0z%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=ecree@solarflare.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-net-drivers@solarflare.com \
    --cc=netdev@vger.kernel.org \
    /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 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).