mtd: nftl: fix offset alignments
authorDimitri Gorokhovik <[email protected]>
Thu, 3 Sep 2009 13:04:22 +0000 (14:04 +0100)
committerDavid Woodhouse <[email protected]>
Thu, 3 Sep 2009 13:59:16 +0000 (14:59 +0100)
commit16f05c2b68520f94e365f9d347a7076f4ff00ad5
treeca06a5950392f6619c92fdb3431729a40096744e
parent4149ed1aa944ab864024982a2e568d17eccff504
mtd: nftl: fix offset alignments

Arithmetic conversion in the mask computation makes the upper word
of the second argument passed down to mtd->read_oob(), be always 0
(assuming 'offs' being a 64-bit signed long long type, and
'mtd->writesize' being a 32-bit unsigned int type).

This patch applies over the other one adding masking in nftl_write,
"nftl: write support is broken".

Signed-off-by: Dimitri Gorokhovik <[email protected]>
Cc: Tim Gardner <[email protected]>
Cc: Scott James Remnant <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
drivers/mtd/nftlcore.c