Skip to content

Commit 0e15ebf

Browse files
Justin LaiNipaLocal
Justin Lai
authored and
NipaLocal
committed
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 <[email protected]> Reviewed-by: Joe Damato <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent 34dc830 commit 0e15ebf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/realtek/rtase/rtase_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1983,7 +1983,7 @@ static u16 rtase_calc_time_mitigation(u32 time_us)
19831983
u8 msb, time_count, time_unit;
19841984
u16 int_miti;
19851985

1986-
time_us = min_t(int, time_us, RTASE_MITI_MAX_TIME);
1986+
time_us = min(time_us, RTASE_MITI_MAX_TIME);
19871987

19881988
if (time_us > RTASE_MITI_TIME_COUNT_MASK) {
19891989
msb = fls(time_us);
@@ -2005,7 +2005,7 @@ static u16 rtase_calc_packet_num_mitigation(u16 pkt_num)
20052005
u8 msb, pkt_num_count, pkt_num_unit;
20062006
u16 int_miti;
20072007

2008-
pkt_num = min_t(int, pkt_num, RTASE_MITI_MAX_PKT_NUM);
2008+
pkt_num = min(pkt_num, RTASE_MITI_MAX_PKT_NUM);
20092009

20102010
if (pkt_num > 60) {
20112011
pkt_num_unit = RTASE_MITI_MAX_PKT_NUM_IDX;

0 commit comments

Comments
 (0)