Re: [PATCH net-next v3 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch
From: kbuild test robot
Date: Mon Apr 03 2017 - 01:07:42 EST
Hi Sean,
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/sean-wang-mediatek-com/net-next-dsa-add-Mediatek-MT7530-support/20170330-135532
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 4.9.0
reproduce:
wget https://raw.githubusercontent.com/01org/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=m68k
All errors (new ones prefixed by >>):
In file included from net//dsa/tag_mtk.c:16:0:
net//dsa/dsa_priv.h:51:16: warning: 'struct dsa_switch' declared inside parameter list
struct dsa_port *dport, int port);
^
net//dsa/dsa_priv.h:51:16: warning: its scope is only this definition or declaration, which is probably not what you want
net//dsa/dsa_priv.h:54:39: warning: 'struct dsa_switch' declared inside parameter list
int dsa_cpu_port_ethtool_setup(struct dsa_switch *ds);
^
net//dsa/dsa_priv.h:55:42: warning: 'struct dsa_switch' declared inside parameter list
void dsa_cpu_port_ethtool_restore(struct dsa_switch *ds);
^
net//dsa/dsa_priv.h:59:36: warning: 'struct dsa_switch' declared inside parameter list
void dsa_slave_mii_bus_init(struct dsa_switch *ds);
^
net//dsa/dsa_priv.h:62:8: warning: 'struct dsa_switch' declared inside parameter list
int port, const char *name);
^
net//dsa/dsa_priv.h:70:41: warning: 'struct dsa_switch' declared inside parameter list
int dsa_switch_register_notifier(struct dsa_switch *ds);
^
net//dsa/dsa_priv.h:71:44: warning: 'struct dsa_switch' declared inside parameter list
void dsa_switch_unregister_notifier(struct dsa_switch *ds);
^
net//dsa/tag_mtk.c: In function 'mtk_tag_xmit':
>> net//dsa/tag_mtk.c:38:26: error: dereferencing pointer to incomplete type
mtk_tag[1] = (1 << p->dp->index) & MTK_HDR_XMIT_DP_BIT_MASK;
^
net//dsa/tag_mtk.c: In function 'mtk_tag_rcv':
net//dsa/tag_mtk.c:85:10: error: dereferencing pointer to incomplete type
ds = dst->ds[0];
^
net//dsa/tag_mtk.c:91:9: error: dereferencing pointer to incomplete type
if (!ds->ports[port].netdev)
^
net//dsa/tag_mtk.c:98:15: error: dereferencing pointer to incomplete type
skb->dev = ds->ports[port].netdev;
^
vim +38 net//dsa/tag_mtk.c
2faad9d7 Sean Wang 2017-03-29 22 static struct sk_buff *mtk_tag_xmit(struct sk_buff *skb,
2faad9d7 Sean Wang 2017-03-29 23 struct net_device *dev)
2faad9d7 Sean Wang 2017-03-29 24 {
2faad9d7 Sean Wang 2017-03-29 25 struct dsa_slave_priv *p = netdev_priv(dev);
2faad9d7 Sean Wang 2017-03-29 26 u8 *mtk_tag;
2faad9d7 Sean Wang 2017-03-29 27
2faad9d7 Sean Wang 2017-03-29 28 if (skb_cow_head(skb, MTK_HDR_LEN) < 0)
2faad9d7 Sean Wang 2017-03-29 29 goto out_free;
2faad9d7 Sean Wang 2017-03-29 30
2faad9d7 Sean Wang 2017-03-29 31 skb_push(skb, MTK_HDR_LEN);
2faad9d7 Sean Wang 2017-03-29 32
2faad9d7 Sean Wang 2017-03-29 33 memmove(skb->data, skb->data + MTK_HDR_LEN, 2 * ETH_ALEN);
2faad9d7 Sean Wang 2017-03-29 34
2faad9d7 Sean Wang 2017-03-29 35 /* Build the tag after the MAC Source Address */
2faad9d7 Sean Wang 2017-03-29 36 mtk_tag = skb->data + 2 * ETH_ALEN;
2faad9d7 Sean Wang 2017-03-29 37 mtk_tag[0] = 0;
2faad9d7 Sean Wang 2017-03-29 @38 mtk_tag[1] = (1 << p->dp->index) & MTK_HDR_XMIT_DP_BIT_MASK;
2faad9d7 Sean Wang 2017-03-29 39 mtk_tag[2] = 0;
2faad9d7 Sean Wang 2017-03-29 40 mtk_tag[3] = 0;
2faad9d7 Sean Wang 2017-03-29 41
2faad9d7 Sean Wang 2017-03-29 42 return skb;
2faad9d7 Sean Wang 2017-03-29 43
2faad9d7 Sean Wang 2017-03-29 44 out_free:
2faad9d7 Sean Wang 2017-03-29 45 kfree_skb(skb);
2faad9d7 Sean Wang 2017-03-29 46 return NULL;
:::::: The code at line 38 was first introduced by commit
:::::: 2faad9d71e4c0544e3cf43b24439517c95df301f net-next: dsa: add Mediatek tag RX/TX handler
:::::: TO: Sean Wang <sean.wang@xxxxxxxxxxxx>
:::::: CC: 0day robot <fengguang.wu@xxxxxxxxx>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip