All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kok, Auke" <auke-jan.h.kok@intel.com>
To: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: jeff@garzik.org, bruce.w.allan@intel.com,
	jeffrey.t.kirsher@intel.com, jesse.brandeburg@intel.com,
	cramerj@intel.com, john.ronciak@intel.com, arjan@linux.intel.com,
	akpm@linux-foundation.org, netdev@vger.kernel.org
Subject: Re: [PATCH 19/19] e1000: major part of the new API changes
Date: Fri, 30 Mar 2007 13:56:32 -0700	[thread overview]
Message-ID: <460D7980.5090600@intel.com> (raw)
In-Reply-To: <460D70D9.5020704@linux-foundation.org>

Stephen Hemminger wrote:
>>  
>> +s32
>> +e1000_alloc_zeroed_dev_spec_struct(struct e1000_hw *hw, u32 size)
>> +{
>> +	hw->dev_spec = kmalloc(size, GFP_KERNEL);
>> +
>> +	if (!hw->dev_spec)
>> +		return -ENOMEM;
>> +
>> +	memset(hw->dev_spec, 0, size);
>> +
>> +	return E1000_SUCCESS;
>> +}
>>   
> 
> This is what is wrong with a lot of the new code. It is written as
> verbose as possible.
> 
> What is wrong with open coded
>     hw->dev_spec = kzalloc(size, GFP_KERNEL).

nothing, I'll make sure that we change this. Please remember that this code was 
written over a period of about 1 year, and a lot of cleanups that happened in 
other parts of e1000 may very well have been overlooked. Also, it may be "ugly" 
but it's definately not wrong at all.

>> +
>> +void
>> +e1000_free_dev_spec_struct(struct e1000_hw *hw)
>> +{
>> +	if (!hw->dev_spec)
>> +		return;
>> +
>> +	kfree(hw->dev_spec);
>> +}
>> +
>>   
> Almost looks like you contracted this out to someone paid by the LOC.

will fix, thanks for the comments.

Auke


      reply	other threads:[~2007-03-30 20:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-29 16:33 [PATCH 00/19] e1000: hardware init layer update, new internal API Kok, Auke
2007-03-29 16:39 ` [PATCH 01/19] e1000: introduce new driver internal hardware API Auke Kok
2007-03-29 16:39 ` [PATCH 02/19] e1000: MAC specific parts of the new hardware layer code Auke Kok
2007-03-29 16:40 ` [PATCH 03/19] e1000: PHY specific " Auke Kok
2007-03-29 16:40 ` [PATCH 04/19] e1000: NVM specific hardware initialization code Auke Kok
2007-03-29 16:40 ` [PATCH 05/19] e1000: Add manageability " Auke Kok
2007-03-29 16:40 ` [PATCH 06/19] e1000: Add new register set code Auke Kok
2007-03-29 16:40 ` [PATCH 07/19] e1000: collect defines and macro's Auke Kok
2007-03-29 16:40 ` [PATCH 09/19] e1000: Add 82542 specific hardware code Auke Kok
2007-03-29 16:40 ` [PATCH 10/19] e1000: Add 82543 " Auke Kok
2007-03-29 16:40 ` [PATCH 11/19] e1000: Add 82540 " Auke Kok
2007-03-29 16:40 ` [PATCH 12/19] e1000: Add 82541 " Auke Kok
2007-03-29 16:40 ` [PATCH 13/19] e1000: Add 82571 " Auke Kok
2007-03-29 16:40 ` [PATCH 14/19] e1000: Add 80003es2lan (ESB2) " Auke Kok
2007-03-29 16:40 ` [PATCH 15/19] e1000: Add ICH8 lan " Auke Kok
2007-03-29 16:40 ` [PATCH 16/19] e1000: add new chipset-specific files and api files to the Makefile Auke Kok
2007-03-29 16:40 ` [PATCH 17/19] e1000: convert entire driver to new register naming Auke Kok
2007-03-29 16:40 ` [PATCH 18/19] e1000: adapter struct changes, new phy/mac substructs Auke Kok
2007-03-29 16:40 ` [PATCH 19/19] e1000: major part of the new API changes Auke Kok
2007-03-30 20:19   ` Stephen Hemminger
2007-03-30 20:56     ` Kok, Auke [this message]

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=460D7980.5090600@intel.com \
    --to=auke-jan.h.kok@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@linux.intel.com \
    --cc=bruce.w.allan@intel.com \
    --cc=cramerj@intel.com \
    --cc=jeff@garzik.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=john.ronciak@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.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.