Thread (36 messages) 36 messages, 5 authors, 2025-09-22
STALE274d

[PATCH 16/27 5.10.y] lib: zstd: drop local MIN/MAX macros in favor of generic ones

From: Eliav Farber <hidden>
Date: 2025-09-19 10:27:15
Also in: amd-gfx, dri-devel, linux-arm-msm, linux-btrfs, linux-edac, linux-ext4, linux-hwmon, linux-input, linux-media, linux-mm, linux-scsi, linux-staging, linux-um, lkml, netfilter-devel, platform-driver-x86, stable
Subsystem: library code, the rest, zstd · Maintainers: Andrew Morton, Linus Torvalds, Nick Terrell, David Sterba

Remove the MIN() and MAX() macros from zstd_internal.h to avoid
duplicate definitions now that the generic MIN() and MAX() macros
are available globally.

This change continues commit 1a251f52cfdc ("minmax: make generic MIN()
and MAX() macros available everywhere") and is required for 5.10.y,
where these macros did not exist in zstd_internal.h when the upstream
change was made.

Signed-off-by: Eliav Farber <redacted>
---
 lib/zstd/zstd_internal.h | 2 --
 1 file changed, 2 deletions(-)
diff --git a/lib/zstd/zstd_internal.h b/lib/zstd/zstd_internal.h
index dac753397f86..927ed4e8c11c 100644
--- a/lib/zstd/zstd_internal.h
+++ b/lib/zstd/zstd_internal.h
@@ -36,8 +36,6 @@
 /*-*************************************
 *  shared macros
 ***************************************/
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
 #define CHECK_F(f)                       \
 	{                                \
 		size_t const errcod = f; \
-- 
2.47.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help