]> git.ipfire.org Git - thirdparty/linux.git/commit
drivers/i2c/busses: use min() instead of min_t()
authorDavid Laight <david.laight.linux@gmail.com>
Wed, 19 Nov 2025 22:41:16 +0000 (22:41 +0000)
committerAndi Shyti <andi.shyti@kernel.org>
Tue, 20 Jan 2026 13:14:36 +0000 (14:14 +0100)
commitfae88e03f45893cfb63c608761220a489cc6e25e
tree72ae43d8292ba2ccdec503c38c96a51786ab169f
parent949f647eff76a1e759af7b1c0295db5b5640928a
drivers/i2c/busses: use min() instead of min_t()

min_t(u8, a, b) casts both its arguments to u8 potentially discarding
signifinact bits.
Use min(a, b) instead as it cannot discard significant bits.

Detected by an extra check added to min_t().

Signed-off-by: David Laight <david.laight.linux@gmail.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20251119224140.8616-21-david.laight.linux@gmail.com
drivers/i2c/busses/i2c-designware-master.c