Skip to content
Commit e9d8d482 authored by David Scidmore's avatar David Scidmore Committed by David Woodhouse
Browse files

[MTD] mtdchar.c: ioctl always returns 0 as size written for ppc64



"include/linux/mtd/mtd.h" declares "mtd_oob_ops.retlen" as size_t, which
is 64 bits on targets with a 64 bit addressing. The MEMWRITEOOB ioctl
calls copy_to_user() to write it back to "mtd_oob_buf.length", which is
declared in "include/linux/mtd-abi.h" as uint32_t. Since powerpc is a
big endian architecture, this only copies the upper 32 bits of the
address, which is always 0.

Signed-off-by: default avatarDavid Scidmore <dscidmore@xes-inc.com>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 4b3cc340
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment