diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2018-05-14 12:49:37 +0200 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-05-15 14:40:34 +0200 |
commit | 9f825e74d761c13b0cfaa5f65344d64ff970e252 (patch) | |
tree | 27e468bb03044278cad53d29adae9076e0f536b1 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 90d617633368ab97a2c7571c6e66dad54f39228d (diff) |
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 <geert@linux-m68k.org>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions