* + lib-zlib-drop-equal-macro.patch added to mm-nonmm-unstable branch
@ 2025-02-06 7:45 Andrew Morton
2025-02-06 7:55 ` Sergey Senozhatsky
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Morton @ 2025-02-06 7:45 UTC (permalink / raw)
To: mm-commits, zaslonko, sergey.senozhatsky, joe, iii,
heiko.carstens, yury.norov, akpm
The patch titled
Subject: lib/zlib: drop EQUAL macro
has been added to the -mm mm-nonmm-unstable branch. Its filename is
lib-zlib-drop-equal-macro.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/lib-zlib-drop-equal-macro.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: Yury Norov <yury.norov@gmail.com>
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.
Link: https://lkml.kernel.org/r/20250205212933.68695-1-yury.norov@gmail.com
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Cc: Heiko Carsten <heiko.carstens@de.ibm.com>
Cc: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Mikhail Zaslonko <zaslonko@linux.ibm.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/zlib_deflate/deflate.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
--- a/lib/zlib_deflate/deflate.c~lib-zlib-drop-equal-macro
+++ a/lib/zlib_deflate/deflate.c
@@ -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 yury.norov@gmail.com are
lib-zlib-drop-equal-macro.patch
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: + lib-zlib-drop-equal-macro.patch added to mm-nonmm-unstable branch
2025-02-06 7:45 + lib-zlib-drop-equal-macro.patch added to mm-nonmm-unstable branch Andrew Morton
@ 2025-02-06 7:55 ` Sergey Senozhatsky
0 siblings, 0 replies; 2+ messages in thread
From: Sergey Senozhatsky @ 2025-02-06 7:55 UTC (permalink / raw)
To: Andrew Morton
Cc: mm-commits, zaslonko, sergey.senozhatsky, joe, iii,
heiko.carstens, yury.norov
On (25/02/05 23:45), Andrew Morton wrote:
> From: Yury Norov <yury.norov@gmail.com>
> 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.
>
> Link: https://lkml.kernel.org/r/20250205212933.68695-1-yury.norov@gmail.com
> Signed-off-by: Yury Norov <yury.norov@gmail.com>
> Cc: Heiko Carsten <heiko.carstens@de.ibm.com>
> Cc: Ilya Leoshkevich <iii@linux.ibm.com>
> Cc: Mikhail Zaslonko <zaslonko@linux.ibm.com>
> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> Cc: Joe Perches <joe@perches.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
FWIW
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-06 7:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-06 7:45 + lib-zlib-drop-equal-macro.patch added to mm-nonmm-unstable branch Andrew Morton
2025-02-06 7:55 ` Sergey Senozhatsky
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.