[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250604234201.42509-1-yury.norov@gmail.com>
Date: Wed, 4 Jun 2025 19:42:00 -0400
From: Yury Norov <yury.norov@...il.com>
To: Hannes Reinecke <hare@...e.de>,
"James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Yury Norov <yury.norov@...il.com>
Subject: [PATCH] scsi/fcoe: simplify fcoe_select_cpu()
cpumask_next() followed by cpumask_first() opencodes
cpumask_next_wrap(). Fix it.
Signed-off-by: Yury Norov <yury.norov@...il.com>
---
drivers/scsi/fcoe/fcoe.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index b911fdb387f3..07eddafe52ff 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -1312,10 +1312,7 @@ static inline unsigned int fcoe_select_cpu(void)
{
static unsigned int selected_cpu;
- selected_cpu = cpumask_next(selected_cpu, cpu_online_mask);
- if (selected_cpu >= nr_cpu_ids)
- selected_cpu = cpumask_first(cpu_online_mask);
-
+ selected_cpu = cpumask_next_wrap(selected_cpu, cpu_online_mask);
return selected_cpu;
}
--
2.43.0
Powered by blists - more mailing lists