]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ksmbd: Use str_read_write() and str_true_false() helpers
authorThorsten Blum <thorsten.blum@linux.dev>
Wed, 12 Feb 2025 12:15:16 +0000 (13:15 +0100)
committerSteve French <stfrench@microsoft.com>
Mon, 24 Mar 2025 15:22:06 +0000 (10:22 -0500)
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>
fs/smb/server/transport_rdma.c

index c3785a5434f9ef4e9b104bf16cb2e6df1064d0b3..1b9f3aee8b4b88a212fe98b619a8031871dd8901 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/mempool.h>
 #include <linux/highmem.h>
 #include <linux/scatterlist.h>
+#include <linux/string_choices.h>
 #include <rdma/ib_verbs.h>
 #include <rdma/rdma_cm.h>
 #include <rdma/rw.h>
@@ -1396,7 +1397,7 @@ static int smb_direct_rdma_xmit(struct smb_direct_transport *t,
        }
 
        ksmbd_debug(RDMA, "RDMA %s, len %#x, needed credits %#x\n",
-                   is_read ? "read" : "write", buf_len, credits_needed);
+                   str_read_write(is_read), buf_len, credits_needed);
 
        ret = wait_for_rw_credits(t, credits_needed);
        if (ret < 0)
@@ -2289,7 +2290,7 @@ out:
        }
 
        ksmbd_debug(RDMA, "netdev(%s) rdma capable : %s\n",
-                   netdev->name, rdma_capable ? "true" : "false");
+                   netdev->name, str_true_false(rdma_capable));
 
        return rdma_capable;
 }