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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 29 Apr 2018 03:42:01 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc:     kbuild-all@...org, "David S . Miller" <davem@...emloft.net>,
        Allan Nielsen <Allan.Nielsen@...rosemi.com>,
        razvan.stefanescu@....com, po.liu@....com,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        netdev@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-mips@...ux-mips.org,
        Alexandre Belloni <alexandre.belloni@...tlin.com>
Subject: Re: [PATCH net-next v2 4/7] net: mscc: Add initial Ocelot switch
 support

Hi Alexandre,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Alexandre-Belloni/Microsemi-Ocelot-Ethernet-switch-support/20180429-024136
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=sh 

All warnings (new ones prefixed by >>):

   In file included from include/linux/swab.h:5:0,
                    from include/uapi/linux/byteorder/little_endian.h:13,
                    from include/linux/byteorder/little_endian.h:5,
                    from arch/sh/include/uapi/asm/byteorder.h:6,
                    from arch/sh/include/asm/bitops.h:12,
                    from include/linux/bitops.h:38,
                    from include/linux/kernel.h:11,
                    from include/linux/interrupt.h:6,
                    from drivers/net/ethernet/mscc/ocelot_board.c:7:
   drivers/net/ethernet/mscc/ocelot_board.c: In function 'ocelot_parse_ifh':
   drivers/net/ethernet/mscc/ocelot_board.c:23:27: error: '_be32' undeclared (first use in this function); did you mean '__be32'?
      ifh[i] = ntohl((__force _be32)ifh[i]);
                              ^
   include/uapi/linux/swab.h:117:32: note: in definition of macro '__swab32'
     (__builtin_constant_p((__u32)(x)) ? \
                                   ^
   include/linux/byteorder/generic.h:136:21: note: in expansion of macro '__be32_to_cpu'
    #define ___ntohl(x) __be32_to_cpu(x)
                        ^~~~~~~~~~~~~
   include/linux/byteorder/generic.h:140:18: note: in expansion of macro '___ntohl'
    #define ntohl(x) ___ntohl(x)
                     ^~~~~~~~
   drivers/net/ethernet/mscc/ocelot_board.c:23:12: note: in expansion of macro 'ntohl'
      ifh[i] = ntohl((__force _be32)ifh[i]);
               ^~~~~
   drivers/net/ethernet/mscc/ocelot_board.c:23:27: note: each undeclared identifier is reported only once for each function it appears in
      ifh[i] = ntohl((__force _be32)ifh[i]);
                              ^
   include/uapi/linux/swab.h:117:32: note: in definition of macro '__swab32'
     (__builtin_constant_p((__u32)(x)) ? \
                                   ^
   include/linux/byteorder/generic.h:136:21: note: in expansion of macro '__be32_to_cpu'
    #define ___ntohl(x) __be32_to_cpu(x)
                        ^~~~~~~~~~~~~
   include/linux/byteorder/generic.h:140:18: note: in expansion of macro '___ntohl'
    #define ntohl(x) ___ntohl(x)
                     ^~~~~~~~
   drivers/net/ethernet/mscc/ocelot_board.c:23:12: note: in expansion of macro 'ntohl'
      ifh[i] = ntohl((__force _be32)ifh[i]);
               ^~~~~
   drivers/net/ethernet/mscc/ocelot_board.c:23:33: error: expected ')' before 'ifh'
      ifh[i] = ntohl((__force _be32)ifh[i]);
                                    ^
   include/uapi/linux/swab.h:117:32: note: in definition of macro '__swab32'
     (__builtin_constant_p((__u32)(x)) ? \
                                   ^
   include/linux/byteorder/generic.h:136:21: note: in expansion of macro '__be32_to_cpu'
    #define ___ntohl(x) __be32_to_cpu(x)
                        ^~~~~~~~~~~~~
   include/linux/byteorder/generic.h:140:18: note: in expansion of macro '___ntohl'
    #define ntohl(x) ___ntohl(x)
                     ^~~~~~~~
   drivers/net/ethernet/mscc/ocelot_board.c:23:12: note: in expansion of macro 'ntohl'
      ifh[i] = ntohl((__force _be32)ifh[i]);
               ^~~~~
   drivers/net/ethernet/mscc/ocelot_board.c:23:33: error: expected ')' before 'ifh'
      ifh[i] = ntohl((__force _be32)ifh[i]);
                                    ^
   include/uapi/linux/swab.h:18:12: note: in definition of macro '___constant_swab32'
     (((__u32)(x) & (__u32)0x000000ffUL) << 24) |  \
               ^
>> include/uapi/linux/byteorder/little_endian.h:40:26: note: in expansion of macro '__swab32'
    #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
                             ^~~~~~~~
   include/linux/byteorder/generic.h:136:21: note: in expansion of macro '__be32_to_cpu'
    #define ___ntohl(x) __be32_to_cpu(x)
                        ^~~~~~~~~~~~~
   include/linux/byteorder/generic.h:140:18: note: in expansion of macro '___ntohl'
    #define ntohl(x) ___ntohl(x)
                     ^~~~~~~~
   drivers/net/ethernet/mscc/ocelot_board.c:23:12: note: in expansion of macro 'ntohl'
      ifh[i] = ntohl((__force _be32)ifh[i]);
               ^~~~~
   drivers/net/ethernet/mscc/ocelot_board.c:23:33: error: expected ')' before 'ifh'
      ifh[i] = ntohl((__force _be32)ifh[i]);
                                    ^
   include/uapi/linux/swab.h:19:12: note: in definition of macro '___constant_swab32'
     (((__u32)(x) & (__u32)0x0000ff00UL) <<  8) |  \
               ^
>> include/uapi/linux/byteorder/little_endian.h:40:26: note: in expansion of macro '__swab32'
    #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
                             ^~~~~~~~
   include/linux/byteorder/generic.h:136:21: note: in expansion of macro '__be32_to_cpu'
    #define ___ntohl(x) __be32_to_cpu(x)
                        ^~~~~~~~~~~~~
   include/linux/byteorder/generic.h:140:18: note: in expansion of macro '___ntohl'
    #define ntohl(x) ___ntohl(x)
                     ^~~~~~~~
   drivers/net/ethernet/mscc/ocelot_board.c:23:12: note: in expansion of macro 'ntohl'
      ifh[i] = ntohl((__force _be32)ifh[i]);
               ^~~~~
   drivers/net/ethernet/mscc/ocelot_board.c:23:33: error: expected ')' before 'ifh'
      ifh[i] = ntohl((__force _be32)ifh[i]);
                                    ^
   include/uapi/linux/swab.h:20:12: note: in definition of macro '___constant_swab32'
     (((__u32)(x) & (__u32)0x00ff0000UL) >>  8) |  \
               ^
>> include/uapi/linux/byteorder/little_endian.h:40:26: note: in expansion of macro '__swab32'
    #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
                             ^~~~~~~~
   include/linux/byteorder/generic.h:136:21: note: in expansion of macro '__be32_to_cpu'
    #define ___ntohl(x) __be32_to_cpu(x)
                        ^~~~~~~~~~~~~
   include/linux/byteorder/generic.h:140:18: note: in expansion of macro '___ntohl'
    #define ntohl(x) ___ntohl(x)
                     ^~~~~~~~
   drivers/net/ethernet/mscc/ocelot_board.c:23:12: note: in expansion of macro 'ntohl'
      ifh[i] = ntohl((__force _be32)ifh[i]);
               ^~~~~
   drivers/net/ethernet/mscc/ocelot_board.c:23:33: error: expected ')' before 'ifh'
      ifh[i] = ntohl((__force _be32)ifh[i]);
                                    ^
   include/uapi/linux/swab.h:21:12: note: in definition of macro '___constant_swab32'
     (((__u32)(x) & (__u32)0xff000000UL) >> 24)))
               ^
>> include/uapi/linux/byteorder/little_endian.h:40:26: note: in expansion of macro '__swab32'
    #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
                             ^~~~~~~~
   include/linux/byteorder/generic.h:136:21: note: in expansion of macro '__be32_to_cpu'
    #define ___ntohl(x) __be32_to_cpu(x)
                        ^~~~~~~~~~~~~
   include/linux/byteorder/generic.h:140:18: note: in expansion of macro '___ntohl'
    #define ntohl(x) ___ntohl(x)
                     ^~~~~~~~
   drivers/net/ethernet/mscc/ocelot_board.c:23:12: note: in expansion of macro 'ntohl'
      ifh[i] = ntohl((__force _be32)ifh[i]);
               ^~~~~
   drivers/net/ethernet/mscc/ocelot_board.c:23:33: error: expected ')' before 'ifh'
      ifh[i] = ntohl((__force _be32)ifh[i]);
                                    ^
   include/uapi/linux/swab.h:119:12: note: in definition of macro '__swab32'
     __fswab32(x))
               ^
   include/linux/byteorder/generic.h:136:21: note: in expansion of macro '__be32_to_cpu'
    #define ___ntohl(x) __be32_to_cpu(x)
                        ^~~~~~~~~~~~~
   include/linux/byteorder/generic.h:140:18: note: in expansion of macro '___ntohl'
    #define ntohl(x) ___ntohl(x)
                     ^~~~~~~~
   drivers/net/ethernet/mscc/ocelot_board.c:23:12: note: in expansion of macro 'ntohl'
      ifh[i] = ntohl((__force _be32)ifh[i]);
               ^~~~~
--
   In file included from include/linux/swab.h:5:0,
                    from include/uapi/linux/byteorder/little_endian.h:13,
                    from include/linux/byteorder/little_endian.h:5,
                    from arch/sh/include/uapi/asm/byteorder.h:6,
                    from arch/sh/include/asm/bitops.h:12,
                    from include/linux/bitops.h:38,
                    from include/linux/kernel.h:11,
                    from include/linux/interrupt.h:6,
                    from drivers/net//ethernet/mscc/ocelot_board.c:7:
   drivers/net//ethernet/mscc/ocelot_board.c: In function 'ocelot_parse_ifh':
   drivers/net//ethernet/mscc/ocelot_board.c:23:27: error: '_be32' undeclared (first use in this function); did you mean '__be32'?
      ifh[i] = ntohl((__force _be32)ifh[i]);
                              ^
   include/uapi/linux/swab.h:117:32: note: in definition of macro '__swab32'
     (__builtin_constant_p((__u32)(x)) ? \
                                   ^
   include/linux/byteorder/generic.h:136:21: note: in expansion of macro '__be32_to_cpu'
    #define ___ntohl(x) __be32_to_cpu(x)
                        ^~~~~~~~~~~~~
   include/linux/byteorder/generic.h:140:18: note: in expansion of macro '___ntohl'
    #define ntohl(x) ___ntohl(x)
                     ^~~~~~~~
   drivers/net//ethernet/mscc/ocelot_board.c:23:12: note: in expansion of macro 'ntohl'
      ifh[i] = ntohl((__force _be32)ifh[i]);
               ^~~~~
   drivers/net//ethernet/mscc/ocelot_board.c:23:27: note: each undeclared identifier is reported only once for each function it appears in
      ifh[i] = ntohl((__force _be32)ifh[i]);
                              ^
   include/uapi/linux/swab.h:117:32: note: in definition of macro '__swab32'
     (__builtin_constant_p((__u32)(x)) ? \
                                   ^
   include/linux/byteorder/generic.h:136:21: note: in expansion of macro '__be32_to_cpu'
    #define ___ntohl(x) __be32_to_cpu(x)
                        ^~~~~~~~~~~~~
   include/linux/byteorder/generic.h:140:18: note: in expansion of macro '___ntohl'
    #define ntohl(x) ___ntohl(x)
                     ^~~~~~~~
   drivers/net//ethernet/mscc/ocelot_board.c:23:12: note: in expansion of macro 'ntohl'
      ifh[i] = ntohl((__force _be32)ifh[i]);
               ^~~~~
   drivers/net//ethernet/mscc/ocelot_board.c:23:33: error: expected ')' before 'ifh'
      ifh[i] = ntohl((__force _be32)ifh[i]);
                                    ^
   include/uapi/linux/swab.h:117:32: note: in definition of macro '__swab32'
     (__builtin_constant_p((__u32)(x)) ? \
                                   ^
   include/linux/byteorder/generic.h:136:21: note: in expansion of macro '__be32_to_cpu'
    #define ___ntohl(x) __be32_to_cpu(x)
                        ^~~~~~~~~~~~~
   include/linux/byteorder/generic.h:140:18: note: in expansion of macro '___ntohl'
    #define ntohl(x) ___ntohl(x)
                     ^~~~~~~~
   drivers/net//ethernet/mscc/ocelot_board.c:23:12: note: in expansion of macro 'ntohl'
      ifh[i] = ntohl((__force _be32)ifh[i]);
               ^~~~~
   drivers/net//ethernet/mscc/ocelot_board.c:23:33: error: expected ')' before 'ifh'
      ifh[i] = ntohl((__force _be32)ifh[i]);
                                    ^
   include/uapi/linux/swab.h:18:12: note: in definition of macro '___constant_swab32'
     (((__u32)(x) & (__u32)0x000000ffUL) << 24) |  \
               ^
>> include/uapi/linux/byteorder/little_endian.h:40:26: note: in expansion of macro '__swab32'
    #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
                             ^~~~~~~~
   include/linux/byteorder/generic.h:136:21: note: in expansion of macro '__be32_to_cpu'
    #define ___ntohl(x) __be32_to_cpu(x)
                        ^~~~~~~~~~~~~
   include/linux/byteorder/generic.h:140:18: note: in expansion of macro '___ntohl'
    #define ntohl(x) ___ntohl(x)
                     ^~~~~~~~
   drivers/net//ethernet/mscc/ocelot_board.c:23:12: note: in expansion of macro 'ntohl'
      ifh[i] = ntohl((__force _be32)ifh[i]);
               ^~~~~
   drivers/net//ethernet/mscc/ocelot_board.c:23:33: error: expected ')' before 'ifh'
      ifh[i] = ntohl((__force _be32)ifh[i]);
                                    ^
   include/uapi/linux/swab.h:19:12: note: in definition of macro '___constant_swab32'
     (((__u32)(x) & (__u32)0x0000ff00UL) <<  8) |  \
               ^
>> include/uapi/linux/byteorder/little_endian.h:40:26: note: in expansion of macro '__swab32'
    #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
                             ^~~~~~~~
   include/linux/byteorder/generic.h:136:21: note: in expansion of macro '__be32_to_cpu'
    #define ___ntohl(x) __be32_to_cpu(x)
                        ^~~~~~~~~~~~~
   include/linux/byteorder/generic.h:140:18: note: in expansion of macro '___ntohl'
    #define ntohl(x) ___ntohl(x)
                     ^~~~~~~~
   drivers/net//ethernet/mscc/ocelot_board.c:23:12: note: in expansion of macro 'ntohl'
      ifh[i] = ntohl((__force _be32)ifh[i]);
               ^~~~~
   drivers/net//ethernet/mscc/ocelot_board.c:23:33: error: expected ')' before 'ifh'
      ifh[i] = ntohl((__force _be32)ifh[i]);
                                    ^
   include/uapi/linux/swab.h:20:12: note: in definition of macro '___constant_swab32'
     (((__u32)(x) & (__u32)0x00ff0000UL) >>  8) |  \
               ^
>> include/uapi/linux/byteorder/little_endian.h:40:26: note: in expansion of macro '__swab32'
    #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
                             ^~~~~~~~
   include/linux/byteorder/generic.h:136:21: note: in expansion of macro '__be32_to_cpu'
    #define ___ntohl(x) __be32_to_cpu(x)
                        ^~~~~~~~~~~~~
   include/linux/byteorder/generic.h:140:18: note: in expansion of macro '___ntohl'
    #define ntohl(x) ___ntohl(x)
                     ^~~~~~~~
   drivers/net//ethernet/mscc/ocelot_board.c:23:12: note: in expansion of macro 'ntohl'
      ifh[i] = ntohl((__force _be32)ifh[i]);
               ^~~~~
   drivers/net//ethernet/mscc/ocelot_board.c:23:33: error: expected ')' before 'ifh'
      ifh[i] = ntohl((__force _be32)ifh[i]);
                                    ^
   include/uapi/linux/swab.h:21:12: note: in definition of macro '___constant_swab32'
     (((__u32)(x) & (__u32)0xff000000UL) >> 24)))
               ^
>> include/uapi/linux/byteorder/little_endian.h:40:26: note: in expansion of macro '__swab32'
    #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
                             ^~~~~~~~
   include/linux/byteorder/generic.h:136:21: note: in expansion of macro '__be32_to_cpu'
    #define ___ntohl(x) __be32_to_cpu(x)
                        ^~~~~~~~~~~~~
   include/linux/byteorder/generic.h:140:18: note: in expansion of macro '___ntohl'
    #define ntohl(x) ___ntohl(x)
                     ^~~~~~~~
   drivers/net//ethernet/mscc/ocelot_board.c:23:12: note: in expansion of macro 'ntohl'
      ifh[i] = ntohl((__force _be32)ifh[i]);
               ^~~~~
   drivers/net//ethernet/mscc/ocelot_board.c:23:33: error: expected ')' before 'ifh'
      ifh[i] = ntohl((__force _be32)ifh[i]);
                                    ^
   include/uapi/linux/swab.h:119:12: note: in definition of macro '__swab32'
     __fswab32(x))
               ^
   include/linux/byteorder/generic.h:136:21: note: in expansion of macro '__be32_to_cpu'
    #define ___ntohl(x) __be32_to_cpu(x)
                        ^~~~~~~~~~~~~
   include/linux/byteorder/generic.h:140:18: note: in expansion of macro '___ntohl'
    #define ntohl(x) ___ntohl(x)
                     ^~~~~~~~
   drivers/net//ethernet/mscc/ocelot_board.c:23:12: note: in expansion of macro 'ntohl'
      ifh[i] = ntohl((__force _be32)ifh[i]);
               ^~~~~

vim +/__swab32 +40 include/uapi/linux/byteorder/little_endian.h

5921e6f8 David Howells 2012-10-13  14  
5921e6f8 David Howells 2012-10-13  15  #define __constant_htonl(x) ((__force __be32)___constant_swab32((x)))
5921e6f8 David Howells 2012-10-13  16  #define __constant_ntohl(x) ___constant_swab32((__force __be32)(x))
5921e6f8 David Howells 2012-10-13  17  #define __constant_htons(x) ((__force __be16)___constant_swab16((x)))
5921e6f8 David Howells 2012-10-13  18  #define __constant_ntohs(x) ___constant_swab16((__force __be16)(x))
5921e6f8 David Howells 2012-10-13  19  #define __constant_cpu_to_le64(x) ((__force __le64)(__u64)(x))
5921e6f8 David Howells 2012-10-13  20  #define __constant_le64_to_cpu(x) ((__force __u64)(__le64)(x))
5921e6f8 David Howells 2012-10-13  21  #define __constant_cpu_to_le32(x) ((__force __le32)(__u32)(x))
5921e6f8 David Howells 2012-10-13  22  #define __constant_le32_to_cpu(x) ((__force __u32)(__le32)(x))
5921e6f8 David Howells 2012-10-13  23  #define __constant_cpu_to_le16(x) ((__force __le16)(__u16)(x))
5921e6f8 David Howells 2012-10-13  24  #define __constant_le16_to_cpu(x) ((__force __u16)(__le16)(x))
5921e6f8 David Howells 2012-10-13  25  #define __constant_cpu_to_be64(x) ((__force __be64)___constant_swab64((x)))
5921e6f8 David Howells 2012-10-13  26  #define __constant_be64_to_cpu(x) ___constant_swab64((__force __u64)(__be64)(x))
5921e6f8 David Howells 2012-10-13  27  #define __constant_cpu_to_be32(x) ((__force __be32)___constant_swab32((x)))
5921e6f8 David Howells 2012-10-13  28  #define __constant_be32_to_cpu(x) ___constant_swab32((__force __u32)(__be32)(x))
5921e6f8 David Howells 2012-10-13  29  #define __constant_cpu_to_be16(x) ((__force __be16)___constant_swab16((x)))
5921e6f8 David Howells 2012-10-13  30  #define __constant_be16_to_cpu(x) ___constant_swab16((__force __u16)(__be16)(x))
5921e6f8 David Howells 2012-10-13  31  #define __cpu_to_le64(x) ((__force __le64)(__u64)(x))
5921e6f8 David Howells 2012-10-13  32  #define __le64_to_cpu(x) ((__force __u64)(__le64)(x))
5921e6f8 David Howells 2012-10-13  33  #define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
5921e6f8 David Howells 2012-10-13  34  #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
5921e6f8 David Howells 2012-10-13  35  #define __cpu_to_le16(x) ((__force __le16)(__u16)(x))
5921e6f8 David Howells 2012-10-13  36  #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
5921e6f8 David Howells 2012-10-13  37  #define __cpu_to_be64(x) ((__force __be64)__swab64((x)))
5921e6f8 David Howells 2012-10-13  38  #define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x))
5921e6f8 David Howells 2012-10-13  39  #define __cpu_to_be32(x) ((__force __be32)__swab32((x)))
5921e6f8 David Howells 2012-10-13 @40  #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
5921e6f8 David Howells 2012-10-13  41  #define __cpu_to_be16(x) ((__force __be16)__swab16((x)))
5921e6f8 David Howells 2012-10-13  42  #define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
5921e6f8 David Howells 2012-10-13  43  

:::::: The code at line 40 was first introduced by commit
:::::: 5921e6f8809b1616932ca4afd40fe449faa8fd88 UAPI: (Scripted) Disintegrate include/linux/byteorder

:::::: TO: David Howells <dhowells@...hat.com>
:::::: CC: David Howells <dhowells@...hat.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ