Re: [PATCH] powerpc/boot: remove unused min_t/max_t macros
From: kernel test robot
Date: Fri May 29 2026 - 15:55:08 EST
Hi Thorsten,
kernel test robot noticed the following build errors:
[auto build test ERROR on powerpc/next]
[also build test ERROR on powerpc/fixes linus/master v7.1-rc5 next-20260528]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Thorsten-Blum/powerpc-boot-remove-unused-min_t-max_t-macros/20260525-172120
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link: https://lore.kernel.org/r/20260525091839.817778-3-thorsten.blum%40linux.dev
patch subject: [PATCH] powerpc/boot: remove unused min_t/max_t macros
config: powerpc64-randconfig-r061-20260529 (https://download.01.org/0day-ci/archive/20260530/202605300340.G7sL2jlK-lkp@xxxxxxxxx/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 9409c07de6378507397ecdb6f05f628f58110112)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260530/202605300340.G7sL2jlK-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605300340.G7sL2jlK-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
In file included from arch/powerpc/boot/decompress.c:37:
In file included from arch/powerpc/boot/../../../lib/decompress_unxz.c:241:
>> arch/powerpc/boot/../../../lib/xz/xz_dec_stream.c:158:21: error: call to undeclared function 'min_t'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
158 | size_t copy_size = min_t(size_t,
| ^
>> arch/powerpc/boot/../../../lib/xz/xz_dec_stream.c:158:27: error: unexpected type name 'size_t': expected expression
158 | size_t copy_size = min_t(size_t,
| ^
In file included from arch/powerpc/boot/decompress.c:37:
In file included from arch/powerpc/boot/../../../lib/decompress_unxz.c:242:
>> arch/powerpc/boot/../../../lib/xz/xz_dec_lzma2.c:357:9: error: call to undeclared function 'min_t'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
357 | left = min_t(size_t, dict->limit - dict->pos, *len);
| ^
>> arch/powerpc/boot/../../../lib/xz/xz_dec_lzma2.c:357:15: error: unexpected type name 'size_t': expected expression
357 | left = min_t(size_t, dict->limit - dict->pos, *len);
| ^
arch/powerpc/boot/../../../lib/xz/xz_dec_lzma2.c:1101:25: error: call to undeclared function 'min_t'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1101 | dict_limit(&s->dict, min_t(size_t,
| ^
arch/powerpc/boot/../../../lib/xz/xz_dec_lzma2.c:1101:31: error: unexpected type name 'size_t': expected expression
1101 | dict_limit(&s->dict, min_t(size_t,
| ^
In file included from arch/powerpc/boot/decompress.c:37:
In file included from arch/powerpc/boot/../../../lib/decompress_unxz.c:243:
>> arch/powerpc/boot/../../../lib/xz/xz_dec_bcj.c:469:14: error: call to undeclared function 'min_t'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
469 | copy_size = min_t(size_t, s->temp.filtered, b->out_size - b->out_pos);
| ^
>> arch/powerpc/boot/../../../lib/xz/xz_dec_bcj.c:469:20: error: unexpected type name 'size_t': expected expression
469 | copy_size = min_t(size_t, s->temp.filtered, b->out_size - b->out_pos);
| ^
8 errors generated.
vim +/min_t +158 arch/powerpc/boot/../../../lib/xz/xz_dec_stream.c
24fa0402a9b6a5 Lasse Collin 2011-01-12 149
24fa0402a9b6a5 Lasse Collin 2011-01-12 150 /*
24fa0402a9b6a5 Lasse Collin 2011-01-12 151 * Fill s->temp by copying data starting from b->in[b->in_pos]. Caller
24fa0402a9b6a5 Lasse Collin 2011-01-12 152 * must have set s->temp.pos to indicate how much data we are supposed
24fa0402a9b6a5 Lasse Collin 2011-01-12 153 * to copy into s->temp.buf. Return true once s->temp.pos has reached
24fa0402a9b6a5 Lasse Collin 2011-01-12 154 * s->temp.size.
24fa0402a9b6a5 Lasse Collin 2011-01-12 155 */
24fa0402a9b6a5 Lasse Collin 2011-01-12 156 static bool fill_temp(struct xz_dec *s, struct xz_buf *b)
24fa0402a9b6a5 Lasse Collin 2011-01-12 157 {
24fa0402a9b6a5 Lasse Collin 2011-01-12 @158 size_t copy_size = min_t(size_t,
24fa0402a9b6a5 Lasse Collin 2011-01-12 159 b->in_size - b->in_pos, s->temp.size - s->temp.pos);
24fa0402a9b6a5 Lasse Collin 2011-01-12 160
24fa0402a9b6a5 Lasse Collin 2011-01-12 161 memcpy(s->temp.buf + s->temp.pos, b->in + b->in_pos, copy_size);
24fa0402a9b6a5 Lasse Collin 2011-01-12 162 b->in_pos += copy_size;
24fa0402a9b6a5 Lasse Collin 2011-01-12 163 s->temp.pos += copy_size;
24fa0402a9b6a5 Lasse Collin 2011-01-12 164
24fa0402a9b6a5 Lasse Collin 2011-01-12 165 if (s->temp.pos == s->temp.size) {
24fa0402a9b6a5 Lasse Collin 2011-01-12 166 s->temp.pos = 0;
24fa0402a9b6a5 Lasse Collin 2011-01-12 167 return true;
24fa0402a9b6a5 Lasse Collin 2011-01-12 168 }
24fa0402a9b6a5 Lasse Collin 2011-01-12 169
24fa0402a9b6a5 Lasse Collin 2011-01-12 170 return false;
24fa0402a9b6a5 Lasse Collin 2011-01-12 171 }
24fa0402a9b6a5 Lasse Collin 2011-01-12 172
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki