From: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
To: Thorsten Blum <thorsten.blum@linux.dev>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc/boot: remove unused min_t/max_t macros
Date: Fri, 29 May 2026 11:10:20 +0200 [thread overview]
Message-ID: <7c1a04f3-caa8-4200-a4ee-55cd2cc28461@kernel.org> (raw)
In-Reply-To: <20260525091839.817778-3-thorsten.blum@linux.dev>
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 <thorsten.blum@linux.dev>
> ---
> 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
next prev parent reply other threads:[~2026-05-29 9:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-25 9:18 [PATCH] powerpc/boot: remove unused min_t/max_t macros Thorsten Blum
2026-05-29 9:10 ` Christophe Leroy (CS GROUP) [this message]
2026-05-29 9:45 ` Thorsten Blum
2026-05-29 9:52 ` Christophe Leroy (CS GROUP)
2026-05-29 19:50 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7c1a04f3-caa8-4200-a4ee-55cd2cc28461@kernel.org \
--to=chleroy@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=thorsten.blum@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.