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]
Message-ID: <202201040748.nmgUInv1-lkp@intel.com>
Date:   Tue, 4 Jan 2022 07:53:26 +0800
From:   kernel test robot <lkp@...el.com>
To:     Neil Armstrong <narmstrong@...libre.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [narmstrong-oxnas:oxnas/v5.10/sata 3/3]
 drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of
 different size

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/narmstrong/linux-oxnas.git oxnas/v5.10/sata
head:   acba9b2498a048f1a89fdac6f661ec263e369e76
commit: acba9b2498a048f1a89fdac6f661ec263e369e76 [3/3] fixup! ata: Add Oxford Semiconductor OX810SE SATA Controller Support
config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20220104/202201040748.nmgUInv1-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 11.2.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/narmstrong/linux-oxnas.git/commit/?id=acba9b2498a048f1a89fdac6f661ec263e369e76
        git remote add narmstrong-oxnas https://git.kernel.org/pub/scm/linux/kernel/git/narmstrong/linux-oxnas.git
        git fetch --no-tags narmstrong-oxnas oxnas/v5.10/sata
        git checkout acba9b2498a048f1a89fdac6f661ec263e369e76
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=riscv SHELL=/bin/bash drivers/ata/

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

All warnings (new ones prefixed by >>):

   drivers/ata/sata_ox810se.c:408:27: warning: initialized field overwritten [-Woverride-init]
     408 |     .can_queue          = SATA_OXNAS_QUEUE_DEPTH,
         |                           ^~~~~~~~~~~~~~~~~~~~~~
   drivers/ata/sata_ox810se.c:408:27: note: (near initialization for 'ox810sata_sht.can_queue')
   drivers/ata/sata_ox810se.c: In function 'ox810sata_port_no':
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:518:9: note: in expansion of macro 'NULLPTR'
     518 |     if (NULLPTR(ap))
         |         ^~~~~~~
   drivers/ata/sata_ox810se.c: In function 'ox810sata_other_port_no':
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:525:9: note: in expansion of macro 'NULLPTR'
     525 |     if (NULLPTR(ap))
         |         ^~~~~~~
   drivers/ata/sata_ox810se.c: In function 'ox810sata_other_ap':
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:536:10: note: in expansion of macro 'NULLPTR'
     536 |     if (!NULLPTR(ap)) {
         |          ^~~~~~~
   drivers/ata/sata_ox810se.c: In function 'ox810sata_dma_abort':
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:631:10: note: in expansion of macro 'NULLPTR'
     631 |     if (!NULLPTR(ox810sata_hd.chan)) {
         |          ^~~~~~~
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:633:14: note: in expansion of macro 'NULLPTR'
     633 |         if (!NULLPTR(ox810sata_hd.desc)) {
         |              ^~~~~~~
   drivers/ata/sata_ox810se.c: In function 'ox810sata_qc_from_tag':
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:651:10: note: in expansion of macro 'NULLPTR'
     651 |     if (!NULLPTR(ap)) {
         |          ^~~~~~~
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:654:18: note: in expansion of macro 'NULLPTR'
     654 |             if (!NULLPTR(qc) && qc->tag != ap->link.active_tag)
         |                  ^~~~~~~
   drivers/ata/sata_ox810se.c: In function 'ox810sata_active_qc':
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:664:33: note: in expansion of macro 'NULLPTR'
     664 |     ox810sata_port_priv_t *pd = NULLPTR(ap) ? NULL : ap->private_data;
         |                                 ^~~~~~~
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:665:34: note: in expansion of macro 'NULLPTR'
     665 |     struct ata_queued_cmd *qc0 = NULLPTR(ap)
         |                                  ^~~~~~~
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:667:33: note: in expansion of macro 'NULLPTR'
     667 |     struct ata_queued_cmd *qc = NULLPTR(pd)
         |                                 ^~~~~~~
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:670:10: note: in expansion of macro 'NULLPTR'
     670 |     if (!NULLPTR(qc)) {
         |          ^~~~~~~
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:680:10: note: in expansion of macro 'NULLPTR'
     680 |     if (!NULLPTR(qc) && !NULLPTR(qc0) && qc != qc0) {
         |          ^~~~~~~
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:680:26: note: in expansion of macro 'NULLPTR'
     680 |     if (!NULLPTR(qc) && !NULLPTR(qc0) && qc != qc0) {
         |                          ^~~~~~~
   drivers/ata/sata_ox810se.c: In function 'ox810sata_cs_error_clear':
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:695:10: note: in expansion of macro 'NULLPTR'
     695 |     if (!NULLPTR(ap))
         |          ^~~~~~~
   drivers/ata/sata_ox810se.c: In function 'ox810sata_sctl_error_clear':
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:703:10: note: in expansion of macro 'NULLPTR'
     703 |     if (!NULLPTR(ap))
         |          ^~~~~~~
   drivers/ata/sata_ox810se.c: In function 'ox810sata_reg_access_error_clear':
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:713:10: note: in expansion of macro 'NULLPTR'
     713 |     if (!NULLPTR(ap))
         |          ^~~~~~~
   drivers/ata/sata_ox810se.c: In function 'ox810sata_qc_data_protocol':
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:777:12: note: in expansion of macro 'NULLPTR'
     777 |     return NULLPTR(qc)
         |            ^~~~~~~
   drivers/ata/sata_ox810se.c: In function 'ox810sata_qc_complete':
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:784:33: note: in expansion of macro 'NULLPTR'
     784 |     ox810sata_port_priv_t *pd = NULLPTR(ap) ? NULL : ap->private_data;
         |                                 ^~~~~~~
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:788:10: note: in expansion of macro 'NULLPTR'
     788 |     qc = NULLPTR(ap) ? NULL : ox810sata_active_qc(ap);
         |          ^~~~~~~
>> drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:789:10: note: in expansion of macro 'NULLPTR'
     789 |     if (!NULLPTR(qc)) {
         |          ^~~~~~~
   drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:790:14: note: in expansion of macro 'NULLPTR'
     790 |         if (!NULLPTR(pd))
         |              ^~~~~~~
   drivers/ata/sata_ox810se.c: In function 'ox810sata_dma_alloc':
   drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:810:9: note: in expansion of macro 'NULLPTR'
     810 |     if (NULLPTR(ox810sata_hd.chan) || IS_ERR(ox810sata_hd.chan))
         |         ^~~~~~~
   drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:816:9: note: in expansion of macro 'NULLPTR'
     816 |     if (NULLPTR(ox810sata_hd.chan)) {
         |         ^~~~~~~
   drivers/ata/sata_ox810se.c: In function 'ox810sata_dma_free':
   drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:836:10: note: in expansion of macro 'NULLPTR'
     836 |     if (!NULLPTR(ox810sata_hd.chan)) {
         |          ^~~~~~~
   drivers/ata/sata_ox810se.c: In function 'ox810sata_dma_busy_check':
   drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:849:33: note: in expansion of macro 'NULLPTR'
     849 |     struct ata_queued_cmd *qc = NULLPTR(ap) ? NULL : ox810sata_active_qc(ap);
         |                                 ^~~~~~~
   drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:850:20: note: in expansion of macro 'NULLPTR'
     850 |     bool use_dma = NULLPTR(qc) ? true : ox810sata_qc_data_protocol(qc);
         |                    ^~~~~~~
   drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:852:9: note: in expansion of macro 'NULLPTR'
     852 |     if (NULLPTR(ox810sata_hd.chan) || !use_dma)
         |         ^~~~~~~
   drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:857:9: note: in expansion of macro 'NULLPTR'
     857 |         NULLPTR(ox810sata_hd.desc) ? false
         |         ^~~~~~~
   drivers/ata/sata_ox810se.c: In function 'ox810sata_srst_send':
   drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:934:9: note: in expansion of macro 'NULLPTR'
     934 |     if (NULLPTR(ap))
         |         ^~~~~~~
   drivers/ata/sata_ox810se.c: In function 'ox810sata_link_read':
   drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:982:10: note: in expansion of macro 'NULLPTR'
     982 |     if (!NULLPTR(lock) && !in_irq())
         |          ^~~~~~~
   drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:997:10: note: in expansion of macro 'NULLPTR'
     997 |     if (!NULLPTR(lock) && !in_irq())
         |          ^~~~~~~
   drivers/ata/sata_ox810se.c: In function 'ox810sata_scr_read_port':
   drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:1015:33: note: in expansion of macro 'NULLPTR'
    1015 |     ox810sata_port_priv_t *pd = NULLPTR(ap) ? NULL : ap->private_data;
         |                                 ^~~~~~~
   drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:1016:24: note: in expansion of macro 'NULLPTR'
    1016 |     spinlock_t *lock = NULLPTR(pd) ? NULL : &pd->scrlock;
         |                        ^~~~~~~
   drivers/ata/sata_ox810se.c: In function 'ox810sata_link_write':
   drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:1035:10: note: in expansion of macro 'NULLPTR'
    1035 |     if (!NULLPTR(lock) && !in_irq())
         |          ^~~~~~~
   drivers/ata/sata_ox810se.c:68:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      68 | #define NULLPTR(x)              ((u32)x < PAGE_SIZE)
         |                                  ^
   drivers/ata/sata_ox810se.c:1050:10: note: in expansion of macro 'NULLPTR'


vim +68 drivers/ata/sata_ox810se.c

    66	
    67	#define SCR2LINK(x)             (0x20 + (x * 4))
  > 68	#define NULLPTR(x)              ((u32)x < PAGE_SIZE)
    69	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ