All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: kernel test robot <lkp@intel.com>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
	oe-kbuild-all@lists.linux.dev,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [akpm-mm:mm-unstable 262/266] mm/zsmalloc.c:224:28: error: variably modified 'size_class' at file scope
Date: Thu, 12 Jan 2023 14:32:32 +0900	[thread overview]
Message-ID: <Y7+bcLR79Z8/iK94@google.com> (raw)
In-Reply-To: <202301120505.al9KVH7B-lkp@intel.com>

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@intel.com>
> 
> 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.

      reply	other threads:[~2023-01-12  5:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11 21:13 [akpm-mm:mm-unstable 262/266] mm/zsmalloc.c:224:28: error: variably modified 'size_class' at file scope kernel test robot
2023-01-12  5:32 ` Sergey Senozhatsky [this message]

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=Y7+bcLR79Z8/iK94@google.com \
    --to=senozhatsky@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.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.