From: Dominique Martinet Date: Fri, 31 Oct 2025 07:40:07 +0000 (+0900) Subject: net/9p: cleanup: change p9_trans_module->def to bool X-Git-Tag: v6.19-rc1~60^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eeaf38a798aff6384983e5a0ac464d146de7ff55;p=thirdparty%2Fkernel%2Flinux.git net/9p: cleanup: change p9_trans_module->def to bool '->def' is only ever used as a true/false flag Reported-by: Christophe JAILLET Message-ID: <20251103-v9fs_trans_def_bool-v1-1-f33dc7ed9e81@codewreck.org> Signed-off-by: Dominique Martinet --- diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index f0981515148d6..0aedabc9b7ebe 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 e7334033eba5a..bd4903d648271 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 6c5ad232c1946..a0bc766199dad 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 12806207f4f03..b58f50b00c723 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 4b1cec0ab8297..9389c1247001e 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,