Skip to contentSkip to conversation

lib-zlib-drop-equal-macro.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Mar 17, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: lib/zlib: drop EQUAL macro
has been removed from the -mm tree. Its filename was
lib-zlib-drop-equal-macro.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Yury Norov <[email protected]>
Subject: lib/zlib: drop EQUAL macro
Date: Wed, 5 Feb 2025 16:29:32 -0500

The macro is prehistoric, and only exists to help those readers who don't know what memcmp() returns if memory areas differ. This is pretty well documented, so the macro looks excessive.

Now that the only user of the macro depends on DEBUG_ZLIB config, GCC warns about unused macro if the library is built with W=2 against defconfig. So drop it for good.

---

 lib/zlib_deflate/deflate.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
lib/zlib_deflate/deflate.c renamed from lib/zlib_deflate/deflate.c~lib-zlib-drop-equal-macro +1 -5
@@ -151,9 +151,6 @@ static const config configuration_table[
  * meaning.
  */
 
-#define EQUAL 0
-/* result of memcmp for equal strings */
-
 /* ===========================================================================
  * Update a hash value with the given input byte
  * IN  assertion: all calls to UPDATE_HASH are made with consecutive
@@ -713,8 +710,7 @@ static void check_match(
 )
 {
     /* check that the match is indeed a match */
-    if (memcmp((char *)s->window + match,
-                (char *)s->window + start, length) != EQUAL) {
+    if (memcmp((char *)s->window + match, (char *)s->window + start, length)) {
         fprintf(stderr, " start %u, match %u, length %d\n",
 		start, match, length);
         do {

_

Patches currently in -mm which might be from [email protected] are