Commit 2bc0bea1 authored by Javier Carrasco's avatar Javier Carrasco Committed by Greg Kroah-Hartman
Browse files

usb: typec: tipd: use min() to set tps6598x firmware packet size



Simplify the current firmware packet size check in the tps6598x
implementation by means of a single call to min(), which is what the
current code does in a more verbose, less elegant way.

This patch fixes a cocci warning ("WARNING opportunity for min()").

Suggested-by: default avatarJulia Lawall <julia.lawall@inria.fr>
Signed-off-by: default avatarJavier Carrasco <javier.carrasco@wolfvision.net>
Reviewed-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240606-tps6598x_fw_update_log-v1-3-2b5b8369a0ba@wolfvision.net


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 916b8e5f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment