[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210205092433.4131-1-ameynarkhede02@gmail.com>
Date: Fri, 5 Feb 2021 14:54:33 +0530
From: ameynarkhede02@...il.com
To: manishc@...vell.com, GR-Linux-NIC-Dev@...vell.com,
gregkh@...uxfoundation.org, nathan@...nel.org
Cc: netdev@...r.kernel.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org,
Amey Narkhede <ameynarkhede02@...il.com>
Subject: [PATCH v2] staging: qlge/qlge_main: Use min_t instead of min
From: Amey Narkhede <ameynarkhede02@...il.com>
Use min_t instead of min function in qlge/qlge_main.c
Fixes following checkpatch.pl warning:
WARNING: min() should probably be min_t(int, MAX_CPUS, num_online_cpus())
Signed-off-by: Amey Narkhede <ameynarkhede02@...il.com>
---
Changes in v2:
- Remove superfluous int cast from num_online_cpus
drivers/staging/qlge/qlge_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
index 402edaeff..213bd11e7 100644
--- a/drivers/staging/qlge/qlge_main.c
+++ b/drivers/staging/qlge/qlge_main.c
@@ -3938,7 +3938,7 @@ static int ql_configure_rings(struct ql_adapter *qdev)
int i;
struct rx_ring *rx_ring;
struct tx_ring *tx_ring;
- int cpu_cnt = min(MAX_CPUS, (int)num_online_cpus());
+ int cpu_cnt = min_t(int, MAX_CPUS, num_online_cpus());
/* In a perfect world we have one RSS ring for each CPU
* and each has it's own vector. To do that we ask for
--
2.30.0
Powered by blists - more mailing lists