* [PATCH] treewide: Fix places where we incorrectly indented with spaces
@ 2026-01-09 4:09 David Gibson
0 siblings, 0 replies; only message in thread
From: David Gibson @ 2026-01-09 4:09 UTC (permalink / raw)
To: Stefano Brivio, passt-dev; +Cc: David Gibson, Xun Gu
Had a moment to address this trivial issue.
The passt convention is to indent code with tabs (K&R / kernel style).
However there were a handful of places where we used spaces instead. Fix
them.
Link: https://bugs.passt.top/show_bug.cgi?id=135
Reported-by: Xun Gu <xugu@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
doc/platform-requirements/listen-vs-repair.c | 6 +++---
flow.h | 4 ++--
iov.h | 4 ++--
udp_internal.h | 2 +-
vhost_user.c | 6 +++---
virtio.c | 8 ++++----
vu_common.h | 2 +-
7 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/doc/platform-requirements/listen-vs-repair.c b/doc/platform-requirements/listen-vs-repair.c
index d31fe3f7..e21d1688 100644
--- a/doc/platform-requirements/listen-vs-repair.c
+++ b/doc/platform-requirements/listen-vs-repair.c
@@ -58,9 +58,9 @@ static void net_sandbox(void)
.nlh.nlmsg_len = sizeof(req),
.nlh.nlmsg_seq = 1,
.ifm.ifi_family = AF_UNSPEC,
- .ifm.ifi_index = 1,
- .ifm.ifi_flags = IFF_UP,
- .ifm.ifi_change = IFF_UP,
+ .ifm.ifi_index = 1,
+ .ifm.ifi_flags = IFF_UP,
+ .ifm.ifi_change = IFF_UP,
};
int nl;
diff --git a/flow.h b/flow.h
index b43b0b1d..8ff565d9 100644
--- a/flow.h
+++ b/flow.h
@@ -99,7 +99,7 @@ static_assert(FLOW_NUM_STATES <= (1 << FLOW_STATE_BITS),
extern const char *flow_state_str[];
#define FLOW_STATE(f) \
- ((f)->state < FLOW_NUM_STATES ? flow_state_str[(f)->state] : "?")
+ ((f)->state < FLOW_NUM_STATES ? flow_state_str[(f)->state] : "?")
/**
* enum flow_type - Different types of packet flows we track
@@ -126,7 +126,7 @@ static_assert(FLOW_NUM_TYPES <= (1 << FLOW_TYPE_BITS),
extern const char *flow_type_str[];
#define FLOW_TYPE(f) \
- ((f)->type < FLOW_NUM_TYPES ? flow_type_str[(f)->type] : "?")
+ ((f)->type < FLOW_NUM_TYPES ? flow_type_str[(f)->type] : "?")
extern const uint8_t flow_proto[];
#define FLOW_PROTO(f) \
diff --git a/iov.h b/iov.h
index ba1fda5d..d2184bfd 100644
--- a/iov.h
+++ b/iov.h
@@ -24,9 +24,9 @@
size_t iov_skip_bytes(const struct iovec *iov, size_t n,
size_t skip, size_t *offset);
size_t iov_from_buf(const struct iovec *iov, size_t iov_cnt,
- size_t offset, const void *buf, size_t bytes);
+ size_t offset, const void *buf, size_t bytes);
size_t iov_to_buf(const struct iovec *iov, size_t iov_cnt,
- size_t offset, void *buf, size_t bytes);
+ size_t offset, void *buf, size_t bytes);
size_t iov_size(const struct iovec *iov, size_t iov_cnt);
/*
diff --git a/udp_internal.h b/udp_internal.h
index 96d11cff..f7d09bb6 100644
--- a/udp_internal.h
+++ b/udp_internal.h
@@ -26,7 +26,7 @@ size_t udp_update_hdr4(struct iphdr *ip4h, struct udp_payload_t *bp,
const struct flowside *toside, size_t dlen,
bool no_udp_csum);
size_t udp_update_hdr6(struct ipv6hdr *ip6h, struct udp_payload_t *bp,
- const struct flowside *toside, size_t dlen,
+ const struct flowside *toside, size_t dlen,
bool no_udp_csum);
void udp_sock_fwd(const struct ctx *c, int s, uint8_t frompif,
in_port_t port, const struct timespec *now);
diff --git a/vhost_user.c b/vhost_user.c
index f9a5646c..1e320bff 100644
--- a/vhost_user.c
+++ b/vhost_user.c
@@ -652,9 +652,9 @@ static bool vu_set_vring_addr_exec(struct vu_dev *vdev,
struct vhost_user_msg *vmsg)
{
/* We need to copy the payload to vhost_vring_addr structure
- * to access index because address of vmsg->payload.addr
- * can be unaligned as it is packed.
- */
+ * to access index because address of vmsg->payload.addr
+ * can be unaligned as it is packed.
+ */
struct vhost_vring_addr addr = vmsg->payload.addr;
struct vu_virtq *vq = &vdev->vq[addr.index];
diff --git a/virtio.c b/virtio.c
index bd388c2d..447137ee 100644
--- a/virtio.c
+++ b/virtio.c
@@ -164,8 +164,8 @@ static inline uint16_t vring_avail_ring(const struct vu_virtq *vq, int i)
*/
static inline uint16_t *virtq_used_event(const struct vu_virtq *vq)
{
- /* For backwards compat, used event index is at *end* of avail ring. */
- return &vq->vring.avail->ring[vq->vring.num];
+ /* For backwards compat, used event index is at *end* of avail ring. */
+ return &vq->vring.avail->ring[vq->vring.num];
}
/**
@@ -356,8 +356,8 @@ void vu_queue_notify(const struct vu_dev *dev, struct vu_virtq *vq)
*/
static inline uint16_t *virtq_avail_event(const struct vu_virtq *vq)
{
- /* For backwards compat, avail event index is at *end* of used ring. */
- return (uint16_t *)&vq->vring.used->ring[vq->vring.num];
+ /* For backwards compat, avail event index is at *end* of used ring. */
+ return (uint16_t *)&vq->vring.used->ring[vq->vring.num];
}
/**
diff --git a/vu_common.h b/vu_common.h
index 27fe7e0b..b5112c1e 100644
--- a/vu_common.h
+++ b/vu_common.h
@@ -51,7 +51,7 @@ int vu_collect(const struct vu_dev *vdev, struct vu_virtq *vq,
size_t *collected);
void vu_set_vnethdr(const struct vu_dev *vdev,
struct virtio_net_hdr_mrg_rxbuf *vnethdr,
- int num_buffers);
+ int num_buffers);
void vu_flush(const struct vu_dev *vdev, struct vu_virtq *vq,
struct vu_virtq_element *elem, int elem_cnt);
void vu_kick_cb(struct vu_dev *vdev, union epoll_ref ref,
--
2.52.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-01-09 4:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-09 4:09 [PATCH] treewide: Fix places where we incorrectly indented with spaces David Gibson
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).