lkml.org 
[lkml]   [2011]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RESEND][PATCH 11/26] staging: et131x: Moving two extern inline functions to .c file
    Date
    Two helper functions for adding 10bit/12bit umbers with wrapping are
    defined in the header. Moved them to the driver .c file.

    Signed-off-by: Mark Einon <mark.einon@gmail.com>
    ---
    drivers/staging/et131x/et131x.c | 11 +++++++++++
    drivers/staging/et131x/et131x.h | 10 ----------
    2 files changed, 11 insertions(+), 10 deletions(-)

    diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
    index 9596102..14f54e4 100644
    --- a/drivers/staging/et131x/et131x.c
    +++ b/drivers/staging/et131x/et131x.c
    @@ -2666,6 +2666,17 @@ void et131x_rx_dma_enable(struct et131x_adapter *adapter)
    }
    }

    +
    +static inline void add_10bit(u32 *v, int n)
    +{
    + *v = INDEX10(*v + n) | (*v & ET_DMA10_WRAP);
    +}
    +
    +static inline void add_12bit(u32 *v, int n)
    +{
    + *v = INDEX12(*v + n) | (*v & ET_DMA12_WRAP);
    +}
    +
    /**
    * nic_rx_pkts - Checks the hardware for available packets
    * @adapter: pointer to our adapter
    diff --git a/drivers/staging/et131x/et131x.h b/drivers/staging/et131x/et131x.h
    index 84b274d..7eed3c8 100644
    --- a/drivers/staging/et131x/et131x.h
    +++ b/drivers/staging/et131x/et131x.h
    @@ -230,16 +230,6 @@ struct global_regs { /* Location: */
    #define INDEX10(x) ((x) & ET_DMA10_MASK)
    #define INDEX4(x) ((x) & ET_DMA4_MASK)

    -extern inline void add_10bit(u32 *v, int n)
    -{
    - *v = INDEX10(*v + n) | (*v & ET_DMA10_WRAP);
    -}
    -
    -extern inline void add_12bit(u32 *v, int n)
    -{
    - *v = INDEX12(*v + n) | (*v & ET_DMA12_WRAP);
    -}
    -
    /*
    * 10bit DMA with wrap
    * txdma tx queue write address reg in txdma address map at 0x1010
    --
    1.7.6.4


    \
     
     \ /
      Last update: 2011-10-18 18:15    [W:0.033 / U:19.432 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site