All of lore.kernel.org
 help / color / mirror / Atom feed
* + lib-xxhash-comment-out-unused-functions.patch added to mm-nonmm-unstable branch
@ 2025-07-15  0:42 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-07-15  0:42 UTC (permalink / raw)
  To: mm-commits, terrelln, linux, akpm


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-07-15  0:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-15  0:42 + lib-xxhash-comment-out-unused-functions.patch added to mm-nonmm-unstable branch Andrew Morton

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.