Le 25/05/2026 à 11:18, Thorsten Blum a écrit :
The min_t() and max_t() macros are no longer used by the boot wrapper,
remove them.

Did you test your change ?


  BOOTCC  arch/powerpc/boot/decompress.o
In file included from arch/powerpc/boot/../../../lib/decompress_unxz.c:241,
                 from arch/powerpc/boot/decompress.c:37:
arch/powerpc/boot/../../../lib/xz/xz_dec_stream.c: In function 'fill_temp':
arch/powerpc/boot/../../../lib/xz/xz_dec_stream.c:158:28: error: implicit declaration of function 'min_t'; did you mean 'min'? [-Wimplicit-function-declaration]
  158 |         size_t copy_size = min_t(size_t,
      |                            ^~~~~
      |                            min
arch/powerpc/boot/../../../lib/xz/xz_dec_stream.c:158:34: error: expected expression before 'size_t'
  158 |         size_t copy_size = min_t(size_t,
      |                                  ^~~~~~
In file included from arch/powerpc/boot/../../../lib/decompress_unxz.c:242:
arch/powerpc/boot/../../../lib/xz/xz_dec_lzma2.c: In function 'dict_repeat':
arch/powerpc/boot/../../../lib/xz/xz_dec_lzma2.c:357:22: error: expected expression before 'size_t'
  357 |         left = min_t(size_t, dict->limit - dict->pos, *len);
      |                      ^~~~~~
arch/powerpc/boot/../../../lib/xz/xz_dec_lzma2.c: In function 'xz_dec_lzma2_run': arch/powerpc/boot/../../../lib/xz/xz_dec_lzma2.c:1101:52: error: expected expression before 'size_t'
 1101 |                         dict_limit(&s->dict, min_t(size_t,
      |                                                    ^~~~~~
In file included from arch/powerpc/boot/../../../lib/decompress_unxz.c:243:
arch/powerpc/boot/../../../lib/xz/xz_dec_bcj.c: In function 'bcj_flush':
arch/powerpc/boot/../../../lib/xz/xz_dec_bcj.c:469:27: error: expected expression before 'size_t' 469 | copy_size = min_t(size_t, s->temp.filtered, b->out_size - b->out_pos);
      |                           ^~~~~~
make[2]: *** [arch/powerpc/boot/Makefile:235: arch/powerpc/boot/decompress.o] Error 1
make[1]: *** [arch/powerpc/Makefile:236: zImage] Error 2
make: *** [Makefile:248: __sub-make] Error 2




Signed-off-by: Thorsten Blum <[email protected]>
---
  arch/powerpc/boot/types.h | 3 ---
  1 file changed, 3 deletions(-)

diff --git a/arch/powerpc/boot/types.h b/arch/powerpc/boot/types.h
index 8a4c418b7260..c5085c2632bf 100644
--- a/arch/powerpc/boot/types.h
+++ b/arch/powerpc/boot/types.h
@@ -37,9 +37,6 @@ typedef s64 int64_t;
        (void) (&_x == &_y);    \
        _x > _y ? _x : _y; })
-#define min_t(type, a, b) min(((type) a), ((type) b))
-#define max_t(type, a, b) max(((type) a), ((type) b))
-
  typedef int bool;
#ifndef true


Reply via email to