lkml.org 
[lkml]   [2014]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC 5/7] soc: qcom: Add Shared Memory Driver
    On Thu 02 Oct 15:38 PDT 2014, Stephen Boyd wrote:

    > On 09/29/14 17:34, Bjorn Andersson wrote:
    > > +
    > > +#define GET_RX_CHANNEL_INFO(channel, param) \
    > > + (channel->rx_info_word ? \
    > > + channel->rx_info_word->param : \
    > > + channel->rx_info->param)
    > > +
    > > +#define GET_TX_CHANNEL_INFO(channel, param) \
    > > + (channel->rx_info_word ? \
    > > + channel->tx_info_word->param : \
    > > + channel->tx_info->param)
    > > +
    > > +#define SET_RX_CHANNEL_INFO(channel, param, value) \
    > > + (channel->rx_info_word ? \
    > > + (channel->rx_info_word->param = value) : \
    > > + (channel->rx_info->param = value))
    > > +
    > > +#define SET_TX_CHANNEL_INFO(channel, param, value) \
    > > + (channel->rx_info_word ? \
    >
    > Drive-by review: Should this be tx_info_word? Given that it works I
    > wonder why not just have a flag indicating if we should use word aligned
    > read/write vs. byte aligned.
    >

    You're right, that should be tx - but from the way things both channels will
    always be of the same type, so it will simply work.

    I had a separate flag, but instead of having 4 members in the struct to
    indicate if I was dealing with word aligned access I had 5. So I dropped it.

    > > + (channel->tx_info_word->param = value) : \
    > > + (channel->tx_info->param = value))
    > > +
    >

    Regards,
    Bjorn


    \
     
     \ /
      Last update: 2014-10-04 02:41    [W:3.532 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site