aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorNathan Chancellor <[email protected]>2023-08-15 12:06:50 -0700
committerWim Van Sebroeck <[email protected]>2023-08-19 17:36:18 +0200
commit98334dc292fddba043fef8f6ebc84b22d42baca9 (patch)
tree0cc20ba365266b4bb56935f8515e4438362844c7 /lib/test_fortify/write_overflow-strncpy-src.c
parent8b3c3662186046c440ffbb7f5efc5595b1696e9d (diff)
watchdog: xilinx_wwdt: Use div_u64() in xilinx_wwdt_start()
After commit f1a43aadb5a6 ("watchdog: Enable COMPILE_TEST for more drivers"), it is possible to enable this driver on 32-bit architectures. When building for those architectures with clang, there is an error due to a 64-bit division in xilinx_wwdt_start(): ERROR: modpost: "__aeabi_uldivmod" [drivers/watchdog/xilinx_wwdt.ko] undefined! Use div_u64() to fix this, which takes a 64-bit dividend and 32-bit divisor. GCC likely avoids the same error due to optimizations it employs to transform division by a constant into other equivalent operations, which may be different than what is implemented in clang. Link: https://github.com/ClangBuiltLinux/linux/issues/1915 Signed-off-by: Nathan Chancellor <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions