All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nguyen, Anthony L" <anthony.l.nguyen@intel.com>
To: "davem@davemloft.net" <davem@davemloft.net>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>
Cc: "nhorman@redhat.com" <nhorman@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"Venkataramanan, Anirudh" <anirudh.venkataramanan@intel.com>,
	"sassmann@redhat.com" <sassmann@redhat.com>,
	"Bowers, AndrewX" <andrewx.bowers@intel.com>
Subject: Re: [net-next 01/15] ice: Use ice_ena_vsi and ice_dis_vsi in DCB configuration flow
Date: Fri, 8 Nov 2019 18:08:41 +0000	[thread overview]
Message-ID: <54c22ba9110b299f9f222cd1cffbdfb6ca6024d8.camel@intel.com> (raw)
In-Reply-To: <20191107.162550.125702977926999669.davem@davemloft.net>

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

On Thu, 2019-11-07 at 16:25 -0800, David Miller wrote:
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Thu,  7 Nov 2019 14:14:24 -0800
> 
> > @@ -169,15 +170,23 @@ int ice_pf_dcb_cfg(struct ice_pf *pf, struct
> > ice_dcbx_cfg *new_cfg, bool locked)
> >  	}
> >  
> >  	/* Store old config in case FW config fails */
> > -	old_cfg = devm_kzalloc(&pf->pdev->dev, sizeof(*old_cfg),
> > GFP_KERNEL);
> > -	memcpy(old_cfg, curr_cfg, sizeof(*old_cfg));
> > +	old_cfg = kmemdup(curr_cfg, sizeof(*old_cfg), GFP_KERNEL);
> 
> Why not use devm_kmemdup()?  Then you don't have to add the kfree()
> code paths.


https://lore.kernel.org/netdev/20190819161142.6f4cc14d@cakuba.netronome.com/

https://lore.kernel.org/netdev/20190819.165955.1428577625599018007.davem@davemloft.net/

https://lore.kernel.org/netdev/20190819.183158.1151163538921922149.davem@davemloft.net/

Our interpretation of this feedback was that it is unnecessary to use
devres variants of memory allocation/deallocation when memory is
alloc'd and freed in the same function. After getting this feedback, we
are changing the ice driver to follow this guideline and this change is
one of those.


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3277 bytes --]

  reply	other threads:[~2019-11-08 18:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07 22:14 [net-next 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2019-11-07 Jeff Kirsher
2019-11-07 22:14 ` [net-next 01/15] ice: Use ice_ena_vsi and ice_dis_vsi in DCB configuration flow Jeff Kirsher
2019-11-08  0:25   ` David Miller
2019-11-08 18:08     ` Nguyen, Anthony L [this message]
2019-11-08 20:34       ` David Miller
2019-11-07 22:14 ` [net-next 02/15] ice: Add NDO callback to set the maximum per-queue bitrate Jeff Kirsher
2019-11-07 22:14 ` [net-next 03/15] ice: Implement DCBNL support Jeff Kirsher
2019-11-08  0:27   ` David Miller
2019-11-08 18:09     ` Nguyen, Anthony L
2019-11-07 22:14 ` [net-next 04/15] ice: avoid setting features during reset Jeff Kirsher
2019-11-07 22:14 ` [net-next 05/15] ice: Fix to change Rx/Tx ring descriptor size via ethtool with DCBx Jeff Kirsher
2019-11-07 22:14 ` [net-next 06/15] ice: configure software LLDP in ice_init_pf_dcb Jeff Kirsher
2019-11-07 22:14 ` [net-next 07/15] ice: Check if VF is disabled for Opcode and other operations Jeff Kirsher
2019-11-07 22:14 ` [net-next 08/15] ice: Change max MSI-x vector_id check in cfg_irq_map Jeff Kirsher
2019-11-07 22:14 ` [net-next 09/15] ice: use pkg_dwnld_status instead of sq_last_status Jeff Kirsher
2019-11-07 22:14 ` [net-next 10/15] ice: delay less Jeff Kirsher
2019-11-07 22:14 ` [net-next 11/15] ice: Update enum ice_flg64_bits to current specification Jeff Kirsher
2019-11-07 22:14 ` [net-next 12/15] ice: remove unnecessary conditional check Jeff Kirsher
2019-11-07 22:14 ` [net-next 13/15] ice: Introduce and use ice_vsi_type_str Jeff Kirsher
2019-11-07 22:14 ` [net-next 14/15] ice: use more accurate ICE_DBG mask types Jeff Kirsher
2019-11-07 22:14 ` [net-next 15/15] ice: print opcode when printing controlq errors Jeff Kirsher

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=54c22ba9110b299f9f222cd1cffbdfb6ca6024d8.camel@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=andrewx.bowers@intel.com \
    --cc=anirudh.venkataramanan@intel.com \
    --cc=davem@davemloft.net \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.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 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.