[PATCH v8] QE: remove PPCisms for QE

kbuild test robot lkp at intel.com
Thu Nov 24 20:21:06 AEDT 2016


Hi Zhao,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.9-rc6]
[cannot apply to next-20161123]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Zhao-Qiang/QE-remove-PPCisms-for-QE/20161124-150513
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=ia64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/linkage.h:4:0,
                    from include/linux/kernel.h:6,
                    from drivers/soc/fsl/qe/ucc_fast.c:15:
   drivers/soc/fsl/qe/ucc_fast.c: In function 'ucc_fast_init':
>> include/linux/err.h:21:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
                                                    ^
   include/linux/compiler.h:168:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
>> drivers/soc/fsl/qe/ucc_fast.c:271:6: note: in expansion of macro 'IS_ERR_VALUE'
     if (IS_ERR_VALUE(uccf->ucc_fast_tx_virtual_fifo_base_offset)) {
         ^~~~~~~~~~~~
>> include/linux/err.h:21:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
                                                    ^
   include/linux/compiler.h:168:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
   drivers/soc/fsl/qe/ucc_fast.c:284:6: note: in expansion of macro 'IS_ERR_VALUE'
     if (IS_ERR_VALUE(uccf->ucc_fast_rx_virtual_fifo_base_offset)) {
         ^~~~~~~~~~~~

vim +21 include/linux/err.h

a5ed3cee Joe Perches    2014-04-03   5  #include <linux/types.h>
^1da177e Linus Torvalds 2005-04-16   6  
^1da177e Linus Torvalds 2005-04-16   7  #include <asm/errno.h>
^1da177e Linus Torvalds 2005-04-16   8  
^1da177e Linus Torvalds 2005-04-16   9  /*
^1da177e Linus Torvalds 2005-04-16  10   * Kernel pointers have redundant information, so we can use a
a5ed3cee Joe Perches    2014-04-03  11   * scheme where we can return either an error code or a normal
^1da177e Linus Torvalds 2005-04-16  12   * pointer with the same return value.
^1da177e Linus Torvalds 2005-04-16  13   *
^1da177e Linus Torvalds 2005-04-16  14   * This should be a per-architecture thing, to allow different
^1da177e Linus Torvalds 2005-04-16  15   * error and pointer decisions.
^1da177e Linus Torvalds 2005-04-16  16   */
fa79837d Ralf Baechle   2006-07-01  17  #define MAX_ERRNO	4095
fa79837d Ralf Baechle   2006-07-01  18  
ebba5f9f Randy Dunlap   2006-09-27  19  #ifndef __ASSEMBLY__
ebba5f9f Randy Dunlap   2006-09-27  20  
aa00edc1 Linus Torvalds 2016-05-27 @21  #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
07ab67c8 Linus Torvalds 2005-05-19  22  
e47103b1 Jani Nikula    2010-05-24  23  static inline void * __must_check ERR_PTR(long error)
^1da177e Linus Torvalds 2005-04-16  24  {
^1da177e Linus Torvalds 2005-04-16  25  	return (void *) error;
^1da177e Linus Torvalds 2005-04-16  26  }
^1da177e Linus Torvalds 2005-04-16  27  
e7152b97 Dan Carpenter  2013-07-03  28  static inline long __must_check PTR_ERR(__force const void *ptr)
^1da177e Linus Torvalds 2005-04-16  29  {

:::::: The code at line 21 was first introduced by commit
:::::: aa00edc1287a693eadc7bc67a3d73555d969b35d make IS_ERR_VALUE() complain about non-pointer-sized arguments

:::::: TO: Linus Torvalds <torvalds at linux-foundation.org>
:::::: CC: Linus Torvalds <torvalds at linux-foundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 45081 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20161124/4cf8866d/attachment-0001.gz>


More information about the Linuxppc-dev mailing list