From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>, passt-dev@passt.top
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH 4/6] tcp: Don't export tcp_update_csum()
Date: Wed, 5 Mar 2025 17:15:06 +1100 [thread overview]
Message-ID: <20250305061508.1699713-5-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <20250305061508.1699713-1-david@gibson.dropbear.id.au>
tcp_update_csum() is exposed in tcp_internal.h, but is only used in tcp.c.
Remove the unneded prototype and make it static.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
tcp.c | 3 ++-
tcp_internal.h | 2 --
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/tcp.c b/tcp.c
index 1db16095..b8a01cc6 100644
--- a/tcp.c
+++ b/tcp.c
@@ -787,7 +787,8 @@ static void tcp_sock_set_nodelay(int s)
* @th: TCP header (updated)
* @payload: TCP payload
*/
-void tcp_update_csum(uint32_t psum, struct tcphdr *th, struct iov_tail *payload)
+static void tcp_update_csum(uint32_t psum, struct tcphdr *th,
+ struct iov_tail *payload)
{
th->check = 0;
psum = csum_unfolded(th, sizeof(*th), psum);
diff --git a/tcp_internal.h b/tcp_internal.h
index 9cf31f53..6f5e054c 100644
--- a/tcp_internal.h
+++ b/tcp_internal.h
@@ -166,8 +166,6 @@ void tcp_rst_do(const struct ctx *c, struct tcp_tap_conn *conn);
struct tcp_info_linux;
-void tcp_update_csum(uint32_t psum, struct tcphdr *th,
- struct iov_tail *payload);
void tcp_fill_headers(const struct tcp_tap_conn *conn,
struct tap_hdr *taph,
struct iphdr *ip4h, struct ipv6hdr *ip6h,
--
@@ -166,8 +166,6 @@ void tcp_rst_do(const struct ctx *c, struct tcp_tap_conn *conn);
struct tcp_info_linux;
-void tcp_update_csum(uint32_t psum, struct tcphdr *th,
- struct iov_tail *payload);
void tcp_fill_headers(const struct tcp_tap_conn *conn,
struct tap_hdr *taph,
struct iphdr *ip4h, struct ipv6hdr *ip6h,
--
2.48.1
next prev parent reply other threads:[~2025-03-05 6:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-05 6:15 [PATCH 0/6] Deal with a bunch of staticFunction warnings from cppcheck 2.17 David Gibson
2025-03-05 6:15 ` [PATCH 1/6] treewide: Mark assorted functions static David Gibson
2025-03-05 6:15 ` [PATCH 2/6] log: Don't export passt_vsyslog() David Gibson
2025-03-05 6:15 ` [PATCH 3/6] checksum: Don't export various functions David Gibson
2025-03-05 6:15 ` David Gibson [this message]
2025-03-05 6:15 ` [PATCH 5/6] vhost_user: Don't export several functions David Gibson
2025-03-05 6:15 ` [PATCH 6/6] cppcheck: Add suppressions for "logically" exported functions David Gibson
2025-03-07 6:30 ` [PATCH 0/6] Deal with a bunch of staticFunction warnings from cppcheck 2.17 Stefano Brivio
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=20250305061508.1699713-5-david@gibson.dropbear.id.au \
--to=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.com \
/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).