From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,terrelln@fb.com,linux@treblig.org,akpm@linux-foundation.org
Subject: + lib-xxhash-comment-out-unused-functions.patch added to mm-nonmm-unstable branch
Date: Mon, 14 Jul 2025 17:42:20 -0700 [thread overview]
Message-ID: <20250715004220.F27C9C4CEED@smtp.kernel.org> (raw)
The patch titled
Subject: lib/xxhash: comment out unused functions
has been added to the -mm mm-nonmm-unstable branch. Its filename is
lib-xxhash-comment-out-unused-functions.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/lib-xxhash-comment-out-unused-functions.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: "Dr. David Alan Gilbert" <linux@treblig.org>
Subject: lib/xxhash: comment out unused functions
Date: Mon, 14 Jul 2025 01:09:27 +0100
xxh32_digest() and xxh32_update() were added in 2017 in the original
xxhash commit, but have remained unused.
While I've mostly been deleting unused functions, this is a general
library and I see erofs is using other bits of xxh32, so it didn't seem
right just to delete them.
Comment them out with #if 0.
(Which checkpatch rightly warns about)
Link: https://lkml.kernel.org/r/20250714000927.294767-1-linux@treblig.org
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Cc: Nick Terrell <terrelln@fb.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/xxhash.h | 4 ++++
lib/xxhash.c | 2 ++
2 files changed, 6 insertions(+)
--- a/include/linux/xxhash.h~lib-xxhash-comment-out-unused-functions
+++ a/include/linux/xxhash.h
@@ -177,6 +177,9 @@ struct xxh64_state {
*/
void xxh32_reset(struct xxh32_state *state, uint32_t seed);
+#if 0
+/* Currently unused, feel free to uncomment them if you use them. */
+
/**
* xxh32_update() - hash the data given and update the xxh32 state
*
@@ -202,6 +205,7 @@ int xxh32_update(struct xxh32_state *sta
* Return: The xxh32 hash stored in the state.
*/
uint32_t xxh32_digest(const struct xxh32_state *state);
+#endif
/**
* xxh64_reset() - reset the xxh64 state to start a new hashing operation
--- a/lib/xxhash.c~lib-xxhash-comment-out-unused-functions
+++ a/lib/xxhash.c
@@ -267,6 +267,7 @@ void xxh64_reset(struct xxh64_state *sta
}
EXPORT_SYMBOL(xxh64_reset);
+#if 0
int xxh32_update(struct xxh32_state *state, const void *input, const size_t len)
{
const uint8_t *p = (const uint8_t *)input;
@@ -373,6 +374,7 @@ uint32_t xxh32_digest(const struct xxh32
return h32;
}
EXPORT_SYMBOL(xxh32_digest);
+#endif
int xxh64_update(struct xxh64_state *state, const void *input, const size_t len)
{
_
Patches currently in -mm which might be from linux@treblig.org are
lib-xxhash-comment-out-unused-functions.patch
reply other threads:[~2025-07-15 0:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250715004220.F27C9C4CEED@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=linux@treblig.org \
--cc=mm-commits@vger.kernel.org \
--cc=terrelln@fb.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.