rtase: Use min() instead of min_t()
Subsystems (3)
Justin Lai
maintainerPATCH v3 1/1 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]>
---
v1 -> v2:
- Remove the Fixes tag.
v2 -> v3:
- Nothing has changed, and it simply has been rebased and reposted.
--- drivers/net/ethernet/realtek/rtase/rtase_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/realtek/rtase/rtase_main.c +2 -2
@@ -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 ;
Signature · 1 line
2.34.1
Quoted 5 lines · Justin Lai
Use
min()instead ofmin_t()to avoid the possibility of casting to the wrong type.Signed-off-by Justin Lai <[email protected]>Reviewed-by Joe Damato <[email protected]>
Thanks for following-up on this.
Reviewed-by Simon Horman <[email protected]>
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Tue, 20 May 2025 12:20:31 +0800 you wrote:
Use
min()instead ofmin_t()to avoid the possibility of casting to the wrong type.Signed-off-by Justin Lai <[email protected]>Reviewed-by Joe Damato <[email protected]>---
v1 -> v2:
- Remove the Fixes tag.[...]
Here is the summary with links:
- [net-next,v3] rtase: Use min() instead of min_t()
https://git.kernel.org/netdev/net-next/c/f44092606a3f
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html