[linux-next:master 699/8232] arch/loongarch/include/asm/page.h:15:25: error: conversion from 'long unsigned int' to 'u16' {aka 'short unsigned int'} changes value from '65536' to '0'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   0fc4bfab2cd45f9acb86c4f04b5191e114e901ed
commit: dc6fcaaba5a5411237d042a26c4d46689f3346bb [699/8232] drm/omap: Allow build with COMPILE_TEST=y
config: loongarch-randconfig-r122-20240626 (https://download.01.org/0day-ci/archive/20240626/202406261639.fXgtH165-lkp@xxxxxxxxx/config)
compiler: loongarch64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240626/202406261639.fXgtH165-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/202406261639.fXgtH165-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   In file included from include/linux/shm.h:6,
                    from include/linux/sched.h:23,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/dma-mapping.h:8,
                    from drivers/gpu/drm/omapdrm/omap_gem.c:7:
   drivers/gpu/drm/omapdrm/omap_gem.c: In function 'omap_gem_pin_tiler':
>> arch/loongarch/include/asm/page.h:15:25: error: conversion from 'long unsigned int' to 'u16' {aka 'short unsigned int'} changes value from '65536' to '0' [-Werror=overflow]
      15 | #define PAGE_SIZE       (_AC(1, UL) << PAGE_SHIFT)
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/omapdrm/omap_gem.c:757:42: note: in expansion of macro 'PAGE_SIZE'
     757 |                                          PAGE_SIZE);
         |                                          ^~~~~~~~~
   drivers/gpu/drm/omapdrm/omap_gem.c: In function 'omap_gem_init':
>> arch/loongarch/include/asm/page.h:15:25: error: conversion from 'long unsigned int' to 'u16' {aka 'short unsigned int'} changes value from '65536' to '0' [-Werror=overflow]
      15 | #define PAGE_SIZE       (_AC(1, UL) << PAGE_SHIFT)
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/omapdrm/omap_gem.c:1503:65: note: in expansion of macro 'PAGE_SIZE'
    1503 |                         block = tiler_reserve_2d(fmts[i], w, h, PAGE_SIZE);
         |                                                                 ^~~~~~~~~
   cc1: all warnings being treated as errors


vim +15 arch/loongarch/include/asm/page.h

09cfefb7fa70c3 Huacai Chen   2022-05-31  10  
09cfefb7fa70c3 Huacai Chen   2022-05-31  11  /*
09cfefb7fa70c3 Huacai Chen   2022-05-31  12   * PAGE_SHIFT determines the page size
09cfefb7fa70c3 Huacai Chen   2022-05-31  13   */
ba89f9c8ccbad3 Arnd Bergmann 2024-02-23  14  #define PAGE_SHIFT	CONFIG_PAGE_SHIFT
09cfefb7fa70c3 Huacai Chen   2022-05-31 @15  #define PAGE_SIZE	(_AC(1, UL) << PAGE_SHIFT)
09cfefb7fa70c3 Huacai Chen   2022-05-31  16  #define PAGE_MASK	(~(PAGE_SIZE - 1))
09cfefb7fa70c3 Huacai Chen   2022-05-31  17  

:::::: The code at line 15 was first introduced by commit
:::::: 09cfefb7fa70c3af011b0db0a513fd80b2f18abc LoongArch: Add memory management

:::::: TO: Huacai Chen <chenhuacai@xxxxxxxxxxx>
:::::: CC: Huacai Chen <chenhuacai@xxxxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[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