summaryrefslogtreecommitdiff
path: root/Documentation/translations/zh_CN
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-10-18 00:05:31 +0200
committerBoris Brezillon <boris.brezillon@free-electrons.com>2016-10-28 10:21:23 +0200
commit8ff0513bdcdd71e84aa561cce216675d43fb41b8 (patch)
tree5a78c67a0d77953159dbad5e57f52f95a4e9b001 /Documentation/translations/zh_CN
parent73f907fd5fa56b0066d199bdd7126bbd04f6cd7b (diff)
mtd: mtk: avoid warning in mtk_ecc_encode
When building with -Wmaybe-uninitialized, gcc produces a silly false positive warning for the mtk_ecc_encode function: drivers/mtd/nand/mtk_ecc.c: In function 'mtk_ecc_encode': drivers/mtd/nand/mtk_ecc.c:402:15: error: 'val' may be used uninitialized in this function [-Werror=maybe-uninitialized] The function for some reason contains a double byte swap on big-endian builds to get the OOB data into the correct order again, and is written in a slightly confusing way. Using a simple memcpy32_fromio() to read the data simplifies it a lot so it becomes more readable and produces no warning. However, the output might not have 32-bit alignment, so we have to use another memcpy to avoid taking alignment faults or writing beyond the end of the array. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Tested-by: RogerCC Lin <rogercc.lin@mediatek.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'Documentation/translations/zh_CN')
0 files changed, 0 insertions, 0 deletions