linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] replace if with max()
@ 2021-07-12 22:31 Salah Triki
  0 siblings, 0 replies; only message in thread
From: Salah Triki @ 2021-07-12 22:31 UTC (permalink / raw)
  To: aacraid, jejb, martin.petersen; +Cc: linux-scsi, linux-kernel

Replace if with max() in order to make code more clean.

Signed-off-by: Salah Triki <salah.triki@gmail.com>
---
 drivers/scsi/aacraid/aachba.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index 46b8dffce2dd..330224f08fd3 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -485,8 +485,8 @@ int aac_get_containers(struct aac_dev *dev)
 	if (status != -ERESTARTSYS)
 		aac_fib_free(fibptr);
 
-	if (maximum_num_containers < MAXIMUM_NUM_CONTAINERS)
-		maximum_num_containers = MAXIMUM_NUM_CONTAINERS;
+	maximum_num_containers = max(maximum_num_containers, MAXIMUM_NUM_CONTAINERS);
+
 	if (dev->fsa_dev == NULL ||
 		dev->maximum_num_containers != maximum_num_containers) {
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-12 22:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12 22:31 [PATCH] replace if with max() Salah Triki

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).