[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20211216012100.446477-1-deng.changcheng@zte.com.cn>
Date: Thu, 16 Dec 2021 01:21:00 +0000
From: cgel.zte@...il.com
To: kashyap.desai@...adcom.com
Cc: sumit.saxena@...adcom.com, shivasharan.srikanteshwara@...adcom.com,
jejb@...ux.ibm.com, martin.petersen@...cle.com,
megaraidlinux.pdl@...adcom.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org,
Changcheng Deng <deng.changcheng@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH] scsi: megaraid_sas: use max() to make code cleaner
From: Changcheng Deng <deng.changcheng@....com.cn>
Use max() in order to make code cleaner.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@....com.cn>
---
drivers/scsi/megaraid/megaraid_sas_base.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 82e1e24257bc..095275aca139 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -5995,10 +5995,7 @@ megasas_alloc_irq_vectors(struct megasas_instance *instance)
instance->msix_vectors - instance->iopoll_q_count,
i, instance->iopoll_q_count);
- if (i > 0)
- instance->msix_vectors = i;
- else
- instance->msix_vectors = 0;
+ instance->msix_vectors = max(i, 0);
if (instance->smp_affinity_enable)
megasas_set_high_iops_queue_affinity_and_hint(instance);
--
2.25.1
Powered by blists - more mailing lists