staging: qlge/qlge_main: Use min_t instead of min
authorAmey Narkhede <ameynarkhede02@gmail.com>
Fri, 5 Feb 2021 09:24:33 +0000 (14:54 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Feb 2021 13:11:21 +0000 (14:11 +0100)
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@gmail.com>
Link: https://lore.kernel.org/r/20210205092433.4131-1-ameynarkhede02@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/qlge/qlge_main.c

index a566ec3..dfe8cdf 100644 (file)
@@ -3924,7 +3924,7 @@ static int qlge_configure_rings(struct qlge_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