Re: [akpm-mm:mm-unstable 262/266] mm/zsmalloc.c:224:28: error: variably modified 'size_class' at file scope

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On (23/01/12 05:13), kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> head:   8a0b7a30e285f66c8369f9f77c5784d8240ba1b3
> commit: eab24cc5a373f23bbf7e998c1b3db8bdbb8759d0 [262/266] zsmalloc: make zspage chain size configurable
> config: parisc64-allyesconfig
> compiler: hppa64-linux-gcc (GCC) 12.1.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?id=eab24cc5a373f23bbf7e998c1b3db8bdbb8759d0
>         git remote add akpm-mm https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git
>         git fetch --no-tags akpm-mm mm-unstable
>         git checkout eab24cc5a373f23bbf7e998c1b3db8bdbb8759d0
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=parisc64 olddefconfig
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=parisc64 SHELL=/bin/bash
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> 
> All error/warnings (new ones prefixed by >>):
> 
>    In file included from include/vdso/const.h:5,
>                     from include/linux/const.h:4,
>                     from include/linux/list.h:9,
>                     from include/linux/module.h:12,
>                     from mm/zsmalloc.c:40:
> >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow]
>      122 |         MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS))
>          |                                                           ^~
>    include/uapi/linux/const.h:34:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP'
>       34 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
>          |                                        ^
>    mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX'
>      122 |         MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS))
>          |         ^~~
>    mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE'
>      140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \
>          |                                                           ^~~~~~~~~~~~~~~~~
>    mm/zsmalloc.c:224:39: note: in expansion of macro 'ZS_SIZE_CLASSES'
>      224 |         struct size_class *size_class[ZS_SIZE_CLASSES];
>          |                                       ^~~~~~~~~~~~~~~
> >> mm/zsmalloc.c:122:59: warning: right shift count >= width of type [-Wshift-count-overflow]
>      122 |         MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS))
>          |                                                           ^~
>    include/uapi/linux/const.h:34:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP'
>       34 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
>          |                                        ^
>    mm/zsmalloc.c:122:9: note: in expansion of macro 'MAX'
>      122 |         MAX(32, (CONFIG_ZSMALLOC_CHAIN_SIZE << PAGE_SHIFT >> OBJ_INDEX_BITS))
>          |         ^~~
>    mm/zsmalloc.c:140:59: note: in expansion of macro 'ZS_MIN_ALLOC_SIZE'
>      140 | #define ZS_SIZE_CLASSES (DIV_ROUND_UP(ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE, \
>          |                                                           ^~~~~~~~~~~~~~~~~
>    mm/zsmalloc.c:224:39: note: in expansion of macro 'ZS_SIZE_CLASSES'
>      224 |         struct size_class *size_class[ZS_SIZE_CLASSES];
>          |                                       ^~~~~~~~~~~~~~~
> >> mm/zsmalloc.c:224:28: error: variably modified 'size_class' at file scope
>      224 |         struct size_class *size_class[ZS_SIZE_CLASSES];

Thanks.

OK, so I think on hppa64 it wants chain-size to be explicitly casted to
unsigned long. Let me try it and send out a fixup patch.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux