Thread (10 messages) 10 messages, 4 authors, 2012-06-29
STALE5116d

[PATCH 1/2] mtd mxc_nand: use 32bit copy functions

From: s.hauer@pengutronix.de (Sascha Hauer)
Date: 2012-05-25 14:59:01

On Fri, May 25, 2012 at 05:58:22PM +0300, Artem Bityutskiy wrote:
On Fri, 2012-05-25 at 16:22 +0200, Sascha Hauer wrote:
quoted
The following commit changes the function used to copy from/to
the hardware buffer to memcpy_[from|to]io. This does not work
since the hardware cannot handle the byte accesses used by these
functions. Instead of reverting this patch introduce 32bit
correspondents of these functions.
Could you please take a look at the checkpatch.pl updates?
Will do.
WARNING:LONG_LINE: line over 80 characters
#103: FILE: drivers/mtd/nand/mxc_nand.c:276:
+static void memcpy32_fromio(void *trg, const volatile void __iomem  *src, size_t size)

WARNING:VOLATILE: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt
#103: FILE: drivers/mtd/nand/mxc_nand.c:276:
+static void memcpy32_fromio(void *trg, const volatile void __iomem  *src, size_t size)
This makes me wonder a bit, I basically copied the prototype from
the _memcpy_*_io template from arch/arm/kernel/io.c. Should they
be wrong?
otoh I also wondered why there were volatiles in arch/arm/kernel/io.c
in the first place ;)

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help