Hi Chetan,
I love your patch! Yet something to improve:
[auto build test ERROR on net/master]
[also build test ERROR on ipvs/master net-next/master linus/master v5.13-rc5
next-20210608]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/M-Chetan-Kumar/net-iosm-PCIe-Dri...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git
7a6b1ab7475fd6478eeaf5c9d1163e7a18125c8f
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
#
https://github.com/0day-ci/linux/commit/8720122f89695c8d8577b373d58551163...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
M-Chetan-Kumar/net-iosm-PCIe-Driver-for-Intel-M-2-Modem/20210609-010731
git checkout 8720122f89695c8d8577b373d585511632aa69ec
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> drivers/net/wwan/iosm/iosm_ipc_wwan.c:231:21: error: variable
'iosm_wwan_ops' has initializer but incomplete type
231 | static const
struct wwan_ops iosm_wwan_ops = {
| ^~~~~~~~
> drivers/net/wwan/iosm/iosm_ipc_wwan.c:232:3: error: 'const
struct wwan_ops' has no member named 'priv_size'
232 | .priv_size
= sizeof(struct iosm_netdev_priv),
| ^~~~~~~~~
drivers/net/wwan/iosm/iosm_ipc_wwan.c:232:15: warning: excess elements in struct
initializer
232 | .priv_size = sizeof(struct iosm_netdev_priv),
| ^~~~~~
drivers/net/wwan/iosm/iosm_ipc_wwan.c:232:15: note: (near initialization for
'iosm_wwan_ops')
> drivers/net/wwan/iosm/iosm_ipc_wwan.c:233:3: error: 'const
struct wwan_ops' has no member named 'setup'
233 | .setup =
ipc_wwan_setup,
| ^~~~~
drivers/net/wwan/iosm/iosm_ipc_wwan.c:233:11: warning: excess elements in struct
initializer
233 | .setup = ipc_wwan_setup,
| ^~~~~~~~~~~~~~
drivers/net/wwan/iosm/iosm_ipc_wwan.c:233:11: note: (near initialization for
'iosm_wwan_ops')
> drivers/net/wwan/iosm/iosm_ipc_wwan.c:234:3: error: 'const
struct wwan_ops' has no member named 'newlink'
234 | .newlink =
ipc_wwan_newlink,
| ^~~~~~~
drivers/net/wwan/iosm/iosm_ipc_wwan.c:234:13: warning: excess elements in struct
initializer
234 | .newlink = ipc_wwan_newlink,
| ^~~~~~~~~~~~~~~~
drivers/net/wwan/iosm/iosm_ipc_wwan.c:234:13: note: (near initialization for
'iosm_wwan_ops')
> drivers/net/wwan/iosm/iosm_ipc_wwan.c:235:3: error: 'const
struct wwan_ops' has no member named 'dellink'
235 | .dellink =
ipc_wwan_dellink,
| ^~~~~~~
drivers/net/wwan/iosm/iosm_ipc_wwan.c:235:13: warning: excess elements in struct
initializer
235 | .dellink = ipc_wwan_dellink,
| ^~~~~~~~~~~~~~~~
drivers/net/wwan/iosm/iosm_ipc_wwan.c:235:13: note: (near initialization for
'iosm_wwan_ops')
drivers/net/wwan/iosm/iosm_ipc_wwan.c: In function 'ipc_wwan_init':
> drivers/net/wwan/iosm/iosm_ipc_wwan.c:319:6: error: implicit
declaration of function 'wwan_register_ops'
[-Werror=implicit-function-declaration]
319 | if
(wwan_register_ops(ipc_wwan->dev, &iosm_wwan_ops, ipc_wwan)) {
| ^~~~~~~~~~~~~~~~~
drivers/net/wwan/iosm/iosm_ipc_wwan.c: In function 'ipc_wwan_deinit':
> drivers/net/wwan/iosm/iosm_ipc_wwan.c:333:2: error: implicit
declaration of function 'wwan_unregister_ops'
[-Werror=implicit-function-declaration]
333 |
wwan_unregister_ops(ipc_wwan->dev);
| ^~~~~~~~~~~~~~~~~~~
drivers/net/wwan/iosm/iosm_ipc_wwan.c: At top level:
> drivers/net/wwan/iosm/iosm_ipc_wwan.c:231:30: error: storage size
of 'iosm_wwan_ops' isn't known
231 | static const struct wwan_ops
iosm_wwan_ops = {
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/iosm_wwan_ops +231 drivers/net/wwan/iosm/iosm_ipc_wwan.c
a55422b04bda2b M Chetan Kumar 2021-06-08 230
a55422b04bda2b M Chetan Kumar 2021-06-08 @231 static const struct wwan_ops iosm_wwan_ops
= {
a55422b04bda2b M Chetan Kumar 2021-06-08 @232 .priv_size = sizeof(struct
iosm_netdev_priv),
a55422b04bda2b M Chetan Kumar 2021-06-08 @233 .setup = ipc_wwan_setup,
a55422b04bda2b M Chetan Kumar 2021-06-08 @234 .newlink = ipc_wwan_newlink,
a55422b04bda2b M Chetan Kumar 2021-06-08 @235 .dellink = ipc_wwan_dellink,
a55422b04bda2b M Chetan Kumar 2021-06-08 236 };
a55422b04bda2b M Chetan Kumar 2021-06-08 237
a55422b04bda2b M Chetan Kumar 2021-06-08 238 int ipc_wwan_receive(struct iosm_wwan
*ipc_wwan, struct sk_buff *skb_arg,
a55422b04bda2b M Chetan Kumar 2021-06-08 239 bool dss, int if_id)
a55422b04bda2b M Chetan Kumar 2021-06-08 240 {
a55422b04bda2b M Chetan Kumar 2021-06-08 241 struct sk_buff *skb = skb_arg;
a55422b04bda2b M Chetan Kumar 2021-06-08 242 struct net_device_stats *stats;
a55422b04bda2b M Chetan Kumar 2021-06-08 243 struct iosm_netdev_priv *priv;
a55422b04bda2b M Chetan Kumar 2021-06-08 244 int ret;
a55422b04bda2b M Chetan Kumar 2021-06-08 245
a55422b04bda2b M Chetan Kumar 2021-06-08 246 if ((skb->data[0] &
IOSM_IP_TYPE_MASK) == IOSM_IP_TYPE_IPV4)
a55422b04bda2b M Chetan Kumar 2021-06-08 247 skb->protocol = htons(ETH_P_IP);
a55422b04bda2b M Chetan Kumar 2021-06-08 248 else if ((skb->data[0] &
IOSM_IP_TYPE_MASK) ==
a55422b04bda2b M Chetan Kumar 2021-06-08 249 IOSM_IP_TYPE_IPV6)
a55422b04bda2b M Chetan Kumar 2021-06-08 250 skb->protocol = htons(ETH_P_IPV6);
a55422b04bda2b M Chetan Kumar 2021-06-08 251
a55422b04bda2b M Chetan Kumar 2021-06-08 252 skb->pkt_type = PACKET_HOST;
a55422b04bda2b M Chetan Kumar 2021-06-08 253
a55422b04bda2b M Chetan Kumar 2021-06-08 254 if (if_id < (IP_MUX_SESSION_START - 1)
||
a55422b04bda2b M Chetan Kumar 2021-06-08 255 if_id > (IP_MUX_SESSION_END - 1))
{
a55422b04bda2b M Chetan Kumar 2021-06-08 256 ret = -EINVAL;
a55422b04bda2b M Chetan Kumar 2021-06-08 257 goto free;
a55422b04bda2b M Chetan Kumar 2021-06-08 258 }
a55422b04bda2b M Chetan Kumar 2021-06-08 259
a55422b04bda2b M Chetan Kumar 2021-06-08 260 rcu_read_lock();
a55422b04bda2b M Chetan Kumar 2021-06-08 261 priv =
rcu_dereference(ipc_wwan->sub_netlist[if_id]);
a55422b04bda2b M Chetan Kumar 2021-06-08 262 if (!priv) {
a55422b04bda2b M Chetan Kumar 2021-06-08 263 ret = -EINVAL;
a55422b04bda2b M Chetan Kumar 2021-06-08 264 goto unlock;
a55422b04bda2b M Chetan Kumar 2021-06-08 265 }
a55422b04bda2b M Chetan Kumar 2021-06-08 266 skb->dev = priv->netdev;
a55422b04bda2b M Chetan Kumar 2021-06-08 267 stats = &priv->netdev->stats;
a55422b04bda2b M Chetan Kumar 2021-06-08 268 stats->rx_packets++;
a55422b04bda2b M Chetan Kumar 2021-06-08 269 stats->rx_bytes += skb->len;
a55422b04bda2b M Chetan Kumar 2021-06-08 270
a55422b04bda2b M Chetan Kumar 2021-06-08 271 ret = netif_rx(skb);
a55422b04bda2b M Chetan Kumar 2021-06-08 272 skb = NULL;
a55422b04bda2b M Chetan Kumar 2021-06-08 273 unlock:
a55422b04bda2b M Chetan Kumar 2021-06-08 274 rcu_read_unlock();
a55422b04bda2b M Chetan Kumar 2021-06-08 275 free:
a55422b04bda2b M Chetan Kumar 2021-06-08 276 dev_kfree_skb(skb);
a55422b04bda2b M Chetan Kumar 2021-06-08 277 return ret;
a55422b04bda2b M Chetan Kumar 2021-06-08 278 }
a55422b04bda2b M Chetan Kumar 2021-06-08 279
a55422b04bda2b M Chetan Kumar 2021-06-08 280 void ipc_wwan_tx_flowctrl(struct iosm_wwan
*ipc_wwan, int if_id, bool on)
a55422b04bda2b M Chetan Kumar 2021-06-08 281 {
a55422b04bda2b M Chetan Kumar 2021-06-08 282 struct net_device *netdev;
a55422b04bda2b M Chetan Kumar 2021-06-08 283 struct iosm_netdev_priv *priv;
a55422b04bda2b M Chetan Kumar 2021-06-08 284 bool is_tx_blk;
a55422b04bda2b M Chetan Kumar 2021-06-08 285
a55422b04bda2b M Chetan Kumar 2021-06-08 286 rcu_read_lock();
a55422b04bda2b M Chetan Kumar 2021-06-08 287 priv =
rcu_dereference(ipc_wwan->sub_netlist[if_id]);
a55422b04bda2b M Chetan Kumar 2021-06-08 288 if (!priv) {
a55422b04bda2b M Chetan Kumar 2021-06-08 289 rcu_read_unlock();
a55422b04bda2b M Chetan Kumar 2021-06-08 290 return;
a55422b04bda2b M Chetan Kumar 2021-06-08 291 }
a55422b04bda2b M Chetan Kumar 2021-06-08 292
a55422b04bda2b M Chetan Kumar 2021-06-08 293 netdev = priv->netdev;
a55422b04bda2b M Chetan Kumar 2021-06-08 294
a55422b04bda2b M Chetan Kumar 2021-06-08 295 is_tx_blk = netif_queue_stopped(netdev);
a55422b04bda2b M Chetan Kumar 2021-06-08 296
a55422b04bda2b M Chetan Kumar 2021-06-08 297 if (on)
a55422b04bda2b M Chetan Kumar 2021-06-08 298 dev_dbg(ipc_wwan->dev, "session
id[%d]: flowctrl enable",
a55422b04bda2b M Chetan Kumar 2021-06-08 299 if_id);
a55422b04bda2b M Chetan Kumar 2021-06-08 300
a55422b04bda2b M Chetan Kumar 2021-06-08 301 if (on && !is_tx_blk)
a55422b04bda2b M Chetan Kumar 2021-06-08 302 netif_stop_queue(netdev);
a55422b04bda2b M Chetan Kumar 2021-06-08 303 else if (!on && is_tx_blk)
a55422b04bda2b M Chetan Kumar 2021-06-08 304 netif_wake_queue(netdev);
a55422b04bda2b M Chetan Kumar 2021-06-08 305 rcu_read_unlock();
a55422b04bda2b M Chetan Kumar 2021-06-08 306 }
a55422b04bda2b M Chetan Kumar 2021-06-08 307
a55422b04bda2b M Chetan Kumar 2021-06-08 308 struct iosm_wwan *ipc_wwan_init(struct
iosm_imem *ipc_imem, struct device *dev)
a55422b04bda2b M Chetan Kumar 2021-06-08 309 {
a55422b04bda2b M Chetan Kumar 2021-06-08 310 struct iosm_wwan *ipc_wwan;
a55422b04bda2b M Chetan Kumar 2021-06-08 311
a55422b04bda2b M Chetan Kumar 2021-06-08 312 ipc_wwan = kzalloc(sizeof(*ipc_wwan),
GFP_KERNEL);
a55422b04bda2b M Chetan Kumar 2021-06-08 313 if (!ipc_wwan)
a55422b04bda2b M Chetan Kumar 2021-06-08 314 return NULL;
a55422b04bda2b M Chetan Kumar 2021-06-08 315
a55422b04bda2b M Chetan Kumar 2021-06-08 316 ipc_wwan->dev = dev;
a55422b04bda2b M Chetan Kumar 2021-06-08 317 ipc_wwan->ipc_imem = ipc_imem;
a55422b04bda2b M Chetan Kumar 2021-06-08 318
a55422b04bda2b M Chetan Kumar 2021-06-08 @319 if (wwan_register_ops(ipc_wwan->dev,
&iosm_wwan_ops, ipc_wwan)) {
a55422b04bda2b M Chetan Kumar 2021-06-08 320 kfree(ipc_wwan);
a55422b04bda2b M Chetan Kumar 2021-06-08 321 return NULL;
a55422b04bda2b M Chetan Kumar 2021-06-08 322 }
a55422b04bda2b M Chetan Kumar 2021-06-08 323
a55422b04bda2b M Chetan Kumar 2021-06-08 324 mutex_init(&ipc_wwan->if_mutex);
a55422b04bda2b M Chetan Kumar 2021-06-08 325
a55422b04bda2b M Chetan Kumar 2021-06-08 326 return ipc_wwan;
a55422b04bda2b M Chetan Kumar 2021-06-08 327 }
a55422b04bda2b M Chetan Kumar 2021-06-08 328
a55422b04bda2b M Chetan Kumar 2021-06-08 329 void ipc_wwan_deinit(struct iosm_wwan
*ipc_wwan)
a55422b04bda2b M Chetan Kumar 2021-06-08 330 {
a55422b04bda2b M Chetan Kumar 2021-06-08 331 int if_id;
a55422b04bda2b M Chetan Kumar 2021-06-08 332
a55422b04bda2b M Chetan Kumar 2021-06-08 @333 wwan_unregister_ops(ipc_wwan->dev);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org