diff mbox series

[02/14] scsi: bfa: Used min() in fc_rftid_build_sol for bitmap size

Message ID 20240626101342.1440049-3-prabhakar.pujeri@gmail.com
State New
Headers show
Series SCSI: Replace ternary operations with min()/max() macros | expand

Commit Message

Prabhakar Pujeri June 26, 2024, 10:13 a.m. UTC
Signed-off-by: Prabhakar Pujeri <prabhakar.pujeri@gmail.com>
---
 drivers/scsi/bfa/bfa_fcbuild.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/scsi/bfa/bfa_fcbuild.c b/drivers/scsi/bfa/bfa_fcbuild.c
index 52303e8c716d..784be9b435f1 100644
--- a/drivers/scsi/bfa/bfa_fcbuild.c
+++ b/drivers/scsi/bfa/bfa_fcbuild.c
@@ -1093,7 +1093,7 @@  fc_rftid_build_sol(struct fchs_s *fchs, void *pyld, u32 s_id, u16 ox_id,
 
 	rftid->dap = s_id;
 	memcpy((void *)rftid->fc4_type, (void *)fc4_bitmap,
-		(bitmap_size < 32 ? bitmap_size : 32));
+		min(bitmap_size, 32));
 
 	return sizeof(struct fcgs_rftid_req_s) + sizeof(struct ct_hdr_s);
 }