]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: ucsi: stm32: Use min() to improve ucsi_stm32g0_fw_cb()
authorThorsten Blum <thorsten.blum@linux.dev>
Sat, 30 Aug 2025 11:04:20 +0000 (13:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Sep 2025 13:20:04 +0000 (15:20 +0200)
commit91709d2ce5cdf568b42fcc33473929843ed95cd3
treefb97c8c32ba2ea7277ec4d48c265ea1d7c72b4fd
parent3474a19736f39516cffced66dcfb818be6abf2f4
usb: ucsi: stm32: Use min() to improve ucsi_stm32g0_fw_cb()

Use min() to improve ucsi_stm32g0_fw_cb() and avoid calculating
'end - data' twice.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250830110426.10007-2-thorsten.blum@linux.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi_stm32g0.c