these variables were only being assigned some values, but were never
used.
Signed-off-by: Sudip Mukherjee <redacted>
---
drivers/net/ethernet/intel/e1000/e1000_hw.c | 142 ++++++++++++--------------
drivers/net/ethernet/intel/e1000/e1000_main.c | 3 -
2 files changed, 66 insertions(+), 79 deletions(-)
@@ -163,7 +162,7 @@ static void e1000_phy_init_script(struct e1000_hw *hw)/* Save off the current value of register 0x2F5B to be restored*attheendofthisroutine.*/-ret_val=e1000_read_phy_reg(hw,0x2F5B,&phy_saved_data);+e1000_read_phy_reg(hw,0x2F5B,&phy_saved_data);/* Disabled the PHY transmitter */e1000_write_phy_reg(hw,0x2F5B,0x0003);
@@ -527,7 +525,7 @@ s32 e1000_reset_hw(struct e1000_hw *hw)ew32(IMC,0xffffffff);/* Clear any pending interrupt events. */-icr=er32(ICR);+er32(ICR);/* If MWI was previously enabled, reenable it. */if(hw->mac_type==e1000_82542_rev2_0){
@@ -2396,16 +2394,13 @@ static s32 e1000_check_for_serdes_link_generic(struct e1000_hw *hw)*/s32e1000_check_for_link(structe1000_hw*hw){-u32rxcw=0;-u32ctrl;u32status;u32rctl;u32icr;-u32signal=0;s32ret_val;u16phy_data;-ctrl=er32(CTRL);+er32(CTRL);status=er32(STATUS);/* On adapters with a MAC newer than 82544, SW Definable pin 1 will be
--
1.8.1.2
------------------------------------------------------------------------------
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® Ethernet, visit http://communities.intel.com/community/wired
From: Hisashi T Fujinaka <hidden> Date: 2014-11-27 06:09:14
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.
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.
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:
quoted hunk
these variables were only being assigned some values, but were never
used.
Signed-off-by: Sudip Mukherjee <redacted>
---
drivers/net/ethernet/intel/e1000/e1000_hw.c | 142 ++++++++++++--------------
drivers/net/ethernet/intel/e1000/e1000_main.c | 3 -
2 files changed, 66 insertions(+), 79 deletions(-)
/* Save off the current value of register 0x2F5B to be restored
* at the end of this routine.
*/
- ret_val = e1000_read_phy_reg(hw, 0x2F5B, &phy_saved_data);
+ e1000_read_phy_reg(hw, 0x2F5B, &phy_saved_data);
/* Disabled the PHY transmitter */
e1000_write_phy_reg(hw, 0x2F5B, 0x0003);
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..
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:
quoted
these variables were only being assigned some values, but were never
used.
Signed-off-by: Sudip Mukherjee <redacted>
---
drivers/net/ethernet/intel/e1000/e1000_hw.c | 142 ++++++++++++--------------
<snip>
quoted
case SPEED_100:
- txb2b = false;
/* maybe add some timeout factor ? */
break;
}
On Wed, Nov 26, 2014 at 09:59:28PM -0800, Hisashi T Fujinaka wrote:
quoted
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.
quoted
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
quoted
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:
quoted
these variables were only being assigned some values, but were never
used.
Signed-off-by: Sudip Mukherjee <redacted>
---
drivers/net/ethernet/intel/e1000/e1000_hw.c | 142 ++++++++++++--------------
<snip>
quoted
quoted
case SPEED_100:
- txb2b = false;
/* maybe add some timeout factor ? */
break;
}
--
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
Also, if you do a read that is not stored in any return value, the
compiler is now free to remove that actual read,
This does not apply to reads from iomem (see "volatile" specifier in
readl()).
Regards,
Lino
------------------------------------------------------------------------------
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® Ethernet, visit http://communities.intel.com/community/wired
From: Ben Hutchings <hidden> Date: 2014-11-30 01:45:41
On Wed, 2014-11-26 at 21:59 -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 there were double register reads being replaced with single register
reads, I'd agree this was likely to introduce a regression. But all I
see is var = er32(REG) being changed to er32(REG).
Ben.
--
Ben Hutchings
The world is coming to an end. Please log off.
On Sun, Nov 30, 2014 at 01:45:13AM +0000, Ben Hutchings wrote:
On Wed, 2014-11-26 at 21:59 -0800, Hisashi T Fujinaka wrote:
quoted
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 there were double register reads being replaced with single register
reads, I'd agree this was likely to introduce a regression. But all I
see is var = er32(REG) being changed to er32(REG).
no, double register reads are not modified. only the unused variables are removed.
thanks
sudip
Ben.
--
Ben Hutchings
The world is coming to an end. Please log off.
After discussing this locally, I'd like to NAK it because this could cause regressions to parts that are still in use but we don't have access to. Also, the assignment was necessary in the past for some versions of gcc and since this may be used in embedded systems using older compilers, we should leave it be.
Thanks.
Todd Fujinaka
Software Application Engineer
Networking Division (ND)
Intel Corporation
todd.fujinaka@intel.com
(503) 712-4565
-----Original Message-----
From: linux-nics-bounces@isotope.jf.intel.com [mailto:linux-nics-bounces@isotope.jf.intel.com] On Behalf Of Sudip Mukherjee
Sent: Sunday, November 30, 2014 8:55 PM
To: Ben Hutchings
Cc: Linux NICS; e1000-devel@lists.sourceforge.net; Hisashi T Fujinaka; Vick, Matthew; Greg@isotope.jf.intel.com; Kirsher, Jeffrey T; netdev@vger.kernel.org; Wyborny, Carolyn; John@isotope.jf.intel.com; linux-kernel@vger.kernel.org
Subject: Re: [linux-nics] [PATCH] e1000: remove unused variables
On Sun, Nov 30, 2014 at 01:45:13AM +0000, Ben Hutchings wrote:
On Wed, 2014-11-26 at 21:59 -0800, Hisashi T Fujinaka wrote:
quoted
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 there were double register reads being replaced with single
register reads, I'd agree this was likely to introduce a regression.
But all I see is var = er32(REG) being changed to er32(REG).
no, double register reads are not modified. only the unused variables are removed.
thanks
sudip
Ben.
--
Ben Hutchings
The world is coming to an end. Please log off.
_______________________________________________
Linux-nics mailing list
Linux-nics@intel.com
On Mon, Dec 01, 2014 at 06:56:46PM +0000, Fujinaka, Todd wrote:
After discussing this locally, I'd like to NAK it because this could cause regressions to parts that are still in use but we don't have access to. Also, the assignment was necessary in the past for some versions of gcc and since this may be used in embedded systems using older compilers, we should leave it be.
ok. i understand.
just a thought:
maybe you can put a comment in the file that these are there for a reason and should not be removed. else, you might receive the same type of patch again from someone else.
thanks
sudip
Thanks.
Todd Fujinaka
Software Application Engineer
Networking Division (ND)
Intel Corporation
todd.fujinaka@intel.com
(503) 712-4565
-----Original Message-----
From: linux-nics-bounces@isotope.jf.intel.com [mailto:linux-nics-bounces@isotope.jf.intel.com] On Behalf Of Sudip Mukherjee
Sent: Sunday, November 30, 2014 8:55 PM
To: Ben Hutchings
Cc: Linux NICS; e1000-devel@lists.sourceforge.net; Hisashi T Fujinaka; Vick, Matthew; Greg@isotope.jf.intel.com; Kirsher, Jeffrey T; netdev@vger.kernel.org; Wyborny, Carolyn; John@isotope.jf.intel.com; linux-kernel@vger.kernel.org
Subject: Re: [linux-nics] [PATCH] e1000: remove unused variables
On Sun, Nov 30, 2014 at 01:45:13AM +0000, Ben Hutchings wrote:
quoted
On Wed, 2014-11-26 at 21:59 -0800, Hisashi T Fujinaka wrote:
quoted
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 there were double register reads being replaced with single
register reads, I'd agree this was likely to introduce a regression.
But all I see is var = er32(REG) being changed to er32(REG).
no, double register reads are not modified. only the unused variables are removed.
thanks
sudip
quoted
Ben.
--
Ben Hutchings
The world is coming to an end. Please log off.
_______________________________________________
Linux-nics mailing list
Linux-nics@intel.com