diff options
author | Laurent Vivier <lvivier@redhat.com> | 2025-06-20 17:25:15 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2025-07-18 19:19:37 +0200 |
commit | 3757ea36d8aa4f40119d66646a3ccaafc670d6b4 (patch) | |
tree | 17e97518f64a77729f204a689f1d123bbb9fc498 | |
parent | 9e0423e13541e8da657f46dff71e841f40ee7391 (diff) | |
download | passt-master.tar passt-master.tar.gz passt-master.tar.bz2 passt-master.tar.lz passt-master.tar.xz passt-master.tar.zst passt-master.zip |
The commit updates the style of function comments by adding parentheses
to function names in the descriptions where they are missing.
Done with:
---------8<------ fix_function_name.awk ---------8<------
/^\/\*\*/ {
check_next = 1;
print $0
next
}
check_next == 1 && / \* struct/ {
check_next = 0
print $0
next
}
check_next == 1 && / \* enum/ {
check_next = 0
print $0
next
}
check_next == 1 && /^ \* [^ (]* -/ {
modified_line = gensub(/^ \* ([^ ]*) -(.*)$/, " * \\1() -\\2", "g", $0)
print modified_line
check_next = 0;
next
}
{
print $0
check_next = 0
}
---------8<------ fix_function_name.awk ---------8<------
Then
for file in *.[ch]; do
cp ${file} ${file}.tmp && \
awk -f fix_function_name.awk ${file}.tmp > ${file}
done
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | checksum.c | 4 | ||||
-rw-r--r-- | conf.c | 4 | ||||
-rw-r--r-- | fwd.h | 2 | ||||
-rw-r--r-- | iov.c | 2 | ||||
-rw-r--r-- | netlink.c | 2 | ||||
-rw-r--r-- | siphash.h | 2 | ||||
-rw-r--r-- | vhost_user.h | 4 |
7 files changed, 10 insertions, 10 deletions
@@ -452,7 +452,7 @@ less_than_128_bytes: } /** - * csum_unfolded - Calculate the unfolded checksum of a data buffer. + * csum_unfolded() - Calculate the unfolded checksum of a data buffer. * * @buf: Input buffer * @len: Input length @@ -481,7 +481,7 @@ uint32_t csum_unfolded(const void *buf, size_t len, uint32_t init) } #else /* __AVX2__ */ /** - * csum_unfolded - Calculate the unfolded checksum of a data buffer. + * csum_unfolded() - Calculate the unfolded checksum of a data buffer. * * @buf: Input buffer * @len: Input length @@ -65,7 +65,7 @@ const char *pasta_default_ifn = "tap0"; /** - * next_chunk - Return the next piece of a string delimited by a character + * next_chunk() - Return the next piece of a string delimited by a character * @s: String to search * @c: Delimiter character * @@ -80,7 +80,7 @@ static char *next_chunk(const char *s, char c) } /** - * port_range - Represents a non-empty range of ports + * port_range() - Represents a non-empty range of ports * @first: First port number in the range * @last: Last port number in the range (inclusive) * @@ -27,7 +27,7 @@ enum fwd_ports_mode { #define PORT_BITMAP_SIZE DIV_ROUND_UP(NUM_PORTS, 8) /** - * fwd_ports - Describes port forwarding for one protocol and direction + * fwd_ports() - Describes port forwarding for one protocol and direction * @mode: Overall forwarding mode (all, none, auto, specific ports) * @scan4: /proc/net fd to scan for IPv4 ports when in AUTO mode * @scan6: /proc/net fd to scan for IPv6 ports when in AUTO mode @@ -181,7 +181,7 @@ bool iov_tail_prune(struct iov_tail *tail) } /** - * iov_tail_size - Calculate the total size of an IO vector tail + * iov_tail_size() - Calculate the total size of an IO vector tail * @tail: IO vector tail * * Return: the total size in bytes. @@ -199,7 +199,7 @@ static struct nlmsghdr *nl_next(int s, char *buf, struct nlmsghdr *nh, ssize_t * } /** - * nl_foreach - 'for' type macro to step through netlink response messages + * nl_foreach() - 'for' type macro to step through netlink response messages * nl_foreach_oftype - as above, but only messages of expected type * @nh: Steps through each response header (struct nlmsghdr *) * @status: When loop exits indicates if there was an error (ssize_t) @@ -99,7 +99,7 @@ static inline void siphash_feed(struct siphash_state *state, uint64_t in) } /** - * siphash_final - Finalize SipHash calculations + * siphash_final() - Finalize SipHash calculations * @v: siphash state (4 x 64-bit integers) * @len: Total length of input data * @tail: Final data for the hash (<= 7 bytes) diff --git a/vhost_user.h b/vhost_user.h index f2ae2da..e806a9e 100644 --- a/vhost_user.h +++ b/vhost_user.h @@ -217,7 +217,7 @@ struct vhost_user_msg { }) /** - * vu_queue_enabled - Return state of a virtqueue + * vu_queue_enabled() - Return state of a virtqueue * @vq: virtqueue to check * * Return: true if the virqueue is enabled, false otherwise @@ -228,7 +228,7 @@ static inline bool vu_queue_enabled(const struct vu_virtq *vq) } /** - * vu_queue_started - Return state of a virtqueue + * vu_queue_started() - Return state of a virtqueue * @vq: virtqueue to check * * Return: true if the virqueue is started, false otherwise |