* [PATCH net-next v3] rtase: Use min() instead of min_t()
@ 2025-05-20 4:20 Justin Lai
2025-05-20 14:44 ` Simon Horman
2025-05-21 23:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Justin Lai @ 2025-05-20 4:20 UTC (permalink / raw)
To: kuba
Cc: davem, edumazet, pabeni, andrew+netdev, linux-kernel, netdev,
horms, pkshih, larry.chiu, Justin Lai, Joe Damato
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>
---
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(-)
diff --git a/drivers/net/ethernet/realtek/rtase/rtase_main.c b/drivers/net/ethernet/realtek/rtase/rtase_main.c
index 0efe7668e498..4d37217e9a14 100644
--- a/drivers/net/ethernet/realtek/rtase/rtase_main.c
+++ b/drivers/net/ethernet/realtek/rtase/rtase_main.c
@@ -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;
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v3] rtase: Use min() instead of min_t()
2025-05-20 4:20 [PATCH net-next v3] rtase: Use min() instead of min_t() Justin Lai
@ 2025-05-20 14:44 ` Simon Horman
2025-05-21 23:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-05-20 14:44 UTC (permalink / raw)
To: Justin Lai
Cc: kuba, davem, edumazet, pabeni, andrew+netdev, linux-kernel,
netdev, pkshih, larry.chiu, Joe Damato
On Tue, May 20, 2025 at 12:20:31PM +0800, Justin Lai wrote:
> 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>
Thanks for following-up on this.
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v3] rtase: Use min() instead of min_t()
2025-05-20 4:20 [PATCH net-next v3] rtase: Use min() instead of min_t() Justin Lai
2025-05-20 14:44 ` Simon Horman
@ 2025-05-21 23:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-05-21 23:00 UTC (permalink / raw)
To: Justin Lai
Cc: kuba, davem, edumazet, pabeni, andrew+netdev, linux-kernel,
netdev, horms, pkshih, larry.chiu, jdamato
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 20 May 2025 12:20:31 +0800 you wrote:
> 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>
> ---
> 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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-21 23:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-20 4:20 [PATCH net-next v3] rtase: Use min() instead of min_t() Justin Lai
2025-05-20 14:44 ` Simon Horman
2025-05-21 23:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®