netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ethernet: sun: use min_t() to make code cleaner
@ 2022-03-08  9:21 cgel.zte
  2022-03-09 15:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-03-08  9:21 UTC (permalink / raw)
  To: davem
  Cc: kuba, wangqing, jgg, arnd, jiapeng.chong, gustavoars,
	christophe.jaillet, deng.changcheng, netdev, linux-kernel,
	Zeal Robot

From: Changcheng Deng <deng.changcheng@zte.com.cn>

Use min_t() in order to make code cleaner.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
---
 drivers/net/ethernet/sun/cassini.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c
index 153edc5eadad..b04a6a7bf566 100644
--- a/drivers/net/ethernet/sun/cassini.c
+++ b/drivers/net/ethernet/sun/cassini.c
@@ -4664,7 +4664,7 @@ static void cas_set_msglevel(struct net_device *dev, u32 value)
 static int cas_get_regs_len(struct net_device *dev)
 {
 	struct cas *cp = netdev_priv(dev);
-	return cp->casreg_len < CAS_MAX_REGS ? cp->casreg_len: CAS_MAX_REGS;
+	return min_t(int, cp->casreg_len, CAS_MAX_REGS);
 }
 
 static void cas_get_regs(struct net_device *dev, struct ethtool_regs *regs,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: ethernet: sun: use min_t() to make code cleaner
  2022-03-08  9:21 [PATCH] net: ethernet: sun: use min_t() to make code cleaner cgel.zte
@ 2022-03-09 15:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-03-09 15:00 UTC (permalink / raw)
  To: Lv Ruyi
  Cc: davem, kuba, wangqing, jgg, arnd, jiapeng.chong, gustavoars,
	christophe.jaillet, deng.changcheng, netdev, linux-kernel, zealci

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Tue,  8 Mar 2022 09:21:06 +0000 you wrote:
> From: Changcheng Deng <deng.changcheng@zte.com.cn>
> 
> Use min_t() in order to make code cleaner.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
> 
> [...]

Here is the summary with links:
  - net: ethernet: sun: use min_t() to make code cleaner
    https://git.kernel.org/netdev/net-next/c/2c9ec169f70b

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] 2+ messages in thread

end of thread, other threads:[~2022-03-09 15:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-08  9:21 [PATCH] net: ethernet: sun: use min_t() to make code cleaner cgel.zte
2022-03-09 15: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;
as well as URLs for NNTP newsgroup(s).