aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_bitmap.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <[email protected]>2018-05-14 10:49:37 +0000
committerBoris Brezillon <[email protected]>2018-05-15 12:40:34 +0000
commit9f825e74d761c13b0cfaa5f65344d64ff970e252 (patch)
tree27e468bb03044278cad53d29adae9076e0f536b1 /lib/test_bitmap.c
parentmtd: rawnand: marvell: Fix read logic for layouts with ->nchunks > 2 (diff)
downloadkernel-9f825e74d761c13b0cfaa5f65344d64ff970e252.tar.gz
kernel-9f825e74d761c13b0cfaa5f65344d64ff970e252.zip
mtd: rawnand: Fix return type of __DIVIDE() when called with 32-bit
The __DIVIDE() macro checks whether it is called with a 32-bit or 64-bit dividend, to select the appropriate divide-and-round-up routine. As the check uses the ternary operator, the result will always be promoted to a type that can hold both results, i.e. unsigned long long. When using this result in a division on a 32-bit system, this may lead to link errors like: ERROR: "__udivdi3" [drivers/mtd/nand/raw/nand.ko] undefined! Fix this by casting the result of the division to the type of the dividend. Fixes: 8878b126df769831 ("mtd: nand: add ->exec_op() implementation") Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Boris Brezillon <[email protected]>
Diffstat (limited to 'lib/test_bitmap.c')
0 files changed, 0 insertions, 0 deletions