lkml.org 
[lkml]   [2014]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv2] dmaengine: fsl-edma: fixup reg offset and hw S/G support in big-endian model
On Wed, Sep 24, 2014 at 03:12:07PM +0800, Jingchang Lu wrote:
> static void edma_writeb(struct fsl_edma_engine *edma, u8 val, void __iomem *addr)
> {
> - iowrite8(val, addr);
> + /* swap the reg offset for these in big-endian mode */
> + if (edma->big_endian)
> + iowrite8(val, (void __iomem *)((u32)addr ^ 0x3));

NAK. /Not/ u32. unsigned long. Run this through sparse, and sparse
will complain with u32 here. Just because the driver is currently used
on a 32-bit arch is no reason to be sloppy about this.

In fact, running this through sparse (make ... C=1) or even C=2 might
well be a good idea to check whether there's any other silly mistakes.

Note that Documentation/SubmitChecklist calls for checks with sparse.

--
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.


\
 
 \ /
  Last update: 2014-09-24 12:01    [W:0.793 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site