lkml.org 
[lkml]   [2015]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 11/18] spi/xilinx: Remove rx_fn and tx_fn pointer
    On Fri, Jan 23, 2015 at 05:08:43PM +0100, Ricardo Ribalda Delgado wrote:

    > + switch (xspi->bits_per_word) {
    > + case 8:
    > + *(u8 *)(xspi->rx_ptr) = data;
    > + break;
    > + case 16:
    > + *(u16 *)(xspi->rx_ptr) = data;
    > + break;
    > + case 32:
    > *(u32 *)(xspi->rx_ptr) = data;
    > - xspi->rx_ptr += 4;
    > + break;
    > }

    Perhaps I'm missing something here but we only seem to be incrementing
    rx_ptr for the 32 bit case here...

    > + xspi->rx_ptr += xspi->bits_per_word/8;

    ...which looks to duplicate this which handles all cases. Also there's
    a coding style thing - spaces around the / please.
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2015-01-27 01:21    [W:4.145 / U:0.316 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site