From: Laurent Vivier <lvivier@redhat.com>
To: passt-dev@passt.top
Cc: Laurent Vivier <lvivier@redhat.com>
Subject: [PATCH v7 01/31] style: Fix 'Return' comment style
Date: Mon, 23 Jun 2025 13:06:05 +0200 [thread overview]
Message-ID: <20250623110635.1478625-2-lvivier@redhat.com> (raw)
In-Reply-To: <20250623110635.1478625-1-lvivier@redhat.com>
We always use imperative (no 'Returns:'), no tab after the ':' and
only one space, the first character is always lowercase.
This is fixed with:
sed -i "s/Returns:/Return:/;s/Return: /Return: /;s/Return: */Return: /;s/Return: \([A-Z]\)/Return: \L\1/" *.[ch]
And manually updated to fix alignment of multiline comment and words
that must keep uppercase (like IPv4, TCP, UDP).
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
checksum.c | 4 ++--
conf.c | 12 ++++++------
flow.c | 4 ++--
flow_table.h | 2 +-
icmp.c | 2 +-
inany.c | 4 ++--
iov.c | 22 +++++++++++-----------
iov.h | 8 ++++----
lineread.c | 2 +-
tap.h | 4 ++--
tcp.c | 6 +++---
tcp_splice.c | 4 ++--
tcp_vu.c | 4 ++--
udp.c | 4 ++--
udp_vu.c | 6 +++---
util.c | 6 +++---
util.h | 4 ++--
vhost_user.c | 44 ++++++++++++++++++++++----------------------
virtio.c | 2 +-
virtio.h | 6 +++---
20 files changed, 75 insertions(+), 75 deletions(-)
diff --git a/checksum.c b/checksum.c
index 0894eca89570..13c8e33c2282 100644
--- a/checksum.c
+++ b/checksum.c
@@ -145,7 +145,7 @@ uint16_t csum_ip4_header(uint16_t l3len, uint8_t protocol,
* @proto: Protocol number
* @saddr: Source address
* @daddr: Destination address
- * Returns: Partial checksum of the IPv4 header
+ * Return: partial checksum of the IPv4 header
*/
uint32_t proto_ipv4_header_psum(uint16_t l4len, uint8_t protocol,
struct in_addr saddr, struct in_addr daddr)
@@ -225,7 +225,7 @@ void csum_icmp4(struct icmphdr *icmp4hr, const void *payload, size_t dlen)
* @proto: Protocol number
* @saddr: Source address
* @daddr: Destination address
- * Returns: Partial checksum of the IPv6 header
+ * Return: partial checksum of the IPv6 header
*/
uint32_t proto_ipv6_header_psum(uint16_t payload_len, uint8_t protocol,
const struct in6_addr *saddr,
diff --git a/conf.c b/conf.c
index 36845e26d826..a80a05364bcc 100644
--- a/conf.c
+++ b/conf.c
@@ -69,7 +69,7 @@ const char *pasta_default_ifn = "tap0";
* @s: String to search
* @c: Delimiter character
*
- * Return: If another @c is found in @s, returns a pointer to the
+ * Return: if another @c is found in @s, returns a pointer to the
* character *after* the delimiter, if no further @c is in @s,
* return NULL
*/
@@ -384,7 +384,7 @@ mode_conflict:
* @addr: Guest nameserver IPv4 address
* @idx: Index of free entry in array of IPv4 resolvers
*
- * Return: Number of entries added (0 or 1)
+ * Return: number of entries added (0 or 1)
*/
static unsigned add_dns4(struct ctx *c, const struct in_addr *addr,
unsigned idx)
@@ -402,7 +402,7 @@ static unsigned add_dns4(struct ctx *c, const struct in_addr *addr,
* @addr: Guest nameserver IPv6 address
* @idx: Index of free entry in array of IPv6 resolvers
*
- * Return: Number of entries added (0 or 1)
+ * Return: number of entries added (0 or 1)
*/
static unsigned add_dns6(struct ctx *c, const struct in6_addr *addr,
unsigned idx)
@@ -656,7 +656,7 @@ static void conf_pasta_ns(int *netns_only, char *userns, char *netns,
/** conf_ip4_prefix() - Parse an IPv4 prefix length or netmask
* @arg: Netmask in dotted decimal or prefix length
*
- * Return: Validated prefix length on success, -1 on failure
+ * Return: validated prefix length on success, -1 on failure
*/
static int conf_ip4_prefix(const char *arg)
{
@@ -683,7 +683,7 @@ static int conf_ip4_prefix(const char *arg)
* @ifi: Host interface to attempt (0 to determine one)
* @ip4: IPv4 context (will be written)
*
- * Return: Interface index for IPv4, or 0 on failure.
+ * Return: interface index for IPv4, or 0 on failure.
*/
static unsigned int conf_ip4(unsigned int ifi, struct ip4_ctx *ip4)
{
@@ -755,7 +755,7 @@ static void conf_ip4_local(struct ip4_ctx *ip4)
* @ifi: Host interface to attempt (0 to determine one)
* @ip6: IPv6 context (will be written)
*
- * Return: Interface index for IPv6, or 0 on failure.
+ * Return: interface index for IPv6, or 0 on failure.
*/
static unsigned int conf_ip6(unsigned int ifi, struct ip6_ctx *ip6)
{
diff --git a/flow.c b/flow.c
index da5c8131c1af..00885f67f365 100644
--- a/flow.c
+++ b/flow.c
@@ -627,7 +627,7 @@ static uint64_t flow_sidx_hash(const struct ctx *c, flow_sidx_t sidx)
* @hash: Raw hash value for flow & side
* @sidx: Flow and side to find bucket for
*
- * Return: If @sidx is in the hash table, its current bucket, otherwise a
+ * Return: if @sidx is in the hash table, its current bucket, otherwise a
* suitable free bucket for it.
*/
static inline unsigned flow_hash_probe_(uint64_t hash, flow_sidx_t sidx)
@@ -647,7 +647,7 @@ static inline unsigned flow_hash_probe_(uint64_t hash, flow_sidx_t sidx)
* @c: Execution context
* @sidx: Flow and side to find bucket for
*
- * Return: If @sidx is in the hash table, its current bucket, otherwise a
+ * Return: if @sidx is in the hash table, its current bucket, otherwise a
* suitable free bucket for it.
*/
static inline unsigned flow_hash_probe(const struct ctx *c, flow_sidx_t sidx)
diff --git a/flow_table.h b/flow_table.h
index 3f3f4b7527bf..5ee13acc7253 100644
--- a/flow_table.h
+++ b/flow_table.h
@@ -140,7 +140,7 @@ static inline uint8_t pif_at_sidx(flow_sidx_t sidx)
/** flowside_at_sidx() - Retrieve a specific flowside
* @sidx: Flow & side index
*
- * Return: Flowside for the flow & side given by @sidx
+ * Return: flowside for the flow & side given by @sidx
*/
static inline const struct flowside *flowside_at_sidx(flow_sidx_t sidx)
{
diff --git a/icmp.c b/icmp.c
index 7e2b3423a8d1..95f38c1e2a3a 100644
--- a/icmp.c
+++ b/icmp.c
@@ -163,7 +163,7 @@ static void icmp_ping_close(const struct ctx *c,
* @saddr: Source address
* @daddr: Destination address
*
- * Return: Newly opened ping flow, or NULL on failure
+ * Return: newly opened ping flow, or NULL on failure
*/
static struct icmp_ping_flow *icmp_ping_new(const struct ctx *c,
sa_family_t af, uint16_t id,
diff --git a/inany.c b/inany.c
index f5483bfc65f7..65a39f9e258c 100644
--- a/inany.c
+++ b/inany.c
@@ -25,7 +25,7 @@ const union inany_addr inany_any4 = INANY_INIT4(IN4ADDR_ANY_INIT);
* @dst: output buffer, minimum INANY_ADDRSTRLEN bytes
* @size: size of buffer at @dst
*
- * Return: On success, a non-null pointer to @dst, NULL on failure
+ * Return: on success, a non-null pointer to @dst, NULL on failure
*/
const char *inany_ntop(const union inany_addr *src, char *dst, socklen_t size)
{
@@ -41,7 +41,7 @@ const char *inany_ntop(const union inany_addr *src, char *dst, socklen_t size)
* @src: IPv[46] address
* @dst: output buffer, filled with parsed address
*
- * Return: On success, 1, if no parseable address is found, 0
+ * Return: on success, 1, if no parseable address is found, 0
*/
int inany_pton(const char *src, union inany_addr *dst)
{
diff --git a/iov.c b/iov.c
index 91e87a740f0a..f72145b30d1b 100644
--- a/iov.c
+++ b/iov.c
@@ -67,7 +67,7 @@ size_t iov_skip_bytes(const struct iovec *iov, size_t n,
* @buf: Pointer to the source buffer containing the data to copy.
* @bytes: Total number of bytes to copy from buf to iov.
*
- * Returns: The number of bytes successfully copied.
+ * Return: the number of bytes successfully copied.
*/
size_t iov_from_buf(const struct iovec *iov, size_t iov_cnt,
size_t offset, const void *buf, size_t bytes)
@@ -107,7 +107,7 @@ size_t iov_from_buf(const struct iovec *iov, size_t iov_cnt,
* @buf: Pointer to the destination buffer where data will be copied.
* @bytes: Total number of bytes to copy from iov to buf.
*
- * Returns: The number of bytes successfully copied.
+ * Return: the number of bytes successfully copied.
*/
/* cppcheck-suppress unusedFunction */
size_t iov_to_buf(const struct iovec *iov, size_t iov_cnt,
@@ -144,7 +144,7 @@ size_t iov_to_buf(const struct iovec *iov, size_t iov_cnt,
* scatter/gather I/O vector.
* @iov_cnt: Number of elements in the iov array.
*
- * Returns: The total size in bytes.
+ * Return: the total size in bytes.
*/
size_t iov_size(const struct iovec *iov, size_t iov_cnt)
{
@@ -167,7 +167,7 @@ size_t iov_size(const struct iovec *iov, size_t iov_cnt)
* includes buffers that are actually needed. This will avoid stepping through
* unnecessary elements of the underlying IO vector on future operations.
*
- * Return: true if the tail still contains any bytes, otherwise false
+ * Return: true if the tail still contains any bytes, otherwise false
*/
bool iov_tail_prune(struct iov_tail *tail)
{
@@ -184,7 +184,7 @@ bool iov_tail_prune(struct iov_tail *tail)
* iov_tail_size - Calculate the total size of an IO vector tail
* @tail: IO vector tail
*
- * Returns: The total size in bytes.
+ * Return: the total size in bytes.
*/
size_t iov_tail_size(struct iov_tail *tail)
{
@@ -200,9 +200,9 @@ size_t iov_tail_size(struct iov_tail *tail)
*
* @tail may be pruned, but will represent the same bytes as before.
*
- * Returns: Pointer to the first @len logical bytes of the tail, NULL if that
- * overruns the IO vector, is not contiguous or doesn't have the
- * requested alignment.
+ * Return: pointer to the first @len logical bytes of the tail, NULL if that
+ * overruns the IO vector, is not contiguous or doesn't have the
+ * requested alignment.
*/
/* cppcheck-suppress [staticFunction,unmatchedSuppression] */
void *iov_peek_header_(struct iov_tail *tail, size_t len, size_t align)
@@ -234,9 +234,9 @@ void *iov_peek_header_(struct iov_tail *tail, size_t len, size_t align)
* On success, @tail is updated so that it longer includes the bytes of the
* returned header.
*
- * Returns: Pointer to the first @len logical bytes of the tail, NULL if that
- * overruns the IO vector, is not contiguous or doesn't have the
- * requested alignment.
+ * Return: pointer to the first @len logical bytes of the tail, NULL if that
+ * overruns the IO vector, is not contiguous or doesn't have the
+ * requested alignment.
*/
void *iov_remove_header_(struct iov_tail *tail, size_t len, size_t align)
{
diff --git a/iov.h b/iov.h
index 9855bf0c0c32..3fc96ab9755a 100644
--- a/iov.h
+++ b/iov.h
@@ -82,8 +82,8 @@ void *iov_remove_header_(struct iov_tail *tail, size_t len, size_t align);
*
* @tail_ may be pruned, but will represent the same bytes as before.
*
- * Returns: Pointer of type (@type_ *) located at the start of @tail_, NULL if
- * we can't get a contiguous and aligned pointer.
+ * Return: pointer of type (@type_ *) located at the start of @tail_, NULL if
+ * we can't get a contiguous and aligned pointer.
*/
#define IOV_PEEK_HEADER(tail_, type_) \
((type_ *)(iov_peek_header_((tail_), \
@@ -97,8 +97,8 @@ void *iov_remove_header_(struct iov_tail *tail, size_t len, size_t align);
* On success, @tail_ is updated so that it longer includes the bytes of the
* returned header.
*
- * Returns: Pointer of type (@type_ *) located at the old start of @tail_, NULL
- * if we can't get a contiguous and aligned pointer.
+ * Return: pointer of type (@type_ *) located at the old start of @tail_, NULL
+ * if we can't get a contiguous and aligned pointer.
*/
#define IOV_REMOVE_HEADER(tail_, type_) \
((type_ *)(iov_remove_header_((tail_), \
diff --git a/lineread.c b/lineread.c
index 0387f4a0c5b2..4225de6145d8 100644
--- a/lineread.c
+++ b/lineread.c
@@ -70,7 +70,7 @@ static ssize_t peek_line(struct lineread *lr, bool eof)
* @lr: Line reader state structure
* @line: Place a pointer to the next line in this variable
*
- * Return: Length of line read on success, 0 on EOF, negative on error
+ * Return: length of line read on success, 0 on EOF, negative on error
*/
ssize_t lineread_get(struct lineread *lr, char **line)
{
diff --git a/tap.h b/tap.h
index 6fe3d15d1337..936ae9371fd6 100644
--- a/tap.h
+++ b/tap.h
@@ -46,8 +46,8 @@ struct tap_hdr {
* @c: Execution context
* @taph: Pointer to tap specific header buffer
*
- * Returns: A struct iovec covering the correct portion of @taph to use as the
- * tap specific header in the current configuration.
+ * Return: a struct iovec covering the correct portion of @taph to use as the
+ * tap specific header in the current configuration.
*/
static inline struct iovec tap_hdr_iov(const struct ctx *c,
struct tap_hdr *thdr)
diff --git a/tcp.c b/tcp.c
index f43c1e27c112..2b8846636e73 100644
--- a/tcp.c
+++ b/tcp.c
@@ -438,7 +438,7 @@ static struct tcp_tap_conn *conn_at_sidx(flow_sidx_t sidx)
* @conn: Pointer to the TCP connection structure
* @offset: Offset in bytes
*
- * Return: -1 when it fails, 0 otherwise.
+ * Return: -1 when it fails, 0 otherwise.
*/
int tcp_set_peek_offset(const struct tcp_tap_conn *conn, int offset)
{
@@ -1319,7 +1319,7 @@ static int tcp_conn_new_sock(sa_family_t af)
* tcp_conn_sock() - Obtain a connectable socket in the host/init namespace
* @af: Address family (AF_INET or AF_INET6)
*
- * Return: Socket fd on success, -errno on failure
+ * Return: socket fd on success, -errno on failure
*/
int tcp_conn_sock(sa_family_t af)
{
@@ -2606,7 +2606,7 @@ static bool tcp_probe_peek_offset_cap(sa_family_t af)
/**
* tcp_probe_tcp_info() - Check what data TCP_INFO reports
*
- * Return: Number of bytes returned by TCP_INFO getsockopt()
+ * Return: number of bytes returned by TCP_INFO getsockopt()
*/
static socklen_t tcp_probe_tcp_info(void)
{
diff --git a/tcp_splice.c b/tcp_splice.c
index 60455d6459b9..26cb63064583 100644
--- a/tcp_splice.c
+++ b/tcp_splice.c
@@ -95,7 +95,7 @@ static int tcp_conn_sock_ns(const struct ctx *c, sa_family_t af);
* conn_at_sidx() - Get spliced TCP connection specific flow at given sidx
* @sidx: Flow and side to retrieve
*
- * Return: Spliced TCP connection at @sidx, or NULL of @sidx is invalid.
+ * Return: spliced TCP connection at @sidx, or NULL of @sidx is invalid.
* Asserts if the flow at @sidx is not FLOW_TCP_SPLICE.
*/
static struct tcp_splice_conn *conn_at_sidx(flow_sidx_t sidx)
@@ -402,7 +402,7 @@ static int tcp_splice_connect(const struct ctx *c, struct tcp_splice_conn *conn)
* @c: Execution context
* @af: Address family (AF_INET or AF_INET6)
*
- * Return: Socket fd in the namespace on success, -errno on failure
+ * Return: socket fd in the namespace on success, -errno on failure
*/
static int tcp_conn_sock_ns(const struct ctx *c, sa_family_t af)
{
diff --git a/tcp_vu.c b/tcp_vu.c
index f3914c7c2195..cb39bc20355b 100644
--- a/tcp_vu.c
+++ b/tcp_vu.c
@@ -43,7 +43,7 @@ static int head[VIRTQUEUE_MAX_SIZE + 1];
* tcp_vu_hdrlen() - return the size of the header in level 2 frame (TCP)
* @v6: Set for IPv6 packet
*
- * Return: Return the size of the header
+ * Return: return the size of the header
*/
static size_t tcp_vu_hdrlen(bool v6)
{
@@ -351,7 +351,7 @@ static void tcp_vu_prepare(const struct ctx *c, struct tcp_tap_conn *conn,
* @c: Execution context
* @conn: Connection pointer
*
- * Return: Negative on connection reset, 0 otherwise
+ * Return: negative on connection reset, 0 otherwise
*/
int tcp_vu_data_from_sock(const struct ctx *c, struct tcp_tap_conn *conn)
{
diff --git a/udp.c b/udp.c
index 65a52e0755c0..75edc2054d4a 100644
--- a/udp.c
+++ b/udp.c
@@ -656,7 +656,7 @@ fail:
* (only used if @sidx == FLOW_SIDX_NONE)
* @port: Local port number of @s (only used if @sidx == FLOW_SIDX_NONE)
*
- * Return: Number of errors handled, or < 0 if we have an unrecoverable error
+ * Return: number of errors handled, or < 0 if we have an unrecoverable error
*/
static int udp_sock_errs(const struct ctx *c, int s, flow_sidx_t sidx,
uint8_t pif, in_port_t port)
@@ -739,7 +739,7 @@ static int udp_peek_addr(int s, union sockaddr_inany *src,
* @mmh: mmsghdr array to receive into
* @n: Maximum number of datagrams to receive
*
- * Return: Number of datagrams received
+ * Return: number of datagrams received
*
* #syscalls recvmmsg arm:recvmmsg_time64 i686:recvmmsg_time64
*/
diff --git a/udp_vu.c b/udp_vu.c
index 1f89509c6f72..e1ea06e77217 100644
--- a/udp_vu.c
+++ b/udp_vu.c
@@ -40,7 +40,7 @@ static struct vu_virtq_element elem [VIRTQUEUE_MAX_SIZE];
* udp_vu_hdrlen() - return the size of the header in level 2 frame (UDP)
* @v6: Set for IPv6 packet
*
- * Return: Return the size of the header
+ * Return: return the size of the header
*/
static size_t udp_vu_hdrlen(bool v6)
{
@@ -64,7 +64,7 @@ static size_t udp_vu_hdrlen(bool v6)
* @v6: Set for IPv6 connections
* @dlen: Size of received data (output)
*
- * Return: Number of iov entries used to store the datagram
+ * Return: number of iov entries used to store the datagram
*/
static int udp_vu_sock_recv(const struct ctx *c, int s, bool v6, ssize_t *dlen)
{
@@ -129,7 +129,7 @@ static int udp_vu_sock_recv(const struct ctx *c, int s, bool v6, ssize_t *dlen)
* @toside: Address information for one side of the flow
* @dlen: Packet data length
*
- * Return: Layer-4 length
+ * Return: layer-4 length
*/
static size_t udp_vu_prepare(const struct ctx *c,
const struct flowside *toside, ssize_t dlen)
diff --git a/util.c b/util.c
index 7b245ccc01f9..3e93d475839f 100644
--- a/util.c
+++ b/util.c
@@ -764,7 +764,7 @@ int read_remainder(int fd, const struct iovec *iov, size_t cnt, size_t skip)
* @dst: output buffer, minimum SOCKADDR_STRLEN bytes
* @size: size of buffer at @dst
*
- * Return: On success, a non-null pointer to @dst, NULL on failure
+ * Return: on success, a non-null pointer to @dst, NULL on failure
*/
const char *sockaddr_ntop(const void *sa, char *dst, socklen_t size)
{
@@ -824,7 +824,7 @@ const char *sockaddr_ntop(const void *sa, char *dst, socklen_t size)
* @dst: Output buffer, minimum ETH_ADDRSTRLEN bytes
* @size: Size of buffer at @dst
*
- * Return: On success, a non-null pointer to @dst, NULL on failure
+ * Return: on success, a non-null pointer to @dst, NULL on failure
*/
const char *eth_ntop(const unsigned char *mac, char *dst, size_t size)
{
@@ -841,7 +841,7 @@ const char *eth_ntop(const unsigned char *mac, char *dst, size_t size)
/** str_ee_origin() - Convert socket extended error origin to a string
* @ee: Socket extended error structure
*
- * Return: Static string describing error origin
+ * Return: static string describing error origin
*/
const char *str_ee_origin(const struct sock_extended_err *ee)
{
diff --git a/util.h b/util.h
index 5947337a9b27..b5b1b31b8ff8 100644
--- a/util.h
+++ b/util.h
@@ -152,7 +152,7 @@ void abort_with_msg(const char *fmt, ...)
* ntohl_unaligned() - Read 32-bit BE value from a possibly unaligned address
* @p: Pointer to the BE value in memory
*
- * Returns: Host-order value of 32-bit BE quantity at @p
+ * Return: host-order value of 32-bit BE quantity at @p
*/
static inline uint32_t ntohl_unaligned(const void *p)
{
@@ -231,7 +231,7 @@ bool snprintf_check(char *str, size_t size, const char *format, ...);
* af_name() - Return name of an address family
* @af: Address/protocol family (AF_INET or AF_INET6)
*
- * Returns: Name of the protocol family as a string
+ * Return: name of the protocol family as a string
*/
static inline const char *af_name(sa_family_t af)
{
diff --git a/vhost_user.c b/vhost_user.c
index e8377bb68608..e7fb0496132a 100644
--- a/vhost_user.c
+++ b/vhost_user.c
@@ -183,7 +183,7 @@ static void vmsg_set_reply_u64(struct vhost_user_msg *vmsg, uint64_t val)
* @conn_fd: vhost-user command socket
* @vmsg: vhost-user message
*
- * Return: 0 if recvmsg() has been interrupted or if there's no data to read,
+ * Return: 0 if recvmsg() has been interrupted or if there's no data to read,
* 1 if a message has been received
*/
static int vu_message_read_default(int conn_fd, struct vhost_user_msg *vmsg)
@@ -316,7 +316,7 @@ static void vu_send_reply(int conn_fd, struct vhost_user_msg *vmsg)
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: True as a reply is requested
+ * Return: true as a reply is requested
*/
static bool vu_get_features_exec(struct vu_dev *vdev,
struct vhost_user_msg *vmsg)
@@ -354,7 +354,7 @@ static void vu_set_enable_all_rings(struct vu_dev *vdev, bool enable)
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: False as no reply is requested
+ * Return: false as no reply is requested
*/
static bool vu_set_features_exec(struct vu_dev *vdev,
struct vhost_user_msg *vmsg)
@@ -379,7 +379,7 @@ static bool vu_set_features_exec(struct vu_dev *vdev,
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: False as no reply is requested
+ * Return: false as no reply is requested
*/
static bool vu_set_owner_exec(struct vu_dev *vdev,
struct vhost_user_msg *vmsg)
@@ -396,7 +396,7 @@ static bool vu_set_owner_exec(struct vu_dev *vdev,
* @vdev: vhost-user device
* @vq: Virtqueue
*
- * Return: True if ring cannot be mapped to our address space
+ * Return: true if ring cannot be mapped to our address space
*/
static bool map_ring(struct vu_dev *vdev, struct vu_virtq *vq)
{
@@ -418,7 +418,7 @@ static bool map_ring(struct vu_dev *vdev, struct vu_virtq *vq)
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: False as no reply is requested
+ * Return: false as no reply is requested
*
* #syscalls:vu mmap|mmap2 munmap
*/
@@ -566,7 +566,7 @@ void vu_log_write(const struct vu_dev *vdev, uint64_t address, uint64_t length)
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: True as a reply is requested
+ * Return: true as a reply is requested
*
* #syscalls:vu mmap|mmap2 munmap
*/
@@ -610,7 +610,7 @@ static bool vu_set_log_base_exec(struct vu_dev *vdev,
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: False as no reply is requested
+ * Return: false as no reply is requested
*/
static bool vu_set_log_fd_exec(struct vu_dev *vdev,
struct vhost_user_msg *vmsg)
@@ -633,7 +633,7 @@ static bool vu_set_log_fd_exec(struct vu_dev *vdev,
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: False as no reply is requested
+ * Return: false as no reply is requested
*/
static bool vu_set_vring_num_exec(struct vu_dev *vdev,
struct vhost_user_msg *vmsg)
@@ -653,7 +653,7 @@ static bool vu_set_vring_num_exec(struct vu_dev *vdev,
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: False as no reply is requested
+ * Return: false as no reply is requested
*/
static bool vu_set_vring_addr_exec(struct vu_dev *vdev,
struct vhost_user_msg *vmsg)
@@ -699,7 +699,7 @@ static bool vu_set_vring_addr_exec(struct vu_dev *vdev,
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: False as no reply is requested
+ * Return: false as no reply is requested
*/
static bool vu_set_vring_base_exec(struct vu_dev *vdev,
struct vhost_user_msg *vmsg)
@@ -720,7 +720,7 @@ static bool vu_set_vring_base_exec(struct vu_dev *vdev,
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: True as a reply is requested
+ * Return: true as a reply is requested
*/
static bool vu_get_vring_base_exec(struct vu_dev *vdev,
struct vhost_user_msg *vmsg)
@@ -794,7 +794,7 @@ static void vu_check_queue_msg_file(struct vhost_user_msg *vmsg)
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: False as no reply is requested
+ * Return: false as no reply is requested
*/
static bool vu_set_vring_kick_exec(struct vu_dev *vdev,
struct vhost_user_msg *vmsg)
@@ -834,7 +834,7 @@ static bool vu_set_vring_kick_exec(struct vu_dev *vdev,
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: False as no reply is requested
+ * Return: false as no reply is requested
*/
static bool vu_set_vring_call_exec(struct vu_dev *vdev,
struct vhost_user_msg *vmsg)
@@ -869,7 +869,7 @@ static bool vu_set_vring_call_exec(struct vu_dev *vdev,
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: False as no reply is requested
+ * Return: false as no reply is requested
*/
static bool vu_set_vring_err_exec(struct vu_dev *vdev,
struct vhost_user_msg *vmsg)
@@ -898,7 +898,7 @@ static bool vu_set_vring_err_exec(struct vu_dev *vdev,
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: True as a reply is requested
+ * Return: true as a reply is requested
*/
static bool vu_get_protocol_features_exec(struct vu_dev *vdev,
struct vhost_user_msg *vmsg)
@@ -919,7 +919,7 @@ static bool vu_get_protocol_features_exec(struct vu_dev *vdev,
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: False as no reply is requested
+ * Return: false as no reply is requested
*/
static bool vu_set_protocol_features_exec(struct vu_dev *vdev,
struct vhost_user_msg *vmsg)
@@ -938,7 +938,7 @@ static bool vu_set_protocol_features_exec(struct vu_dev *vdev,
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: True as a reply is requested
+ * Return: true as a reply is requested
*/
static bool vu_get_queue_num_exec(struct vu_dev *vdev,
struct vhost_user_msg *vmsg)
@@ -955,7 +955,7 @@ static bool vu_get_queue_num_exec(struct vu_dev *vdev,
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: False as no reply is requested
+ * Return: false as no reply is requested
*/
static bool vu_set_vring_enable_exec(struct vu_dev *vdev,
struct vhost_user_msg *vmsg)
@@ -981,7 +981,7 @@ static bool vu_set_vring_enable_exec(struct vu_dev *vdev,
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: False as no reply is requested
+ * Return: false as no reply is requested
*/
static bool vu_send_rarp_exec(struct vu_dev *vdev,
struct vhost_user_msg *vmsg)
@@ -1004,7 +1004,7 @@ static bool vu_send_rarp_exec(struct vu_dev *vdev,
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: True as the reply contains 0 to indicate success
+ * Return: true as the reply contains 0 to indicate success
* and set bit 8 as we don't provide our own fd.
*/
static bool vu_set_device_state_fd_exec(struct vu_dev *vdev,
@@ -1037,7 +1037,7 @@ static bool vu_set_device_state_fd_exec(struct vu_dev *vdev,
* @vdev: vhost-user device
* @vmsg: vhost-user message
*
- * Return: True as the reply contains the migration result
+ * Return: true as the reply contains the migration result
*/
/* cppcheck-suppress constParameterCallback */
static bool vu_check_device_state_exec(struct vu_dev *vdev,
diff --git a/virtio.c b/virtio.c
index 83906aab8d02..ed7842b4c78a 100644
--- a/virtio.c
+++ b/virtio.c
@@ -571,7 +571,7 @@ void vu_queue_unpop(struct vu_virtq *vq)
* @vq: Virtqueue
* @num: Number of element to unpop
*
- * Return: True on success, false if not
+ * Return: true on success, false if not
*/
bool vu_queue_rewind(struct vu_virtq *vq, unsigned int num)
{
diff --git a/virtio.h b/virtio.h
index d8beb884c61d..32757458ea95 100644
--- a/virtio.h
+++ b/virtio.h
@@ -140,7 +140,7 @@ struct vu_virtq_element {
* @features: Features set
* @fb: Feature bit to check
*
- * Return: True if the feature bit is set
+ * Return: true if the feature bit is set
*/
static inline bool has_feature(uint64_t features, unsigned int fbit)
{
@@ -152,7 +152,7 @@ static inline bool has_feature(uint64_t features, unsigned int fbit)
* @vdev: Vhost-user device
* @fbit: Feature to check
*
- * Return: True if the feature is available
+ * Return: true if the feature is available
*/
static inline bool vu_has_feature(const struct vu_dev *vdev,
unsigned int fbit)
@@ -165,7 +165,7 @@ static inline bool vu_has_feature(const struct vu_dev *vdev,
* @vdev: Vhost-user device
* @fbit: Feature to check
*
- * Return: True if the feature is available
+ * Return: true if the feature is available
*/
/* cppcheck-suppress unusedFunction */
static inline bool vu_has_protocol_feature(const struct vu_dev *vdev,
--
@@ -140,7 +140,7 @@ struct vu_virtq_element {
* @features: Features set
* @fb: Feature bit to check
*
- * Return: True if the feature bit is set
+ * Return: true if the feature bit is set
*/
static inline bool has_feature(uint64_t features, unsigned int fbit)
{
@@ -152,7 +152,7 @@ static inline bool has_feature(uint64_t features, unsigned int fbit)
* @vdev: Vhost-user device
* @fbit: Feature to check
*
- * Return: True if the feature is available
+ * Return: true if the feature is available
*/
static inline bool vu_has_feature(const struct vu_dev *vdev,
unsigned int fbit)
@@ -165,7 +165,7 @@ static inline bool vu_has_feature(const struct vu_dev *vdev,
* @vdev: Vhost-user device
* @fbit: Feature to check
*
- * Return: True if the feature is available
+ * Return: true if the feature is available
*/
/* cppcheck-suppress unusedFunction */
static inline bool vu_has_protocol_feature(const struct vu_dev *vdev,
--
2.49.0
next prev parent reply other threads:[~2025-06-23 11:06 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-23 11:06 [PATCH v7 00/31] Introduce discontiguous frames management Laurent Vivier
2025-06-23 11:06 ` Laurent Vivier [this message]
2025-06-23 11:06 ` [PATCH v7 02/31] arp: Don't mix incoming and outgoing buffers Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 03/31] iov: Introduce iov_tail_clone() and iov_tail_drop() Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 04/31] iov: Update IOV_REMOVE_HEADER() and IOV_PEEK_HEADER() Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 05/31] tap: Use iov_tail with tap_add_packet() Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 06/31] packet: Use iov_tail with packet_add() Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 07/31] packet: Add packet_data() Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 08/31] arp: Convert to iov_tail Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 09/31] ndp: " Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 10/31] icmp: " Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 11/31] udp: " Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 12/31] tcp: Convert tcp_tap_handler() to use iov_tail Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 13/31] tcp: Convert tcp_data_from_tap() " Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 14/31] dhcpv6: move offset initialization out of dhcpv6_opt() Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 15/31] dhcpv6: Extract sending of NotOnLink status Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 16/31] dhcpv6: Convert to iov_tail Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 17/31] dhcpv6: Use iov_tail in dhcpv6_opt() Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 18/31] dhcp: Convert to iov_tail Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 19/31] ip: Use iov_tail in ipv6_l4hdr() Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 20/31] tap: Convert tap4_handler() to iov_tail Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 21/31] tap: Convert tap6_handler() " Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 22/31] packet: rename packet_data() to packet_get() Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 23/31] arp: use iov_tail rather than pool Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 24/31] dhcp: " Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 25/31] dhcpv6: " Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 26/31] icmp: " Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 27/31] ndp: " Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 28/31] packet: remove PACKET_POOL() and PACKET_POOL_P() Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 29/31] packet: remove unused parameter from PACKET_POOL_DECL() Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 30/31] packet: add memory regions information into pool Laurent Vivier
2025-06-23 11:06 ` [PATCH v7 31/31] packet: use buf to store iovec array Laurent Vivier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250623110635.1478625-2-lvivier@redhat.com \
--to=lvivier@redhat.com \
--cc=passt-dev@passt.top \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).