Re: [PATCH v2] bus: mhi: Add Qcom WWAN control driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: 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/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
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

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 +/mhi_prepare_for_transfer +137 drivers/bus/mhi/wwan_ctrl.c

   117	
   118	static int mhi_wwan_ctrl_open(struct inode *inode, struct file *filp)
   119	{
   120		unsigned int minor = iminor(inode);
   121		struct mhi_wwan_dev *wwandev = NULL;
   122		int ret = 0;
   123	
   124		/* Retrieve corresponding mhi_wwan_dev and get a reference */
   125		mutex_lock(&mhi_wwan_ctrl_drv_lock);
   126		wwandev = idr_find(&mhi_wwan_ctrl_idr, minor);
   127		if (!wwandev) {
   128			mutex_unlock(&mhi_wwan_ctrl_drv_lock);
   129			return -ENODEV;
   130		}
   131		kref_get(&wwandev->ref_count);
   132		mutex_unlock(&mhi_wwan_ctrl_drv_lock);
   133	
   134		/* Start MHI channel(s) if not yet started and fill RX queue */
   135		mutex_lock(&wwandev->mhi_dev_lock);
   136		if (!wwandev->mhi_dev_open_count++) {
 > 137			ret = mhi_prepare_for_transfer(wwandev->mhi_dev, 0);
   138			if (!ret)
   139				ret = mhi_wwan_ctrl_queue_inbound(wwandev);
   140			if (ret)
   141				wwandev->mhi_dev_open_count--;
   142		}
   143		mutex_unlock(&wwandev->mhi_dev_lock);
   144	
   145		if (ret)
   146			return ret;
   147	
   148		filp->private_data = wwandev;
   149	
   150		/* stream-like non-seekable file descriptor */
   151		stream_open(inode, filp);
   152	
   153		return 0;
   154	}
   155	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux