]> www.infradead.org Git - users/hch/misc.git/commit
nvme-fc: Utilise min3() to simplify queue count calculation
authorQasim Ijaz <qasdev00@gmail.com>
Thu, 13 Feb 2025 22:16:22 +0000 (22:16 +0000)
committerKeith Busch <kbusch@kernel.org>
Thu, 20 Mar 2025 23:53:55 +0000 (16:53 -0700)
commit978540050a85a2b7fc77b60a1cfaec110682e9c3
tree7e0e5e865774b16e751edcd306be58cbf03cf8a3
parent7cbafa3ff0187cdfa922aa7eb3d578a93999b3a9
nvme-fc: Utilise min3() to simplify queue count calculation

Refactor nvme_fc_create_io_queues() and nvme_fc_recreate_io_queues() to
use the min3() macro to find the minimum between 3 values instead of
multiple min()'s. This shortens the code and makes it easier to read.

Signed-off-by: Qasim Ijaz <qasdev00@gmail.com>
Reviewed-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/fc.c