From: kbuild test robot <lkp@intel.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: kbuild-all@01.org, "David S . Miller" <davem@davemloft.net>,
Allan Nielsen <Allan.Nielsen@microsemi.com>,
razvan.stefanescu@nxp.com, po.liu@nxp.com,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mips@linux-mips.org,
Alexandre Belloni <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH net-next v2 4/7] net: mscc: Add initial Ocelot switch support
Date: Sun, 29 Apr 2018 04:42:16 +0800 [thread overview]
Message-ID: <201804290411.bWJ5mnIe%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180426195931.5393-5-alexandre.belloni@bootlin.com>
[-- Attachment #1: Type: text/plain, Size: 11964 bytes --]
Hi Alexandre,
I love your patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Alexandre-Belloni/Microsemi-Ocelot-Ethernet-switch-support/20180429-024136
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All error/warnings (new ones prefixed by >>):
drivers/net/ethernet/mscc/ocelot_board.c:23:26: sparse: Expected ) at end of cast operator
drivers/net/ethernet/mscc/ocelot_board.c:23:26: sparse: got _be32
drivers/net/ethernet/mscc/ocelot_board.c:23:26: sparse: cast from unknown type
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/x86/include/uapi/asm/byteorder.h:5,
from include/asm-generic/bitops/le.h:6,
from arch/x86/include/asm/bitops.h:521,
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:114:54: note: in definition of macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__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:114:54: note: in definition of macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__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:114:54: note: in definition of macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__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]);
^~~~~
--
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/x86/include/uapi/asm/byteorder.h:5,
from include/asm-generic/bitops/le.h:6,
from arch/x86/include/asm/bitops.h:521,
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:114:54: note: in definition of macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__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:114:54: note: in definition of macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__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:114:54: note: in definition of macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__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]);
^~~~~
sparse warnings: (new ones prefixed by >>)
drivers/net/ethernet/mscc/ocelot_board.c:23:26: sparse: Expected ) at end of cast operator
drivers/net/ethernet/mscc/ocelot_board.c:23:26: sparse: got _be32
>> drivers/net/ethernet/mscc/ocelot_board.c:23:26: sparse: cast from unknown type
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/x86/include/uapi/asm/byteorder.h:5,
from include/asm-generic/bitops/le.h:6,
from arch/x86/include/asm/bitops.h:521,
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:114:54: note: in definition of macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__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:114:54: note: in definition of macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__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:114:54: note: in definition of macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__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]);
^~~~~
vim +23 drivers/net/ethernet/mscc/ocelot_board.c
> 7 #include <linux/interrupt.h>
8 #include <linux/module.h>
9 #include <linux/netdevice.h>
10 #include <linux/of_mdio.h>
11 #include <linux/of_platform.h>
12 #include <linux/skbuff.h>
13
14 #include "ocelot.h"
15
16 static int ocelot_parse_ifh(u32 *ifh, struct frame_info *info)
17 {
18 int i;
19 u8 llen, wlen;
20
21 /* The IFH is in network order, switch to CPU order */
22 for (i = 0; i < IFH_LEN; i++)
> 23 ifh[i] = ntohl((__force _be32)ifh[i]);
24
25 wlen = (ifh[1] >> 7) & 0xff;
26 llen = (ifh[1] >> 15) & 0x3f;
27 info->len = OCELOT_BUFFER_CELL_SZ * wlen + llen - 80;
28
29 info->port = (ifh[2] & GENMASK(14, 11)) >> 11;
30
31 info->cpuq = (ifh[3] & GENMASK(27, 20)) >> 20;
32 info->tag_type = (ifh[3] & GENMASK(16, 16)) >> 16;
33 info->vid = ifh[3] & GENMASK(11, 0);
34
35 return 0;
36 }
37
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 63134 bytes --]
next prev parent reply other threads:[~2018-04-28 20:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-26 19:59 [PATCH net-next v2 0/7] Microsemi Ocelot Ethernet " Alexandre Belloni
2018-04-26 19:59 ` [PATCH net-next v2 1/7] dt-bindings: net: add DT bindings for Microsemi MIIM Alexandre Belloni
2018-04-27 20:08 ` Rob Herring
2018-04-26 19:59 ` [PATCH net-next v2 2/7] net: mscc: Add MDIO driver Alexandre Belloni
2018-04-26 20:46 ` Andrew Lunn
2018-04-26 19:59 ` [PATCH net-next v2 3/7] dt-bindings: net: add DT bindings for Microsemi Ocelot Switch Alexandre Belloni
2018-04-27 20:10 ` Rob Herring
2018-04-26 19:59 ` [PATCH net-next v2 4/7] net: mscc: Add initial Ocelot switch support Alexandre Belloni
2018-04-26 21:09 ` Andrew Lunn
2018-04-27 13:44 ` Alexandre Belloni
2018-04-28 19:42 ` kbuild test robot
2018-04-28 20:42 ` kbuild test robot [this message]
2018-04-26 19:59 ` [PATCH net-next v2 5/7] MIPS: mscc: Add switch to ocelot Alexandre Belloni
2018-04-26 20:51 ` Andrew Lunn
2018-04-27 7:40 ` Alexandre Belloni
2018-04-26 19:59 ` [PATCH net-next v2 6/7] MIPS: mscc: connect phys to ports on ocelot_pcb123 Alexandre Belloni
2018-04-26 19:59 ` [PATCH net-next v2 7/7] MAINTAINERS: Add entry for Microsemi Ethernet switches Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201804290411.bWJ5mnIe%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=Allan.Nielsen@microsemi.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=netdev@vger.kernel.org \
--cc=po.liu@nxp.com \
--cc=razvan.stefanescu@nxp.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®