mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 23:52:08 +02:00
rtase: Use min() instead of min_t()
Use min() instead of min_t() to avoid the possibility of casting to the wrong type. Signed-off-by: Justin Lai <justinlai0215@realtek.com> Reviewed-by: Joe Damato <jdamato@fastly.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250520042031.9297-1-justinlai0215@realtek.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
c6634c98e6
commit
f44092606a
|
|
@ -1983,7 +1983,7 @@ static u16 rtase_calc_time_mitigation(u32 time_us)
|
|||
u8 msb, time_count, time_unit;
|
||||
u16 int_miti;
|
||||
|
||||
time_us = min_t(int, time_us, RTASE_MITI_MAX_TIME);
|
||||
time_us = min(time_us, RTASE_MITI_MAX_TIME);
|
||||
|
||||
if (time_us > RTASE_MITI_TIME_COUNT_MASK) {
|
||||
msb = fls(time_us);
|
||||
|
|
@ -2005,7 +2005,7 @@ static u16 rtase_calc_packet_num_mitigation(u16 pkt_num)
|
|||
u8 msb, pkt_num_count, pkt_num_unit;
|
||||
u16 int_miti;
|
||||
|
||||
pkt_num = min_t(int, pkt_num, RTASE_MITI_MAX_PKT_NUM);
|
||||
pkt_num = min(pkt_num, RTASE_MITI_MAX_PKT_NUM);
|
||||
|
||||
if (pkt_num > 60) {
|
||||
pkt_num_unit = RTASE_MITI_MAX_PKT_NUM_IDX;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user