netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
	Hisashi T Fujinaka <htodd@twofifty.com>
Cc: Linux NICS <linux.nics@intel.com>,
	e1000-devel@lists.sourceforge.net,
	Bruce Allan <bruce.w.allan@intel.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	linux-kernel@vger.kernel.org,
	John Ronciak <john.ronciak@intel.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH] e1000: remove unused variables
Date: Fri, 28 Nov 2014 15:28:55 -0800	[thread overview]
Message-ID: <54790537.809@gmail.com> (raw)
In-Reply-To: <20141127130725.GA12406@sudip-PC>

Le 27/11/2014 05:07, Sudip Mukherjee a écrit :
> On Wed, Nov 26, 2014 at 09:59:28PM -0800, Hisashi T Fujinaka wrote:
>> I'm pretty sure those double reads are there for a reason, so most of
>> this I'm going to have to check on Monday. We have a long holiday
>> weekend here in the US.
> 
> if the double reads are there for some reason, can you please let me know what that reason might be..

Could be latching, especially in the context of reading from Ethernet
PHYs, some registers are latched, so you may have to do a double read to
ensure the value you get is consistent.

Also, if you do a read that is not stored in any return value, the
compiler is now free to remove that actual read, and that may have other
side effects for registers which are e.g: read to clear, or any of the like.

> 
>>
>> I'm not sure why you're bothering with an old driver like this, but if
>> you haven't actually tried this on all the hardware it pertains to, I'm
>> going want to NAK this.
> 
> no it has not been tested on hardware.  :(
> 
> i am still in the learning process, NAK is also part of learning.
> 
> infact there is another part of the code, which, theoretically, will never get executed. but i didnot dare to send that removal patch without testing on the hardware.
> 
> thanks
> sudip
> 
>>
>> I should do this from my todd.fujinaka@intel.com account but it's 10PM
>> on the first day of a long holiday weekend.
>>
>> On Thu, 27 Nov 2014, Sudip Mukherjee wrote:
>>
>>> these variables were only being assigned some values, but were never
>>> used.
>>>
>>> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
>>> ---
>>> drivers/net/ethernet/intel/e1000/e1000_hw.c   | 142 ++++++++++++--------------
> <snip>
>>> 			case SPEED_100:
>>> -				txb2b = false;
>>> 				/* maybe add some timeout factor ? */
>>> 				break;
>>> 			}
>>>
>>
>> -- 
>> Hisashi T Fujinaka - htodd@twofifty.com
>> BSEE + BSChem + BAEnglish + MSCS + $2.50 = coffee
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

  reply	other threads:[~2014-11-28 23:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-27  5:22 [PATCH] e1000: remove unused variables Sudip Mukherjee
2014-11-27  5:59 ` Hisashi T Fujinaka
2014-11-27 13:07   ` Sudip Mukherjee
2014-11-28 23:28     ` Florian Fainelli [this message]
2014-11-29 11:01       ` Lino Sanfilippo
2014-11-30  1:45   ` Ben Hutchings
2014-12-01  4:54     ` Sudip Mukherjee
2014-12-01 18:56       ` [linux-nics] " Fujinaka, Todd
2014-12-02 14:24         ` Sudip Mukherjee

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=54790537.809@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=bruce.w.allan@intel.com \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=htodd@twofifty.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=john.ronciak@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux.nics@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.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).