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 <l...@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-...@lists.01.org
.config.gz
Description: application/gzip