Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: can: avoid integer overflow in expression
Change the integer arithmetic to divide first before multiply. The muliplication of sys_clock_hw_cycles_per_sec() by ten leads to a really big number on boards with high-speed clocking, thus to the overflow warning, and to errors for integration tests. (cherry picked from commit e7f399f) Original-Fixes: #63678 Original-Signed-off-by: Stephan Linz <linz@li-pro.net> GitOrigin-RevId: e7f399f Change-Id: I232c13d4b396209a5adae9b21120a0154853bae1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/4921894 Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
- Loading branch information