[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230612052123.2775-1-luhongfei@vivo.com>
Date: Mon, 12 Jun 2023 13:21:23 +0800
From: Lu Hongfei <luhongfei@...o.com>
To: Steve French <sfrench@...ba.org>,
Paulo Alcantara <pc@...guebit.com>,
Ronnie Sahlberg <lsahlber@...hat.com>,
Shyam Prasad N <sprasad@...rosoft.com>,
Tom Talpey <tom@...pey.com>,
linux-cifs@...r.kernel.org (open list:COMMON INTERNET FILE SYSTEM
CLIENT (CIFS and SMB3)),
samba-technical@...ts.samba.org (moderated list:COMMON INTERNET FILE
SYSTEM CLIENT (CIFS and SMB3)),
linux-kernel@...r.kernel.org (open list)
Cc: opensource.kernel@...o.com, luhongfei@...o.com
Subject: [PATCH] fs: smb: client: Replace the ternary conditional operator
It would be better to replace the traditional ternary conditional
operator with min() in _smbd_get_connection
Signed-off-by: Lu Hongfei <luhongfei@...o.com>
---
fs/smb/client/smbdirect.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c
index 2a2aec8c6112..69f9023f89f9
--- a/fs/smb/client/smbdirect.c
+++ b/fs/smb/client/smbdirect.c
@@ -1582,10 +1582,7 @@ static struct smbd_connection *_smbd_get_connection(
conn_param.initiator_depth = 0;
conn_param.responder_resources =
- info->id->device->attrs.max_qp_rd_atom
- < SMBD_CM_RESPONDER_RESOURCES ?
- info->id->device->attrs.max_qp_rd_atom :
- SMBD_CM_RESPONDER_RESOURCES;
+ min(info->id->device->attrs.max_qp_rd_atom, SMBD_CM_RESPONDER_RESOURCES);
info->responder_resources = conn_param.responder_resources;
log_rdma_mr(INFO, "responder_resources=%d\n",
info->responder_resources);
--
2.39.0
Powered by blists - more mailing lists