netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jakub.kicinski@netronome.com
Cc: jeffrey.t.kirsher@intel.com, paul.greenwalt@intel.com,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	andrewx.bowers@intel.com
Subject: Re: [net-next v2 04/14] ice: fix set pause param autoneg check
Date: Mon, 19 Aug 2019 16:59:55 -0700 (PDT)	[thread overview]
Message-ID: <20190819.165955.1428577625599018007.davem@davemloft.net> (raw)
In-Reply-To: <20190819161142.6f4cc14d@cakuba.netronome.com>

From: Jakub Kicinski <jakub.kicinski@netronome.com>
Date: Mon, 19 Aug 2019 16:11:42 -0700

> On Mon, 19 Aug 2019 09:16:58 -0700, Jeff Kirsher wrote:
>> +	pcaps = devm_kzalloc(&vsi->back->pdev->dev, sizeof(*pcaps),
>> +			     GFP_KERNEL);
>> +	if (!pcaps)
>> +		return -ENOMEM;
>> +
>> +	/* Get current PHY config */
>> +	status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_SW_CFG, pcaps,
>> +				     NULL);
>> +	if (status) {
>> +		devm_kfree(&vsi->back->pdev->dev, pcaps);
>> +		return -EIO;
>> +	}
>> +
>> +	is_an = ((pcaps->caps & ICE_AQC_PHY_AN_MODE) ?
>> +			AUTONEG_ENABLE : AUTONEG_DISABLE);
>> +
>> +	devm_kfree(&vsi->back->pdev->dev, pcaps);
> 
> Is it just me or is this use of devm_k*alloc absolutely pointless?

Yeah it looks like an overzealous use of these interfaces to me too.

  reply	other threads:[~2019-08-20  0:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 16:16 [net-next v2 00/14][pull request] 100GbE Intel Wired LAN Driver Updates 2019-08-19 Jeff Kirsher
2019-08-19 16:16 ` [net-next v2 01/14] ice: Use the software based tail when checking for hung Tx ring Jeff Kirsher
2019-08-19 16:16 ` [net-next v2 02/14] ice: Assume that more than one Rx queue is rare in ice_napi_poll Jeff Kirsher
2019-08-19 16:16 ` [net-next v2 03/14] ice: Restructure VFs initialization flows Jeff Kirsher
2019-08-19 16:16 ` [net-next v2 04/14] ice: fix set pause param autoneg check Jeff Kirsher
2019-08-19 23:11   ` Jakub Kicinski
2019-08-19 23:59     ` David Miller [this message]
2019-08-20  1:31   ` David Miller
2019-08-19 16:16 ` [net-next v2 05/14] ice: Set WB_ON_ITR when we don't re-enable interrupts Jeff Kirsher
2019-08-19 16:17 ` [net-next v2 06/14] ice: Fix kernel hang with DCB reset in CEE mode Jeff Kirsher
2019-08-19 16:17 ` [net-next v2 07/14] ice: allow empty Rx descriptors Jeff Kirsher
2019-08-19 16:17 ` [net-next v2 08/14] ice: Do not always bring up PF VSI in ice_ena_vsi() Jeff Kirsher
2019-08-19 16:17 ` [net-next v2 09/14] ice: update GLINT_DYN_CTL and GLINT_VECT2FUNC register access Jeff Kirsher
2019-08-19 16:17 ` [net-next v2 10/14] ice: Reduce wait times during VF bringup/reset Jeff Kirsher
2019-08-19 16:17 ` [net-next v2 11/14] ice: Increase size of Mailbox receive queue for many VFs Jeff Kirsher
2019-08-19 16:17 ` [net-next v2 12/14] ice: Move VF resources definition to SR-IOV specific file Jeff Kirsher
2019-08-19 16:17 ` [net-next v2 13/14] ice: Change type for queue counts Jeff Kirsher
2019-08-19 16:17 ` [net-next v2 14/14] ice: improve print for VF's when adding/deleting MAC filters Jeff Kirsher
2019-08-19 23:16 ` [net-next v2 00/14][pull request] 100GbE Intel Wired LAN Driver Updates 2019-08-19 Jakub Kicinski

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=20190819.165955.1428577625599018007.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=andrewx.bowers@intel.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=paul.greenwalt@intel.com \
    --cc=sassmann@redhat.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 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).