@@ -1585,10 +1585,8 @@ 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);
Use the min() macro to simplify the _smbd_get_connection() function and improve its readability. Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com> --- fs/smb/client/smbdirect.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)