lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 29 Oct 2022 07:56:27 +0800
From:   kernel test robot <lkp@...el.com>
To:     Deepak R Varma <drv@...lo.com>, outreachy@...ts.linux.dev,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        dri-devel@...ts.freedesktop.org, linux-fbdev@...r.kernel.org,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev
Subject: Re: [PATCH] staging: fbtft: Use ARRAY_SIZE() to get argument count

Hi Deepak,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]

url:    https://github.com/intel-lab-lkp/linux/commits/Deepak-R-Varma/staging-fbtft-Use-ARRAY_SIZE-to-get-argument-count/20221028-213204
patch link:    https://lore.kernel.org/r/Y1vZXUi0Bjiub8HZ%40ubunlion
patch subject: [PATCH] staging: fbtft: Use ARRAY_SIZE() to get argument count
config: arm-randconfig-r004-20221029
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
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
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/intel-lab-lkp/linux/commit/74374d9d2a2d6066b94d64aa44e9a1b24c854c4e
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Deepak-R-Varma/staging-fbtft-Use-ARRAY_SIZE-to-get-argument-count/20221028-213204
        git checkout 74374d9d2a2d6066b94d64aa44e9a1b24c854c4e
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/staging/fbtft/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

>> drivers/staging/fbtft/fbtft-core.c:206:15: error: initializer element is not a compile-time constant
                     (xs >> 8) & 0xFF, xs & 0xFF, (xe >> 8) & 0xFF, xe & 0xFF);
                     ~~~~~~~~~~^~~~~~
   drivers/staging/fbtft/fbtft.h:237:47: note: expanded from macro 'write_reg'
           ((par)->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__))
                                                        ^~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:234:44: note: expanded from macro 'NUMARGS'
   #define NUMARGS(...)  ARRAY_SIZE(((int[]){ __VA_ARGS__ }))
                                              ^~~~~~~~~~~
   include/linux/kernel.h:55:75: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                                                             ^~~
   include/linux/compiler.h:232:59: note: expanded from macro '__must_be_array'
   #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                                                                  ^
   include/linux/compiler_types.h:298:63: note: expanded from macro '__same_type'
   #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
                                                                 ^
   include/linux/build_bug.h:16:62: note: expanded from macro 'BUILD_BUG_ON_ZERO'
   #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                                ^
   drivers/staging/fbtft/fbtft-core.c:209:15: error: initializer element is not a compile-time constant
                     (ys >> 8) & 0xFF, ys & 0xFF, (ye >> 8) & 0xFF, ye & 0xFF);
                     ~~~~~~~~~~^~~~~~
   drivers/staging/fbtft/fbtft.h:237:47: note: expanded from macro 'write_reg'
           ((par)->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__))
                                                        ^~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:234:44: note: expanded from macro 'NUMARGS'
   #define NUMARGS(...)  ARRAY_SIZE(((int[]){ __VA_ARGS__ }))
                                              ^~~~~~~~~~~
   include/linux/kernel.h:55:75: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                                                             ^~~
   include/linux/compiler.h:232:59: note: expanded from macro '__must_be_array'
   #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                                                                  ^
   include/linux/compiler_types.h:298:63: note: expanded from macro '__same_type'
   #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
                                                                 ^
   include/linux/build_bug.h:16:62: note: expanded from macro 'BUILD_BUG_ON_ZERO'
   #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                                ^
   drivers/staging/fbtft/fbtft-core.c:330:6: warning: variable 'count' set but not used [-Wunused-but-set-variable]
           int count = 0;
               ^
   1 warning and 2 errors generated.
--
>> drivers/staging/fbtft/fb_bd663474.c:110:26: error: initializer element is not a compile-time constant
                   write_reg(par, 0x0200, xs);
                                          ^~
   drivers/staging/fbtft/fbtft.h:237:47: note: expanded from macro 'write_reg'
           ((par)->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__))
                                                        ^~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:234:44: note: expanded from macro 'NUMARGS'
   #define NUMARGS(...)  ARRAY_SIZE(((int[]){ __VA_ARGS__ }))
                                              ^~~~~~~~~~~
   include/linux/kernel.h:55:75: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                                                             ^~~
   include/linux/compiler.h:232:59: note: expanded from macro '__must_be_array'
   #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                                                                  ^
   include/linux/compiler_types.h:298:63: note: expanded from macro '__same_type'
   #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
                                                                 ^
   include/linux/build_bug.h:16:62: note: expanded from macro 'BUILD_BUG_ON_ZERO'
   #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                                ^
   drivers/staging/fbtft/fb_bd663474.c:111:26: error: initializer element is not a compile-time constant
                   write_reg(par, 0x0201, ys);
                                          ^~
   drivers/staging/fbtft/fbtft.h:237:47: note: expanded from macro 'write_reg'
           ((par)->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__))
                                                        ^~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:234:44: note: expanded from macro 'NUMARGS'
   #define NUMARGS(...)  ARRAY_SIZE(((int[]){ __VA_ARGS__ }))
                                              ^~~~~~~~~~~
   include/linux/kernel.h:55:75: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                                                             ^~~
   include/linux/compiler.h:232:59: note: expanded from macro '__must_be_array'
   #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                                                                  ^
   include/linux/compiler_types.h:298:63: note: expanded from macro '__same_type'
   #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
                                                                 ^
   include/linux/build_bug.h:16:62: note: expanded from macro 'BUILD_BUG_ON_ZERO'
   #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                                ^
   drivers/staging/fbtft/fb_bd663474.c:114:36: error: initializer element is not a compile-time constant
                   write_reg(par, 0x0200, WIDTH - 1 - xs);
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
   drivers/staging/fbtft/fbtft.h:237:47: note: expanded from macro 'write_reg'
           ((par)->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__))
                                                ~~~~~~~~^~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:234:44: note: expanded from macro 'NUMARGS'
   #define NUMARGS(...)  ARRAY_SIZE(((int[]){ __VA_ARGS__ }))
                         ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
   include/linux/kernel.h:55:75: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                                             ~~~~~~~~~~~~~~~~^~~~
   include/linux/compiler.h:232:59: note: expanded from macro '__must_be_array'
   #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
   include/linux/compiler_types.h:298:63: note: expanded from macro '__same_type'
   #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
                                                                 ^
   include/linux/build_bug.h:16:62: note: expanded from macro 'BUILD_BUG_ON_ZERO'
   #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                                ^
   drivers/staging/fbtft/fb_bd663474.c:115:37: error: initializer element is not a compile-time constant
                   write_reg(par, 0x0201, HEIGHT - 1 - ys);
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
   drivers/staging/fbtft/fbtft.h:237:47: note: expanded from macro 'write_reg'
           ((par)->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__))
                                                ~~~~~~~~^~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:234:44: note: expanded from macro 'NUMARGS'
   #define NUMARGS(...)  ARRAY_SIZE(((int[]){ __VA_ARGS__ }))
                         ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
   include/linux/kernel.h:55:75: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                                             ~~~~~~~~~~~~~~~~^~~~
   include/linux/compiler.h:232:59: note: expanded from macro '__must_be_array'
   #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
   include/linux/compiler_types.h:298:63: note: expanded from macro '__same_type'
   #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
                                                                 ^
   include/linux/build_bug.h:16:62: note: expanded from macro 'BUILD_BUG_ON_ZERO'
   #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                                ^
   drivers/staging/fbtft/fb_bd663474.c:118:36: error: initializer element is not a compile-time constant
                   write_reg(par, 0x0200, WIDTH - 1 - ys);
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
   drivers/staging/fbtft/fbtft.h:237:47: note: expanded from macro 'write_reg'
           ((par)->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__))
                                                ~~~~~~~~^~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:234:44: note: expanded from macro 'NUMARGS'
   #define NUMARGS(...)  ARRAY_SIZE(((int[]){ __VA_ARGS__ }))
                         ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
   include/linux/kernel.h:55:75: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                                             ~~~~~~~~~~~~~~~~^~~~
   include/linux/compiler.h:232:59: note: expanded from macro '__must_be_array'
   #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
   include/linux/compiler_types.h:298:63: note: expanded from macro '__same_type'
   #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
--
>> drivers/staging/fbtft/fb_hx8353d.c:67:26: error: initializer element is not a compile-time constant
           write_reg(par, 0x2a, xs >> 8, xs & 0xff, xe >> 8, xe & 0xff);
                                ~~~^~~~
   drivers/staging/fbtft/fbtft.h:237:47: note: expanded from macro 'write_reg'
           ((par)->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__))
                                                        ^~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:234:44: note: expanded from macro 'NUMARGS'
   #define NUMARGS(...)  ARRAY_SIZE(((int[]){ __VA_ARGS__ }))
                                              ^~~~~~~~~~~
   include/linux/kernel.h:55:75: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                                                             ^~~
   include/linux/compiler.h:232:59: note: expanded from macro '__must_be_array'
   #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                                                                  ^
   include/linux/compiler_types.h:298:63: note: expanded from macro '__same_type'
   #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
                                                                 ^
   include/linux/build_bug.h:16:62: note: expanded from macro 'BUILD_BUG_ON_ZERO'
   #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                                ^
   drivers/staging/fbtft/fb_hx8353d.c:70:26: error: initializer element is not a compile-time constant
           write_reg(par, 0x2b, ys >> 8, ys & 0xff, ye >> 8, ye & 0xff);
                                ~~~^~~~
   drivers/staging/fbtft/fbtft.h:237:47: note: expanded from macro 'write_reg'
           ((par)->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__))
                                                        ^~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:234:44: note: expanded from macro 'NUMARGS'
   #define NUMARGS(...)  ARRAY_SIZE(((int[]){ __VA_ARGS__ }))
                                              ^~~~~~~~~~~
   include/linux/kernel.h:55:75: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                                                             ^~~
   include/linux/compiler.h:232:59: note: expanded from macro '__must_be_array'
   #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                                                                  ^
   include/linux/compiler_types.h:298:63: note: expanded from macro '__same_type'
   #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
                                                                 ^
   include/linux/build_bug.h:16:62: note: expanded from macro 'BUILD_BUG_ON_ZERO'
   #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                                ^
   drivers/staging/fbtft/fb_hx8353d.c:92:6: error: initializer element is not a compile-time constant
                             mx | my | (par->bgr << 3));
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_hx8353d.c:77:12: note: expanded from macro 'mx'
   #define mx BIT(6)
              ^
   include/vdso/bits.h:7:19: note: expanded from macro 'BIT'
   #define BIT(nr)                 (UL(1) << (nr))
                                   ^
   drivers/staging/fbtft/fbtft.h:237:47: note: expanded from macro 'write_reg'
           ((par)->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__))
                                                ~~~~~~~~^~~~~~~~~~~~
   note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler.h:232:59: note: expanded from macro '__must_be_array'
   #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
   include/linux/compiler_types.h:298:63: note: expanded from macro '__same_type'
   #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
                                                                 ^
   include/linux/build_bug.h:16:62: note: expanded from macro 'BUILD_BUG_ON_ZERO'
   #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                                ^
   drivers/staging/fbtft/fb_hx8353d.c:96:6: error: initializer element is not a compile-time constant
                             my | mv | (par->bgr << 3));
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_hx8353d.c:76:12: note: expanded from macro 'my'
   #define my BIT(7)
              ^
   include/vdso/bits.h:7:19: note: expanded from macro 'BIT'
   #define BIT(nr)                 (UL(1) << (nr))
                                   ^
   drivers/staging/fbtft/fbtft.h:237:47: note: expanded from macro 'write_reg'
           ((par)->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__))
                                                ~~~~~~~~^~~~~~~~~~~~
   note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler.h:232:59: note: expanded from macro '__must_be_array'
   #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
   include/linux/compiler_types.h:298:63: note: expanded from macro '__same_type'
   #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
                                                                 ^
   include/linux/build_bug.h:16:62: note: expanded from macro 'BUILD_BUG_ON_ZERO'
   #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                                ^
   drivers/staging/fbtft/fb_hx8353d.c:100:15: error: initializer element is not a compile-time constant
                             par->bgr << 3);
                             ~~~~~~~~~^~~~
   drivers/staging/fbtft/fbtft.h:237:47: note: expanded from macro 'write_reg'
           ((par)->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__))
                                                        ^~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:234:44: note: expanded from macro 'NUMARGS'
   #define NUMARGS(...)  ARRAY_SIZE(((int[]){ __VA_ARGS__ }))
                                              ^~~~~~~~~~~
   include/linux/kernel.h:55:75: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                                                             ^~~
   include/linux/compiler.h:232:59: note: expanded from macro '__must_be_array'
   #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                                                                  ^
--
>> drivers/staging/fbtft/fb_hx8357d.c:135:8: error: initializer element is not a compile-time constant
                     xs >> 8, xs & 0xff,  /* XSTART */
                     ~~~^~~~
   drivers/staging/fbtft/fbtft.h:237:47: note: expanded from macro 'write_reg'
           ((par)->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__))
                                                        ^~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:234:44: note: expanded from macro 'NUMARGS'
   #define NUMARGS(...)  ARRAY_SIZE(((int[]){ __VA_ARGS__ }))
                                              ^~~~~~~~~~~
   include/linux/kernel.h:55:75: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                                                             ^~~
   include/linux/compiler.h:232:59: note: expanded from macro '__must_be_array'
   #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                                                                  ^
   include/linux/compiler_types.h:298:63: note: expanded from macro '__same_type'
   #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
                                                                 ^
   include/linux/build_bug.h:16:62: note: expanded from macro 'BUILD_BUG_ON_ZERO'
   #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                                ^
   drivers/staging/fbtft/fb_hx8357d.c:139:8: error: initializer element is not a compile-time constant
                     ys >> 8, ys & 0xff,  /* YSTART */
                     ~~~^~~~
   drivers/staging/fbtft/fbtft.h:237:47: note: expanded from macro 'write_reg'
           ((par)->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__))
                                                        ^~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:234:44: note: expanded from macro 'NUMARGS'
   #define NUMARGS(...)  ARRAY_SIZE(((int[]){ __VA_ARGS__ }))
                                              ^~~~~~~~~~~
   include/linux/kernel.h:55:75: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                                                             ^~~
   include/linux/compiler.h:232:59: note: expanded from macro '__must_be_array'
   #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                                                                  ^
   include/linux/compiler_types.h:298:63: note: expanded from macro '__same_type'
   #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
                                                                 ^
   include/linux/build_bug.h:16:62: note: expanded from macro 'BUILD_BUG_ON_ZERO'
   #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                                ^
   drivers/staging/fbtft/fb_hx8357d.c:174:44: error: initializer element is not a compile-time constant
           write_reg(par, MIPI_DCS_SET_ADDRESS_MODE, val);
                                                     ^~~
   drivers/staging/fbtft/fbtft.h:237:47: note: expanded from macro 'write_reg'
           ((par)->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__))
                                                        ^~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:234:44: note: expanded from macro 'NUMARGS'
   #define NUMARGS(...)  ARRAY_SIZE(((int[]){ __VA_ARGS__ }))
                                              ^~~~~~~~~~~
   include/linux/kernel.h:55:75: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                                                             ^~~
   include/linux/compiler.h:232:59: note: expanded from macro '__must_be_array'
   #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                                                                  ^
   include/linux/compiler_types.h:298:63: note: expanded from macro '__same_type'
   #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
                                                                 ^
   include/linux/build_bug.h:16:62: note: expanded from macro 'BUILD_BUG_ON_ZERO'
   #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
                                                                ^
   3 errors generated.
..


vim +206 drivers/staging/fbtft/fbtft-core.c

c296d5f9957c03 Thomas Petazzoni  2014-12-31  201  
ed2084360d040a Krzysztof Adamski 2015-01-22  202  static void fbtft_set_addr_win(struct fbtft_par *par, int xs, int ys, int xe,
ed2084360d040a Krzysztof Adamski 2015-01-22  203  			       int ye)
c296d5f9957c03 Thomas Petazzoni  2014-12-31  204  {
a79cb3901ee3e0 Priit Laes        2015-12-20  205  	write_reg(par, MIPI_DCS_SET_COLUMN_ADDRESS,
c296d5f9957c03 Thomas Petazzoni  2014-12-31 @206  		  (xs >> 8) & 0xFF, xs & 0xFF, (xe >> 8) & 0xFF, xe & 0xFF);
c296d5f9957c03 Thomas Petazzoni  2014-12-31  207  
a79cb3901ee3e0 Priit Laes        2015-12-20  208  	write_reg(par, MIPI_DCS_SET_PAGE_ADDRESS,
c296d5f9957c03 Thomas Petazzoni  2014-12-31  209  		  (ys >> 8) & 0xFF, ys & 0xFF, (ye >> 8) & 0xFF, ye & 0xFF);
c296d5f9957c03 Thomas Petazzoni  2014-12-31  210  
a79cb3901ee3e0 Priit Laes        2015-12-20  211  	write_reg(par, MIPI_DCS_WRITE_MEMORY_START);
c296d5f9957c03 Thomas Petazzoni  2014-12-31  212  }
c296d5f9957c03 Thomas Petazzoni  2014-12-31  213  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (175670 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ