lkml.org 
[lkml]   [2021]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] scsi: megaraid_sas: use max() to make code cleaner
Date
From: Changcheng Deng <deng.changcheng@zte.com.cn>

Use max() 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/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
\
 
 \ /
  Last update: 2021-12-16 02:22    [W:0.021 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site