mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-04 00:15:49 -04:00
usb: typec: tcpm: use max() to get higher value
Use max() for better readability and to fix cocci warnings. Reported-by: kernel test robot <lkp@intel.com> Reported-by: Julia Lawall <julia.lawall@inria.fr> Closes: https://lore.kernel.org/r/202409231009.2efXAh9b-lkp@intel.com/ Signed-off-by: R Sundar <prosunofficial@gmail.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20240925122014.552221-1-prosunofficial@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4904f9aa35
commit
d7e75301b5
@@ -7367,7 +7367,7 @@ static int tcpm_psy_get_input_power_limit(struct tcpm_port *port,
|
||||
src_mv = pdo_fixed_voltage(pdo);
|
||||
src_ma = pdo_max_current(pdo);
|
||||
tmp = src_mv * src_ma;
|
||||
max_src_uw = tmp > max_src_uw ? tmp : max_src_uw;
|
||||
max_src_uw = max(tmp, max_src_uw);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user