Hi Loic, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.12-rc3 next-20210319] [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/Loic-Poulain/bus-mhi-Add-Qcom-WWAN-control-driver/20210309-045313 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 144c79ef33536b4ecb4951e07dbc1f2b7fa99d32 config: s390-allyesconfig (attached as .config) compiler: s390-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/727df932009e4a00b877f66f9a77658967e0d8a4 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Loic-Poulain/bus-mhi-Add-Qcom-WWAN-control-driver/20210309-045313 git checkout 727df932009e4a00b877f66f9a77658967e0d8a4 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/bus/mhi/wwan_ctrl.c: In function 'mhi_wwan_ctrl_open': drivers/bus/mhi/wwan_ctrl.c:137:9: error: too many arguments to function 'mhi_prepare_for_transfer' 137 | ret = mhi_prepare_for_transfer(wwandev->mhi_dev, 0); | ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/bus/mhi/wwan_ctrl.c:5: include/linux/mhi.h:718:5: note: declared here 718 | int mhi_prepare_for_transfer(struct mhi_device *mhi_dev); | ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/kernel.h:14, from drivers/bus/mhi/wwan_ctrl.c:4: drivers/bus/mhi/wwan_ctrl.c: In function 'mhi_wwan_ctrl_probe': >> drivers/bus/mhi/wwan_ctrl.c:442:48: error: 'MHI_MAX_MTU' undeclared (first use in this function); did you mean 'ETH_MAX_MTU'? 442 | wwandev->mtu = min_t(size_t, id->driver_data, MHI_MAX_MTU); | ^~~~~~~~~~~ include/linux/minmax.h:18:39: note: in definition of macro '__typecheck' 18 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) | ^ include/linux/minmax.h:42:24: note: in expansion of macro '__safe_cmp' 42 | __builtin_choose_expr(__safe_cmp(x, y), \ | ^~~~~~~~~~ include/linux/minmax.h:110:27: note: in expansion of macro '__careful_cmp' 110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) | ^~~~~~~~~~~~~ drivers/bus/mhi/wwan_ctrl.c:442:17: note: in expansion of macro 'min_t' 442 | wwandev->mtu = min_t(size_t, id->driver_data, MHI_MAX_MTU); | ^~~~~ drivers/bus/mhi/wwan_ctrl.c:442:48: note: each undeclared identifier is reported only once for each function it appears in 442 | wwandev->mtu = min_t(size_t, id->driver_data, MHI_MAX_MTU); | ^~~~~~~~~~~ include/linux/minmax.h:18:39: note: in definition of macro '__typecheck' 18 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) | ^ include/linux/minmax.h:42:24: note: in expansion of macro '__safe_cmp' 42 | __builtin_choose_expr(__safe_cmp(x, y), \ | ^~~~~~~~~~ include/linux/minmax.h:110:27: note: in expansion of macro '__careful_cmp' 110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) | ^~~~~~~~~~~~~ drivers/bus/mhi/wwan_ctrl.c:442:17: note: in expansion of macro 'min_t' 442 | wwandev->mtu = min_t(size_t, id->driver_data, MHI_MAX_MTU); | ^~~~~ >> include/linux/minmax.h:42:2: error: first argument to '__builtin_choose_expr' not a constant 42 | __builtin_choose_expr(__safe_cmp(x, y), \ | ^~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:110:27: note: in expansion of macro '__careful_cmp' 110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) | ^~~~~~~~~~~~~ drivers/bus/mhi/wwan_ctrl.c:442:17: note: in expansion of macro 'min_t' 442 | wwandev->mtu = min_t(size_t, id->driver_data, MHI_MAX_MTU); | ^~~~~ drivers/bus/mhi/wwan_ctrl.c: At top level: drivers/bus/mhi/wwan_ctrl.c:504:53: error: 'MHI_MAX_MTU' undeclared here (not in a function); did you mean 'ETH_MAX_MTU'? 504 | { .chan = MHI_WWAN_CTRL_PROTO_QCDM, .driver_data = MHI_MAX_MTU }, | ^~~~~~~~~~~ | ETH_MAX_MTU vim +442 drivers/bus/mhi/wwan_ctrl.c 409 410 static int mhi_wwan_ctrl_probe(struct mhi_device *mhi_dev, 411 const struct mhi_device_id *id) 412 { 413 struct mhi_wwan_dev *wwandev; 414 struct device *dev; 415 int index, err; 416 417 /* Create mhi_wwan data context */ 418 wwandev = kzalloc(sizeof(*wwandev), GFP_KERNEL); 419 if (!wwandev) 420 return -ENOMEM; 421 422 /* Retrieve index */ 423 mutex_lock(&mhi_wwan_ctrl_drv_lock); 424 index = idr_alloc(&mhi_wwan_ctrl_idr, wwandev, 0, 425 MHI_WWAN_CTRL_MAX_MINORS, GFP_KERNEL); 426 mutex_unlock(&mhi_wwan_ctrl_drv_lock); 427 if (index < 0) { 428 err = index; 429 goto err_free_wwandev; 430 } 431 432 /* Init mhi_wwan data */ 433 kref_init(&wwandev->ref_count); 434 mutex_init(&wwandev->mhi_dev_lock); 435 mutex_init(&wwandev->write_lock); 436 init_waitqueue_head(&wwandev->ul_wq); 437 init_waitqueue_head(&wwandev->dl_wq); 438 spin_lock_init(&wwandev->dl_queue_lock); 439 INIT_LIST_HEAD(&wwandev->dl_queue); 440 wwandev->mhi_dev = mhi_dev; 441 wwandev->minor = index; > 442 wwandev->mtu = min_t(size_t, id->driver_data, MHI_MAX_MTU); 443 set_bit(MHI_WWAN_CONNECTED, &wwandev->flags); 444 445 if (mhi_dev->dl_chan) 446 set_bit(MHI_WWAN_DL_CAP, &wwandev->flags); 447 if (mhi_dev->ul_chan) 448 set_bit(MHI_WWAN_UL_CAP, &wwandev->flags); 449 450 dev_set_drvdata(&mhi_dev->dev, wwandev); 451 452 /* Creates a new device and registers it with sysfs */ 453 dev = device_create(mhi_wwan_ctrl_class, &mhi_dev->dev, 454 MKDEV(mhi_wwan_ctrl_major, index), wwandev, 455 "wwan_%s", dev_name(&mhi_dev->dev)); 456 if (IS_ERR(dev)) { 457 err = PTR_ERR(dev); 458 goto err_free_idr; 459 } 460 461 return 0; 462 463 err_free_idr: 464 mutex_lock(&mhi_wwan_ctrl_drv_lock); 465 idr_remove(&mhi_wwan_ctrl_idr, wwandev->minor); 466 mutex_unlock(&mhi_wwan_ctrl_drv_lock); 467 err_free_wwandev: 468 kfree(wwandev); 469 dev_set_drvdata(&mhi_dev->dev, NULL); 470 471 return err; 472 }; 473 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org