Skip to content

Commit eeaf38a

Browse files
committed
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>
1 parent e21d451 commit eeaf38a

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

include/net/9p/transport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ struct p9_trans_module {
4646
char *name; /* name of transport */
4747
int maxsize; /* max message size of transport */
4848
bool pooled_rbuffers;
49-
int def; /* this transport should be default */
49+
bool def; /* this transport should be default */
5050
bool supports_vmalloc; /* can work with vmalloc'd buffers */
5151
struct module *owner;
5252
int (*create)(struct p9_client *client,

net/9p/trans_fd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ static struct p9_trans_module p9_tcp_trans = {
11001100
.name = "tcp",
11011101
.maxsize = MAX_SOCK_BUF,
11021102
.pooled_rbuffers = false,
1103-
.def = 0,
1103+
.def = false,
11041104
.supports_vmalloc = true,
11051105
.create = p9_fd_create_tcp,
11061106
.close = p9_fd_close,
@@ -1115,7 +1115,7 @@ MODULE_ALIAS_9P("tcp");
11151115
static struct p9_trans_module p9_unix_trans = {
11161116
.name = "unix",
11171117
.maxsize = MAX_SOCK_BUF,
1118-
.def = 0,
1118+
.def = false,
11191119
.supports_vmalloc = true,
11201120
.create = p9_fd_create_unix,
11211121
.close = p9_fd_close,
@@ -1130,7 +1130,7 @@ MODULE_ALIAS_9P("unix");
11301130
static struct p9_trans_module p9_fd_trans = {
11311131
.name = "fd",
11321132
.maxsize = MAX_SOCK_BUF,
1133-
.def = 0,
1133+
.def = false,
11341134
.supports_vmalloc = true,
11351135
.create = p9_fd_create,
11361136
.close = p9_fd_close,

net/9p/trans_rdma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ static struct p9_trans_module p9_rdma_trans = {
748748
.name = "rdma",
749749
.maxsize = P9_RDMA_MAXSIZE,
750750
.pooled_rbuffers = true,
751-
.def = 0,
751+
.def = false,
752752
.supports_vmalloc = false,
753753
.owner = THIS_MODULE,
754754
.create = rdma_create_trans,

net/9p/trans_virtio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ static struct p9_trans_module p9_virtio_trans = {
802802
*/
803803
.maxsize = PAGE_SIZE * (VIRTQUEUE_NUM - 3),
804804
.pooled_rbuffers = false,
805-
.def = 1,
805+
.def = true,
806806
.supports_vmalloc = false,
807807
.owner = THIS_MODULE,
808808
};

net/9p/trans_xen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ static struct p9_trans_module p9_xen_trans = {
257257
.name = "xen",
258258
.maxsize = 1 << (XEN_9PFS_RING_ORDER + XEN_PAGE_SHIFT - 2),
259259
.pooled_rbuffers = false,
260-
.def = 1,
260+
.def = true,
261261
.supports_vmalloc = false,
262262
.create = p9_xen_create,
263263
.close = p9_xen_close,

0 commit comments

Comments
 (0)