All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v3 net-next 04/12] net: aquantia: add PTP rings infrastructure
Date: Thu, 24 Oct 2019 02:18:49 +0800	[thread overview]
Message-ID: <201910240114.dBccbC6D%lkp@intel.com> (raw)
In-Reply-To: <855844d84a191bc00b9fb847d665f6e16ab131f5.1571737612.git.igor.russkikh@aquantia.com>

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

Hi Igor,

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/Igor-Russkikh/net-aquantia-PTP-support-for-AQC-devices/20191023-194531
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 88652bf8ce4b91c49769a2a49c17dc44b85b4fa2
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-dirty
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

>> drivers/net/ethernet/aquantia/atlantic/aq_ptp.c:258:34: sparse: sparse: Using plain integer as NULL pointer

vim +258 drivers/net/ethernet/aquantia/atlantic/aq_ptp.c

   253	
   254	int aq_ptp_ring_alloc(struct aq_nic_s *aq_nic)
   255	{
   256		struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp;
   257		unsigned int tx_ring_idx, rx_ring_idx;
 > 258		struct aq_ring_s *hwts = 0;
   259		u32 tx_tc_mode, rx_tc_mode;
   260		struct aq_ring_s *ring;
   261		int err;
   262	
   263		if (!aq_ptp)
   264			return 0;
   265	
   266		/* Index must to be 8 (8 TCs) or 16 (4 TCs).
   267		 * It depends from Traffic Class mode.
   268		 */
   269		aq_nic->aq_hw_ops->hw_tx_tc_mode_get(aq_nic->aq_hw, &tx_tc_mode);
   270		if (tx_tc_mode == 0)
   271			tx_ring_idx = PTP_8TC_RING_IDX;
   272		else
   273			tx_ring_idx = PTP_4TC_RING_IDX;
   274	
   275		ring = aq_ring_tx_alloc(&aq_ptp->ptp_tx, aq_nic,
   276					tx_ring_idx, &aq_nic->aq_nic_cfg);
   277		if (!ring) {
   278			err = -ENOMEM;
   279			goto err_exit;
   280		}
   281	
   282		aq_nic->aq_hw_ops->hw_rx_tc_mode_get(aq_nic->aq_hw, &rx_tc_mode);
   283		if (rx_tc_mode == 0)
   284			rx_ring_idx = PTP_8TC_RING_IDX;
   285		else
   286			rx_ring_idx = PTP_4TC_RING_IDX;
   287	
   288		ring = aq_ring_rx_alloc(&aq_ptp->ptp_rx, aq_nic,
   289					rx_ring_idx, &aq_nic->aq_nic_cfg);
   290		if (!ring) {
   291			err = -ENOMEM;
   292			goto err_exit_ptp_tx;
   293		}
   294	
   295		hwts = aq_ring_hwts_rx_alloc(&aq_ptp->hwts_rx, aq_nic, PTP_HWST_RING_IDX,
   296					     aq_nic->aq_nic_cfg.rxds,
   297					     aq_nic->aq_nic_cfg.aq_hw_caps->rxd_size);
   298		if (!hwts) {
   299			err = -ENOMEM;
   300			goto err_exit_ptp_rx;
   301		}
   302	
   303		err = aq_ptp_skb_ring_init(&aq_ptp->skb_ring, aq_nic->aq_nic_cfg.rxds);
   304		if (err != 0) {
   305			err = -ENOMEM;
   306			goto err_exit_hwts_rx;
   307		}
   308	
   309		return 0;
   310	
   311	err_exit_hwts_rx:
   312		aq_ring_free(&aq_ptp->hwts_rx);
   313	err_exit_ptp_rx:
   314		aq_ring_free(&aq_ptp->ptp_rx);
   315	err_exit_ptp_tx:
   316		aq_ring_free(&aq_ptp->ptp_tx);
   317	err_exit:
   318		return err;
   319	}
   320	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Igor Russkikh <Igor.Russkikh@aquantia.com>
Cc: kbuild-all@lists.01.org,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"richardcochran@gmail.com" <richardcochran@gmail.com>,
	"epomozov@marvell.com" <epomozov@marvell.com>,
	Dmitry Bezrukov <Dmitry.Bezrukov@aquantia.com>,
	"andrew@lunn.ch" <andrew@lunn.ch>,
	Simon Edelhaus <sedelhaus@marvell.com>,
	Igor Russkikh <Igor.Russkikh@aquantia.com>,
	Sergey Samoilenko <Sergey.Samoilenko@aquantia.com>
Subject: Re: [PATCH v3 net-next 04/12] net: aquantia: add PTP rings infrastructure
Date: Thu, 24 Oct 2019 02:18:49 +0800	[thread overview]
Message-ID: <201910240114.dBccbC6D%lkp@intel.com> (raw)
In-Reply-To: <855844d84a191bc00b9fb847d665f6e16ab131f5.1571737612.git.igor.russkikh@aquantia.com>

Hi Igor,

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/Igor-Russkikh/net-aquantia-PTP-support-for-AQC-devices/20191023-194531
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 88652bf8ce4b91c49769a2a49c17dc44b85b4fa2
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-dirty
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

>> drivers/net/ethernet/aquantia/atlantic/aq_ptp.c:258:34: sparse: sparse: Using plain integer as NULL pointer

vim +258 drivers/net/ethernet/aquantia/atlantic/aq_ptp.c

   253	
   254	int aq_ptp_ring_alloc(struct aq_nic_s *aq_nic)
   255	{
   256		struct aq_ptp_s *aq_ptp = aq_nic->aq_ptp;
   257		unsigned int tx_ring_idx, rx_ring_idx;
 > 258		struct aq_ring_s *hwts = 0;
   259		u32 tx_tc_mode, rx_tc_mode;
   260		struct aq_ring_s *ring;
   261		int err;
   262	
   263		if (!aq_ptp)
   264			return 0;
   265	
   266		/* Index must to be 8 (8 TCs) or 16 (4 TCs).
   267		 * It depends from Traffic Class mode.
   268		 */
   269		aq_nic->aq_hw_ops->hw_tx_tc_mode_get(aq_nic->aq_hw, &tx_tc_mode);
   270		if (tx_tc_mode == 0)
   271			tx_ring_idx = PTP_8TC_RING_IDX;
   272		else
   273			tx_ring_idx = PTP_4TC_RING_IDX;
   274	
   275		ring = aq_ring_tx_alloc(&aq_ptp->ptp_tx, aq_nic,
   276					tx_ring_idx, &aq_nic->aq_nic_cfg);
   277		if (!ring) {
   278			err = -ENOMEM;
   279			goto err_exit;
   280		}
   281	
   282		aq_nic->aq_hw_ops->hw_rx_tc_mode_get(aq_nic->aq_hw, &rx_tc_mode);
   283		if (rx_tc_mode == 0)
   284			rx_ring_idx = PTP_8TC_RING_IDX;
   285		else
   286			rx_ring_idx = PTP_4TC_RING_IDX;
   287	
   288		ring = aq_ring_rx_alloc(&aq_ptp->ptp_rx, aq_nic,
   289					rx_ring_idx, &aq_nic->aq_nic_cfg);
   290		if (!ring) {
   291			err = -ENOMEM;
   292			goto err_exit_ptp_tx;
   293		}
   294	
   295		hwts = aq_ring_hwts_rx_alloc(&aq_ptp->hwts_rx, aq_nic, PTP_HWST_RING_IDX,
   296					     aq_nic->aq_nic_cfg.rxds,
   297					     aq_nic->aq_nic_cfg.aq_hw_caps->rxd_size);
   298		if (!hwts) {
   299			err = -ENOMEM;
   300			goto err_exit_ptp_rx;
   301		}
   302	
   303		err = aq_ptp_skb_ring_init(&aq_ptp->skb_ring, aq_nic->aq_nic_cfg.rxds);
   304		if (err != 0) {
   305			err = -ENOMEM;
   306			goto err_exit_hwts_rx;
   307		}
   308	
   309		return 0;
   310	
   311	err_exit_hwts_rx:
   312		aq_ring_free(&aq_ptp->hwts_rx);
   313	err_exit_ptp_rx:
   314		aq_ring_free(&aq_ptp->ptp_rx);
   315	err_exit_ptp_tx:
   316		aq_ring_free(&aq_ptp->ptp_tx);
   317	err_exit:
   318		return err;
   319	}
   320	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

  reply	other threads:[~2019-10-23 18:18 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22  9:53 [PATCH v3 net-next 00/12] net: aquantia: PTP support for AQC devices Igor Russkikh
2019-10-22  9:53 ` [PATCH v3 net-next 01/12] net: aquantia: PTP skeleton declarations and callbacks Igor Russkikh
2019-10-22  9:53 ` [PATCH v3 net-next 02/12] net: aquantia: unify styling of bit enums Igor Russkikh
2019-10-22  9:53 ` [PATCH v3 net-next 03/12] net: aquantia: add basic ptp_clock callbacks Igor Russkikh
2019-10-24 14:04   ` Richard Cochran
2019-10-22  9:53 ` [PATCH v3 net-next 04/12] net: aquantia: add PTP rings infrastructure Igor Russkikh
2019-10-23 18:18   ` kbuild test robot [this message]
2019-10-23 18:18     ` kbuild test robot
2019-10-22  9:53 ` [PATCH v3 net-next 05/12] net: aquantia: styling fixes on ptp related functions Igor Russkikh
2019-10-22  9:53 ` [PATCH v3 net-next 06/12] net: aquantia: implement data PTP datapath Igor Russkikh
2019-10-23 19:44   ` kbuild test robot
2019-10-23 19:44     ` kbuild test robot
2019-10-22  9:53 ` [PATCH v3 net-next 07/12] net: aquantia: rx filters for ptp Igor Russkikh
2019-10-22  9:53 ` [PATCH v3 net-next 08/12] net: aquantia: add support for ptp ioctls Igor Russkikh
2019-10-22  9:53 ` [PATCH v3 net-next 09/12] net: aquantia: implement get_ts_info ethtool Igor Russkikh
2019-10-22  9:53 ` [PATCH v3 net-next 10/12] net: aquantia: add support for Phy access Igor Russkikh
2019-10-22 12:35   ` Andrew Lunn
2019-10-22  9:53 ` [PATCH v3 net-next 11/12] net: aquantia: add support for PIN funcs Igor Russkikh
2019-10-23 21:15   ` kbuild test robot
2019-10-23 21:15     ` kbuild test robot
2019-10-23 21:15   ` [RFC PATCH] net: aquantia: aq_ptp_poll_sync_work_cb() can be static kbuild test robot
2019-10-23 21:15     ` kbuild test robot
2019-10-24 14:11   ` [PATCH v3 net-next 11/12] net: aquantia: add support for PIN funcs Richard Cochran
2019-10-22  9:53 ` [PATCH v3 net-next 12/12] net: aquantia: adding atlantic ptp maintainer Igor Russkikh
2019-10-24 14:12 ` [PATCH v3 net-next 00/12] net: aquantia: PTP support for AQC devices Richard Cochran
2019-10-24 16:51   ` David Miller
2019-10-25 14:35     ` Igor Russkikh

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=201910240114.dBccbC6D%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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 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.