All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-review:UPDATE-20200520-051842/Emil-Velikov/linux-bits-h-adjust-GENMASK_INPUT_CHECK-check/20200519-205539 1/1] drivers/video/fbdev/sis/init.c:3366:4: error: anonymous bit-field has negative width (-1)
@ 2020-05-20  4:16 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-05-20  4:16 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 14510 bytes --]

tree:   https://github.com/0day-ci/linux/commits/UPDATE-20200520-051842/Emil-Velikov/linux-bits-h-adjust-GENMASK_INPUT_CHECK-check/20200519-205539
head:   0ae605b3f9c51e182b11da825f5fa8948bc88af9
commit: 0ae605b3f9c51e182b11da825f5fa8948bc88af9 [1/1] linux/bits.h: adjust GENMASK_INPUT_CHECK() check
config: powerpc-randconfig-r015-20200519 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project e6658079aca6d971b4e9d7137a3a2ecbc9c34aec)
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        git checkout 0ae605b3f9c51e182b11da825f5fa8948bc88af9
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>, old ones prefixed by <<):

In file included from drivers/video/fbdev/sis/init.c:59:
In file included from drivers/video/fbdev/sis/init.h:64:
In file included from arch/powerpc/include/asm/io.h:27:
In file included from include/linux/device.h:15:
In file included from include/linux/dev_printk.h:16:
In file included from include/linux/ratelimit.h:6:
In file included from include/linux/sched.h:12:
In file included from arch/powerpc/include/asm/current.h:13:
In file included from arch/powerpc/include/asm/paca.h:17:
In file included from arch/powerpc/include/asm/lppaca.h:45:
In file included from include/linux/spinlock_types.h:18:
In file included from include/linux/lockdep.h:43:
In file included from include/linux/list.h:9:
In file included from include/linux/kernel.h:12:
In file included from include/linux/bitops.h:29:
In file included from arch/powerpc/include/asm/bitops.h:250:
In file included from include/asm-generic/bitops/le.h:6:
In file included from arch/powerpc/include/uapi/asm/byteorder.h:14:
include/linux/byteorder/big_endian.h:8:2: warning: inconsistent configuration, needs CONFIG_CPU_BIG_ENDIAN [-W#warnings]
#warning inconsistent configuration, needs CONFIG_CPU_BIG_ENDIAN
^
>> drivers/video/fbdev/sis/init.c:3366:4: error: anonymous bit-field has negative width (-1)
GETBITSTR((SiS_Pr->CVTotal     -2), 10:10, 0:0) |
^
drivers/video/fbdev/sis/init.c:3326:35: note: expanded from macro 'GETBITSTR'
#define GETBITSTR(val,from,to)  ((GETBITS(val,from)) << (0?to))
^
drivers/video/fbdev/sis/init.c:3325:40: note: expanded from macro 'GETBITS'
#define GETBITS(var,mask)       (((var) & GENBITSMASK(mask)) >> (0?mask))
^
drivers/video/fbdev/sis/init.c:3324:30: note: expanded from macro 'GENBITSMASK'
#define GENBITSMASK(mask)       GENMASK(1?mask,0?mask)
^
include/linux/bits.h:39:3: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^
include/linux/bits.h:25:3: note: expanded from macro 'GENMASK_INPUT_CHECK'
(BUILD_BUG_ON_ZERO(__builtin_choose_expr(             ^
include/linux/build_bug.h:16:53: note: expanded from macro 'BUILD_BUG_ON_ZERO'
#define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
^
drivers/video/fbdev/sis/init.c:3367:4: error: anonymous bit-field has negative width (-1)
GETBITSTR((SiS_Pr->CVDisplay   -1), 10:10, 1:1) |
^
drivers/video/fbdev/sis/init.c:3326:35: note: expanded from macro 'GETBITSTR'
#define GETBITSTR(val,from,to)  ((GETBITS(val,from)) << (0?to))
^
drivers/video/fbdev/sis/init.c:3325:40: note: expanded from macro 'GETBITS'
#define GETBITS(var,mask)       (((var) & GENBITSMASK(mask)) >> (0?mask))
^
drivers/video/fbdev/sis/init.c:3324:30: note: expanded from macro 'GENBITSMASK'
#define GENBITSMASK(mask)       GENMASK(1?mask,0?mask)
^
include/linux/bits.h:39:3: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^
include/linux/bits.h:25:3: note: expanded from macro 'GENMASK_INPUT_CHECK'
(BUILD_BUG_ON_ZERO(__builtin_choose_expr(             ^
include/linux/build_bug.h:16:53: note: expanded from macro 'BUILD_BUG_ON_ZERO'
#define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
^
drivers/video/fbdev/sis/init.c:3368:4: error: anonymous bit-field has negative width (-1)
GETBITSTR((SiS_Pr->CVBlankStart-1), 10:10, 2:2) |
^
drivers/video/fbdev/sis/init.c:3326:35: note: expanded from macro 'GETBITSTR'
#define GETBITSTR(val,from,to)  ((GETBITS(val,from)) << (0?to))
^
drivers/video/fbdev/sis/init.c:3325:40: note: expanded from macro 'GETBITS'
#define GETBITS(var,mask)       (((var) & GENBITSMASK(mask)) >> (0?mask))
^
drivers/video/fbdev/sis/init.c:3324:30: note: expanded from macro 'GENBITSMASK'
#define GENBITSMASK(mask)       GENMASK(1?mask,0?mask)
^
include/linux/bits.h:39:3: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^
include/linux/bits.h:25:3: note: expanded from macro 'GENMASK_INPUT_CHECK'
(BUILD_BUG_ON_ZERO(__builtin_choose_expr(             ^
include/linux/build_bug.h:16:53: note: expanded from macro 'BUILD_BUG_ON_ZERO'
#define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
^
drivers/video/fbdev/sis/init.c:3369:4: error: anonymous bit-field has negative width (-1)
GETBITSTR((SiS_Pr->CVSyncStart -x), 10:10, 3:3) |
^
drivers/video/fbdev/sis/init.c:3326:35: note: expanded from macro 'GETBITSTR'
#define GETBITSTR(val,from,to)  ((GETBITS(val,from)) << (0?to))
^
drivers/video/fbdev/sis/init.c:3325:40: note: expanded from macro 'GETBITS'
#define GETBITS(var,mask)       (((var) & GENBITSMASK(mask)) >> (0?mask))
^
drivers/video/fbdev/sis/init.c:3324:30: note: expanded from macro 'GENBITSMASK'
#define GENBITSMASK(mask)       GENMASK(1?mask,0?mask)
^
include/linux/bits.h:39:3: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^
include/linux/bits.h:25:3: note: expanded from macro 'GENMASK_INPUT_CHECK'
(BUILD_BUG_ON_ZERO(__builtin_choose_expr(             ^
include/linux/build_bug.h:16:53: note: expanded from macro 'BUILD_BUG_ON_ZERO'
#define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
^
drivers/video/fbdev/sis/init.c:3370:4: error: anonymous bit-field has negative width (-1)
GETBITSTR((SiS_Pr->CVBlankEnd  -1),   8:8, 4:4) |
^
drivers/video/fbdev/sis/init.c:3326:35: note: expanded from macro 'GETBITSTR'
#define GETBITSTR(val,from,to)  ((GETBITS(val,from)) << (0?to))
^
drivers/video/fbdev/sis/init.c:3325:40: note: expanded from macro 'GETBITS'
#define GETBITS(var,mask)       (((var) & GENBITSMASK(mask)) >> (0?mask))
^
drivers/video/fbdev/sis/init.c:3324:30: note: expanded from macro 'GENBITSMASK'
#define GENBITSMASK(mask)       GENMASK(1?mask,0?mask)
^
include/linux/bits.h:39:3: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^
include/linux/bits.h:25:3: note: expanded from macro 'GENMASK_INPUT_CHECK'

vim +3366 drivers/video/fbdev/sis/init.c

^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3328  
544393fe584d33 drivers/video/sis/init.c Thomas Winischhofer 2005-09-09  3329  void
544393fe584d33 drivers/video/sis/init.c Thomas Winischhofer 2005-09-09  3330  SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth)
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3331  {
544393fe584d33 drivers/video/sis/init.c Thomas Winischhofer 2005-09-09  3332     int x = 1; /* Fix sync */
544393fe584d33 drivers/video/sis/init.c Thomas Winischhofer 2005-09-09  3333  
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3334     SiS_Pr->CCRT1CRTC[0]  =  ((SiS_Pr->CHTotal >> 3) - 5) & 0xff;		/* CR0 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3335     SiS_Pr->CCRT1CRTC[1]  =  (SiS_Pr->CHDisplay >> 3) - 1;			/* CR1 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3336     SiS_Pr->CCRT1CRTC[2]  =  (SiS_Pr->CHBlankStart >> 3) - 1;			/* CR2 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3337     SiS_Pr->CCRT1CRTC[3]  =  (((SiS_Pr->CHBlankEnd >> 3) - 1) & 0x1F) | 0x80;	/* CR3 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3338     SiS_Pr->CCRT1CRTC[4]  =  (SiS_Pr->CHSyncStart >> 3) + 3;			/* CR4 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3339     SiS_Pr->CCRT1CRTC[5]  =  ((((SiS_Pr->CHBlankEnd >> 3) - 1) & 0x20) << 2) |	/* CR5 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3340  			    (((SiS_Pr->CHSyncEnd >> 3) + 3) & 0x1F);
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3341  
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3342     SiS_Pr->CCRT1CRTC[6]  =  (SiS_Pr->CVTotal       - 2) & 0xFF;			/* CR6 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3343     SiS_Pr->CCRT1CRTC[7]  =  (((SiS_Pr->CVTotal     - 2) & 0x100) >> 8)		/* CR7 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3344  			  | (((SiS_Pr->CVDisplay   - 1) & 0x100) >> 7)
544393fe584d33 drivers/video/sis/init.c Thomas Winischhofer 2005-09-09  3345  			  | (((SiS_Pr->CVSyncStart - x) & 0x100) >> 6)
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3346  			  | (((SiS_Pr->CVBlankStart- 1) & 0x100) >> 5)
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3347  			  | 0x10
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3348  			  | (((SiS_Pr->CVTotal     - 2) & 0x200) >> 4)
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3349  			  | (((SiS_Pr->CVDisplay   - 1) & 0x200) >> 3)
544393fe584d33 drivers/video/sis/init.c Thomas Winischhofer 2005-09-09  3350  			  | (((SiS_Pr->CVSyncStart - x) & 0x200) >> 2);
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3351  
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3352     SiS_Pr->CCRT1CRTC[16] = ((((SiS_Pr->CVBlankStart - 1) & 0x200) >> 4) >> 5); 	/* CR9 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3353  
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3354     if(depth != 8) {
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3355        if(SiS_Pr->CHDisplay >= 1600)      SiS_Pr->CCRT1CRTC[16] |= 0x60;		/* SRE */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3356        else if(SiS_Pr->CHDisplay >= 640)  SiS_Pr->CCRT1CRTC[16] |= 0x40;
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3357     }
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3358  
544393fe584d33 drivers/video/sis/init.c Thomas Winischhofer 2005-09-09  3359     SiS_Pr->CCRT1CRTC[8] =  (SiS_Pr->CVSyncStart  - x) & 0xFF;			/* CR10 */
544393fe584d33 drivers/video/sis/init.c Thomas Winischhofer 2005-09-09  3360     SiS_Pr->CCRT1CRTC[9] =  ((SiS_Pr->CVSyncEnd   - x) & 0x0F) | 0x80;		/* CR11 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3361     SiS_Pr->CCRT1CRTC[10] = (SiS_Pr->CVDisplay    - 1) & 0xFF;			/* CR12 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3362     SiS_Pr->CCRT1CRTC[11] = (SiS_Pr->CVBlankStart - 1) & 0xFF;			/* CR15 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3363     SiS_Pr->CCRT1CRTC[12] = (SiS_Pr->CVBlankEnd   - 1) & 0xFF;			/* CR16 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3364  
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3365     SiS_Pr->CCRT1CRTC[13] =							/* SRA */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16 @3366  			GETBITSTR((SiS_Pr->CVTotal     -2), 10:10, 0:0) |
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3367  			GETBITSTR((SiS_Pr->CVDisplay   -1), 10:10, 1:1) |
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3368  			GETBITSTR((SiS_Pr->CVBlankStart-1), 10:10, 2:2) |
544393fe584d33 drivers/video/sis/init.c Thomas Winischhofer 2005-09-09  3369  			GETBITSTR((SiS_Pr->CVSyncStart -x), 10:10, 3:3) |
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3370  			GETBITSTR((SiS_Pr->CVBlankEnd  -1),   8:8, 4:4) |
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3371  			GETBITSTR((SiS_Pr->CVSyncEnd     ),   4:4, 5:5) ;
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3372  
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3373     SiS_Pr->CCRT1CRTC[14] =							/* SRB */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3374  			GETBITSTR((SiS_Pr->CHTotal      >> 3) - 5, 9:8, 1:0) |
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3375  			GETBITSTR((SiS_Pr->CHDisplay    >> 3) - 1, 9:8, 3:2) |
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3376  			GETBITSTR((SiS_Pr->CHBlankStart >> 3) - 1, 9:8, 5:4) |
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3377  			GETBITSTR((SiS_Pr->CHSyncStart  >> 3) + 3, 9:8, 7:6) ;
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3378  
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3379  
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3380     SiS_Pr->CCRT1CRTC[15] =							/* SRC */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3381  			GETBITSTR((SiS_Pr->CHBlankEnd >> 3) - 1, 7:6, 1:0) |
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3382  			GETBITSTR((SiS_Pr->CHSyncEnd  >> 3) + 3, 5:5, 2:2) ;
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3383  }
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds      2005-04-16  3384  

:::::: The code at line 3366 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38610 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-20  4:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-20  4:16 [linux-review:UPDATE-20200520-051842/Emil-Velikov/linux-bits-h-adjust-GENMASK_INPUT_CHECK-check/20200519-205539 1/1] drivers/video/fbdev/sis/init.c:3366:4: error: anonymous bit-field has negative width (-1) kbuild test robot

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.