lkml.org 
[lkml]   [2010]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 15/62] e1000: Use static const
    Date
    Using static const generally increases object text and decreases data size.
    It also generally decreases overall object size.

    text data bss dec hex filename
    74538 4296 19168 98002 17ed2 drivers/net/e1000/e1000_hw.o.old
    74501 4296 19168 97965 17ead drivers/net/e1000/e1000_hw.o.new

    Signed-off-by: Joe Perches <joe@perches.com>
    ---
    drivers/net/e1000/e1000_hw.c | 8 ++++----
    1 files changed, 4 insertions(+), 4 deletions(-)

    diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
    index c7e242b6..c866ef0 100644
    --- a/drivers/net/e1000/e1000_hw.c
    +++ b/drivers/net/e1000/e1000_hw.c
    @@ -4892,8 +4892,8 @@ static s32 e1000_get_cable_length(struct e1000_hw *hw, u16 *min_length,
    } else if (hw->phy_type == e1000_phy_igp) { /* For IGP PHY */
    u16 cur_agc_value;
    u16 min_agc_value = IGP01E1000_AGC_LENGTH_TABLE_SIZE;
    - u16 agc_reg_array[IGP01E1000_PHY_CHANNEL_NUM] =
    - { IGP01E1000_PHY_AGC_A,
    + static const u16 agc_reg_array[IGP01E1000_PHY_CHANNEL_NUM] = {
    + IGP01E1000_PHY_AGC_A,
    IGP01E1000_PHY_AGC_B,
    IGP01E1000_PHY_AGC_C,
    IGP01E1000_PHY_AGC_D
    @@ -5071,8 +5071,8 @@ static s32 e1000_config_dsp_after_link_change(struct e1000_hw *hw, bool link_up)
    {
    s32 ret_val;
    u16 phy_data, phy_saved_data, speed, duplex, i;
    - u16 dsp_reg_array[IGP01E1000_PHY_CHANNEL_NUM] =
    - { IGP01E1000_PHY_AGC_PARAM_A,
    + static const u16 dsp_reg_array[IGP01E1000_PHY_CHANNEL_NUM] = {
    + IGP01E1000_PHY_AGC_PARAM_A,
    IGP01E1000_PHY_AGC_PARAM_B,
    IGP01E1000_PHY_AGC_PARAM_C,
    IGP01E1000_PHY_AGC_PARAM_D
    --
    1.7.3.2.245.g03276.dirty


    \
     
     \ /
      Last update: 2010-11-21 03:57    [W:4.134 / U:0.104 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site