summaryrefslogtreecommitdiff
path: root/scripts/sbom/tests/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2026-06-18 16:49:34 +0200
committerAndi Shyti <andi.shyti@kernel.org>2026-06-23 17:28:25 +0200
commit2e9a7f68329be41792c0b123c28e6c53c2fa2249 (patch)
tree353fc430e7a3c5946967fe13b5f8b47f5c32800c /scripts/sbom/tests/git@git.tavy.me:linux.git
parent1dc18801be29bc54709aa355b8acd80e183b03cd (diff)
i2c: mpc: Fix timeout calculations
At first glance the harmless cleanup of the driver does nothing bad. However, as the operator precedence list states the '*' (multiplication) and '/' division operators have order 5 with left-to-right associativity the *= has order 17 and associativity right-to-left. It wouldn't be a problem to replace foo = foo * HZ / 1000000; with foo *= HZ / 1000000; if HZ constant is in Hertz. The problem is that in the Linux kernel HZ is defined in jiffy units, which is order of magnitude smaller than a million. That's why operator precedence has a crucial role here. Fix the regression by reverting pre-optimized calculations. Fixes: be40a3ae719f ("i2c: mpc: Use of_property_read_u32 instead of of_get_property") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: <stable@vger.kernel.org> # v6.4+ Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Link: https://lore.kernel.org/r/20260618144934.3249950-1-andriy.shevchenko@linux.intel.com
Diffstat (limited to 'scripts/sbom/tests/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions