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>] [day] [month] [year] [list]
Date:   Sat, 29 Feb 2020 08:56:06 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Mike Rapoport <rppt@...ux.ibm.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Paul Burton <paulburton@...nel.org>
Subject: arch/mips/include/asm/emma/emma2rh.h:120:3: error: cast to pointer
 from integer of different size

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   29795de0d242a5ba45904b36a5fb67e38a304cb7
commit: 3ed6751bb8fa89c3014399bb0414348499ee202a mips: fix build when "48 bits virtual memory" is enabled
date:   3 months ago
config: mips-randconfig-a001-20200229 (attached as .config)
compiler: mips64-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 3ed6751bb8fa89c3014399bb0414348499ee202a
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=mips 

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

All error/warnings (new ones prefixed by >>):

   drivers/net/ethernet/xilinx/xilinx_emaclite.c: In function 'xemaclite_send_data':
>> drivers/net/ethernet/xilinx/xilinx_emaclite.c:341:35: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      addr = (void __iomem __force *)((u32 __force)addr ^
                                      ^
>> drivers/net/ethernet/xilinx/xilinx_emaclite.c:341:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      addr = (void __iomem __force *)((u32 __force)addr ^
             ^
   drivers/net/ethernet/xilinx/xilinx_emaclite.c: In function 'xemaclite_recv_data':
   drivers/net/ethernet/xilinx/xilinx_emaclite.c:402:36: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
       addr = (void __iomem __force *)((u32 __force)addr ^
                                       ^
   drivers/net/ethernet/xilinx/xilinx_emaclite.c:402:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
       addr = (void __iomem __force *)((u32 __force)addr ^
              ^
   drivers/net/ethernet/xilinx/xilinx_emaclite.c: In function 'xemaclite_rx_handler':
   drivers/net/ethernet/xilinx/xilinx_emaclite.c:100:42: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    #define BUFFER_ALIGN(adr) ((ALIGNMENT - ((u32)adr)) % ALIGNMENT)
                                             ^
>> drivers/net/ethernet/xilinx/xilinx_emaclite.c:616:10: note: in expansion of macro 'BUFFER_ALIGN'
     align = BUFFER_ALIGN(skb->data);
             ^~~~~~~~~~~~
   In file included from include/linux/dma-mapping.h:7:0,
                    from include/linux/skbuff.h:31,
                    from include/linux/if_ether.h:19,
                    from include/uapi/linux/ethtool.h:19,
                    from include/linux/ethtool.h:18,
                    from include/linux/netdevice.h:37,
                    from drivers/net/ethernet/xilinx/xilinx_emaclite.c:13:
   drivers/net/ethernet/xilinx/xilinx_emaclite.c: In function 'xemaclite_of_probe':
   drivers/net/ethernet/xilinx/xilinx_emaclite.c:1196:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
       (unsigned int __force)lp->base_addr, ndev->irq);
       ^
   include/linux/device.h:1747:33: note: in definition of macro 'dev_info'
     _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
                                    ^~~~~~~~~~~
   {standard input}: Assembler messages:
   {standard input}:169: Error: found '(', expected: ')'
   {standard input}:169: Error: found '(', expected: ')'
   {standard input}:169: Error: non-constant expression in ".if" statement
   {standard input}:169: Error: junk at end of line, first unrecognized character is `('
   {standard input}:258: Error: found '(', expected: ')'
   {standard input}:258: Error: found '(', expected: ')'
   {standard input}:258: Error: non-constant expression in ".if" statement
   {standard input}:258: Error: junk at end of line, first unrecognized character is `('
   {standard input}:4151: Error: found '(', expected: ')'
   {standard input}:4151: Error: found '(', expected: ')'
   {standard input}:4151: Error: non-constant expression in ".if" statement
   {standard input}:4151: Error: junk at end of line, first unrecognized character is `('
   {standard input}:4612: Error: found '(', expected: ')'
   {standard input}:4612: Error: found '(', expected: ')'
   {standard input}:4612: Error: non-constant expression in ".if" statement
   {standard input}:4612: Error: junk at end of line, first unrecognized character is `('
   {standard input}:5000: Error: found '(', expected: ')'
   {standard input}:5000: Error: found '(', expected: ')'
   {standard input}:5000: Error: non-constant expression in ".if" statement
   {standard input}:5000: Error: junk at end of line, first unrecognized character is `('
   {standard input}:5361: Error: found '(', expected: ')'
   {standard input}:5361: Error: found '(', expected: ')'
   {standard input}:5361: Error: non-constant expression in ".if" statement
   {standard input}:5361: Error: junk at end of line, first unrecognized character is `('
--
   In file included from arch/mips//emma/common/prom.c:16:0:
   arch/mips/include/asm/emma/emma2rh.h: In function 'emma2rh_out32':
>> arch/mips/include/asm/emma/emma2rh.h:120:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     *(volatile u32 *)(EMMA2RH_BASE | offset) = val;
      ^
   arch/mips/include/asm/emma/emma2rh.h: In function 'emma2rh_in32':
   arch/mips/include/asm/emma/emma2rh.h:126:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     u32 val = *(volatile u32 *)(EMMA2RH_BASE | offset);
                ^
   arch/mips/include/asm/emma/emma2rh.h: In function 'emma2rh_out16':
   arch/mips/include/asm/emma/emma2rh.h:132:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     *(volatile u16 *)(EMMA2RH_BASE | offset) = val;
      ^
   arch/mips/include/asm/emma/emma2rh.h: In function 'emma2rh_in16':
   arch/mips/include/asm/emma/emma2rh.h:138:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     u16 val = *(volatile u16 *)(EMMA2RH_BASE | offset);
                ^
   arch/mips/include/asm/emma/emma2rh.h: In function 'emma2rh_out8':
   arch/mips/include/asm/emma/emma2rh.h:144:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     *(volatile u8 *)(EMMA2RH_BASE | offset) = val;
      ^
   arch/mips/include/asm/emma/emma2rh.h: In function 'emma2rh_in8':
   arch/mips/include/asm/emma/emma2rh.h:150:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     u8 val = *(volatile u8 *)(EMMA2RH_BASE | offset);
               ^
   cc1: all warnings being treated as errors
--
   In file included from arch/mips//emma/markeins/setup.c:16:0:
   arch/mips/include/asm/emma/emma2rh.h: In function 'emma2rh_out32':
>> arch/mips/include/asm/emma/emma2rh.h:120:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     *(volatile u32 *)(EMMA2RH_BASE | offset) = val;
      ^
   arch/mips/include/asm/emma/emma2rh.h: In function 'emma2rh_in32':
   arch/mips/include/asm/emma/emma2rh.h:126:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     u32 val = *(volatile u32 *)(EMMA2RH_BASE | offset);
                ^
   arch/mips/include/asm/emma/emma2rh.h: In function 'emma2rh_out16':
   arch/mips/include/asm/emma/emma2rh.h:132:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     *(volatile u16 *)(EMMA2RH_BASE | offset) = val;
      ^
   arch/mips/include/asm/emma/emma2rh.h: In function 'emma2rh_in16':
   arch/mips/include/asm/emma/emma2rh.h:138:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     u16 val = *(volatile u16 *)(EMMA2RH_BASE | offset);
                ^
   arch/mips/include/asm/emma/emma2rh.h: In function 'emma2rh_out8':
   arch/mips/include/asm/emma/emma2rh.h:144:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     *(volatile u8 *)(EMMA2RH_BASE | offset) = val;
      ^
   arch/mips/include/asm/emma/emma2rh.h: In function 'emma2rh_in8':
   arch/mips/include/asm/emma/emma2rh.h:150:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     u8 val = *(volatile u8 *)(EMMA2RH_BASE | offset);
               ^
   arch/mips//emma/markeins/setup.c: In function 'plat_mem_setup':
>> arch/mips//emma/markeins/setup.c:89:19: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'? [-Werror=implicit-function-declaration]
     set_io_port_base(KSEG1ADDR(EMMA2RH_PCI_IO_BASE));
                      ^~~~~~~~~
                      CKSEG1ADDR
   cc1: all warnings being treated as errors
--
   In file included from arch/mips//emma/markeins/platform.c:23:0:
   arch/mips/include/asm/emma/emma2rh.h: In function 'emma2rh_out32':
>> arch/mips/include/asm/emma/emma2rh.h:120:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     *(volatile u32 *)(EMMA2RH_BASE | offset) = val;
      ^
   arch/mips/include/asm/emma/emma2rh.h: In function 'emma2rh_in32':
   arch/mips/include/asm/emma/emma2rh.h:126:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     u32 val = *(volatile u32 *)(EMMA2RH_BASE | offset);
                ^
   arch/mips/include/asm/emma/emma2rh.h: In function 'emma2rh_out16':
   arch/mips/include/asm/emma/emma2rh.h:132:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     *(volatile u16 *)(EMMA2RH_BASE | offset) = val;
      ^
   arch/mips/include/asm/emma/emma2rh.h: In function 'emma2rh_in16':
   arch/mips/include/asm/emma/emma2rh.h:138:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     u16 val = *(volatile u16 *)(EMMA2RH_BASE | offset);
                ^
   arch/mips/include/asm/emma/emma2rh.h: In function 'emma2rh_out8':
   arch/mips/include/asm/emma/emma2rh.h:144:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     *(volatile u8 *)(EMMA2RH_BASE | offset) = val;
      ^
   arch/mips/include/asm/emma/emma2rh.h: In function 'emma2rh_in8':
   arch/mips/include/asm/emma/emma2rh.h:150:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     u8 val = *(volatile u8 *)(EMMA2RH_BASE | offset);
               ^
   arch/mips//emma/markeins/platform.c: At top level:
>> arch/mips//emma/markeins/platform.c:96:28: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'? [-Werror=implicit-function-declaration]
      .membase= (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR0_BASE + 3),
                               ^~~~~~~~~
                               CKSEG1ADDR
>> arch/mips//emma/markeins/platform.c:96:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
      .membase= (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR0_BASE + 3),
                ^
>> arch/mips//emma/markeins/platform.c:96:13: error: initializer element is not constant
   arch/mips//emma/markeins/platform.c:96:13: note: (near initialization for 'platform_serial_ports[0].membase')
   arch/mips//emma/markeins/platform.c:104:14: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
      .membase = (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR1_BASE + 3),
                 ^
   arch/mips//emma/markeins/platform.c:104:14: error: initializer element is not constant
   arch/mips//emma/markeins/platform.c:104:14: note: (near initialization for 'platform_serial_ports[1].membase')
   arch/mips//emma/markeins/platform.c:112:14: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
      .membase = (void __iomem*)KSEG1ADDR(EMMA2RH_PFUR2_BASE + 3),
                 ^
   arch/mips//emma/markeins/platform.c:112:14: error: initializer element is not constant
   arch/mips//emma/markeins/platform.c:112:14: note: (near initialization for 'platform_serial_ports[2].membase')
   cc1: all warnings being treated as errors

vim +120 arch/mips/include/asm/emma/emma2rh.h

355c471f2ff324 include/asm-mips/emma2rh/emma2rh.h dmitry pervushin 2006-05-21  117  
355c471f2ff324 include/asm-mips/emma2rh/emma2rh.h dmitry pervushin 2006-05-21  118  static inline void emma2rh_out32(u32 offset, u32 val)
355c471f2ff324 include/asm-mips/emma2rh/emma2rh.h dmitry pervushin 2006-05-21  119  {
355c471f2ff324 include/asm-mips/emma2rh/emma2rh.h dmitry pervushin 2006-05-21 @120  	*(volatile u32 *)(EMMA2RH_BASE | offset) = val;
355c471f2ff324 include/asm-mips/emma2rh/emma2rh.h dmitry pervushin 2006-05-21  121  	emma2rh_sync();
355c471f2ff324 include/asm-mips/emma2rh/emma2rh.h dmitry pervushin 2006-05-21  122  }
355c471f2ff324 include/asm-mips/emma2rh/emma2rh.h dmitry pervushin 2006-05-21  123  

:::::: The code at line 120 was first introduced by commit
:::::: 355c471f2ff324c21f8a1fb8e2e242a0f2a4aa68 [MIPS] Support for the R5500-based NEC EMMA2RH Mark-eins board

:::::: TO: dmitry pervushin <dpervushin@...mvista.com>
:::::: CC: Ralf Baechle <ralf@...ux-mips.org>

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

Download attachment ".config.gz" of type "application/gzip" (34804 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ