summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2025-10-31 16:40:07 +0900
committerDominique Martinet <asmadeus@codewreck.org>2025-11-03 16:49:29 +0900
commiteeaf38a798aff6384983e5a0ac464d146de7ff55 (patch)
tree82fc1d212475f87d55f7d60bb72a7841a59d9561
parente21d451a82f39e91b7635c4fc3ff5ac082873ec3 (diff)
net/9p: cleanup: change p9_trans_module->def to bool
'->def' is only ever used as a true/false flag Reported-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Message-ID: <20251103-v9fs_trans_def_bool-v1-1-f33dc7ed9e81@codewreck.org> Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
-rw-r--r--include/net/9p/transport.h2
-rw-r--r--net/9p/trans_fd.c6
-rw-r--r--net/9p/trans_rdma.c2
-rw-r--r--net/9p/trans_virtio.c2
-rw-r--r--net/9p/trans_xen.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h
index f0981515148d..0aedabc9b7eb 100644
--- a/include/net/9p/transport.h
+++ b/include/net/9p/transport.h
@@ -46,7 +46,7 @@ struct p9_trans_module {
char *name; /* name of transport */
int maxsize; /* max message size of transport */
bool pooled_rbuffers;
- int def; /* this transport should be default */
+ bool def; /* this transport should be default */
bool supports_vmalloc; /* can work with vmalloc'd buffers */
struct module *owner;
int (*create)(struct p9_client *client,
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index e7334033eba5..bd4903d64827 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -1100,7 +1100,7 @@ static struct p9_trans_module p9_tcp_trans = {
.name = "tcp",
.maxsize = MAX_SOCK_BUF,
.pooled_rbuffers = false,
- .def = 0,
+ .def = false,
.supports_vmalloc = true,
.create = p9_fd_create_tcp,
.close = p9_fd_close,
@@ -1115,7 +1115,7 @@ MODULE_ALIAS_9P("tcp");
static struct p9_trans_module p9_unix_trans = {
.name = "unix",
.maxsize = MAX_SOCK_BUF,
- .def = 0,
+ .def = false,
.supports_vmalloc = true,
.create = p9_fd_create_unix,
.close = p9_fd_close,
@@ -1130,7 +1130,7 @@ MODULE_ALIAS_9P("unix");
static struct p9_trans_module p9_fd_trans = {
.name = "fd",
.maxsize = MAX_SOCK_BUF,
- .def = 0,
+ .def = false,
.supports_vmalloc = true,
.create = p9_fd_create,
.close = p9_fd_close,
diff --git a/net/9p/trans_rdma.c b/net/9p/trans_rdma.c
index 6c5ad232c194..a0bc766199da 100644
--- a/net/9p/trans_rdma.c
+++ b/net/9p/trans_rdma.c
@@ -748,7 +748,7 @@ static struct p9_trans_module p9_rdma_trans = {
.name = "rdma",
.maxsize = P9_RDMA_MAXSIZE,
.pooled_rbuffers = true,
- .def = 0,
+ .def = false,
.supports_vmalloc = false,
.owner = THIS_MODULE,
.create = rdma_create_trans,
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
index 12806207f4f0..b58f50b00c72 100644
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -802,7 +802,7 @@ static struct p9_trans_module p9_virtio_trans = {
*/
.maxsize = PAGE_SIZE * (VIRTQUEUE_NUM - 3),
.pooled_rbuffers = false,
- .def = 1,
+ .def = true,
.supports_vmalloc = false,
.owner = THIS_MODULE,
};
diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c
index 4b1cec0ab829..9389c1247001 100644
--- a/net/9p/trans_xen.c
+++ b/net/9p/trans_xen.c
@@ -257,7 +257,7 @@ static struct p9_trans_module p9_xen_trans = {
.name = "xen",
.maxsize = 1 << (XEN_9PFS_RING_ORDER + XEN_PAGE_SHIFT - 2),
.pooled_rbuffers = false,
- .def = 1,
+ .def = true,
.supports_vmalloc = false,
.create = p9_xen_create,
.close = p9_xen_close,