Skip to content

Commit 4d03570

Browse files
tobluxSteve French
authored andcommitted
ksmbd: Use str_read_write() and str_true_false() helpers
Remove hard-coded strings by using the str_read_write() and str_true_false() helpers. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 38fec10 commit 4d03570

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fs/smb/server/transport_rdma.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <linux/mempool.h>
1515
#include <linux/highmem.h>
1616
#include <linux/scatterlist.h>
17+
#include <linux/string_choices.h>
1718
#include <rdma/ib_verbs.h>
1819
#include <rdma/rdma_cm.h>
1920
#include <rdma/rw.h>
@@ -1396,7 +1397,7 @@ static int smb_direct_rdma_xmit(struct smb_direct_transport *t,
13961397
}
13971398

13981399
ksmbd_debug(RDMA, "RDMA %s, len %#x, needed credits %#x\n",
1399-
is_read ? "read" : "write", buf_len, credits_needed);
1400+
str_read_write(is_read), buf_len, credits_needed);
14001401

14011402
ret = wait_for_rw_credits(t, credits_needed);
14021403
if (ret < 0)
@@ -2289,7 +2290,7 @@ bool ksmbd_rdma_capable_netdev(struct net_device *netdev)
22892290
}
22902291

22912292
ksmbd_debug(RDMA, "netdev(%s) rdma capable : %s\n",
2292-
netdev->name, rdma_capable ? "true" : "false");
2293+
netdev->name, str_true_false(rdma_capable));
22932294

22942295
return rdma_capable;
22952296
}

0 commit comments

Comments
 (0)