Re: [PATCH v1 1/4] mhi_bus: core: Add support for MHI host interface

From: kbuild test robot
Date: Fri Apr 27 2018 - 22:53:39 EST


Hi Sujeev,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.17-rc2 next-20180426]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Sujeev-Dias/mhi_bus-core-Add-support-for-MHI-host-interface/20180428-065959
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/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=sparc64

All error/warnings (new ones prefixed by >>):

drivers/bus/mhi/core/mhi_dtr.c: In function 'mhi_ioctl':
>> drivers/bus/mhi/core/mhi_dtr.c:108:9: error: implicit declaration of function 'get_user'; did you mean 'get_super'? [-Werror=implicit-function-declaration]
ret = get_user(tiocm, (u32 *)arg);
^~~~~~~~
get_super
>> drivers/bus/mhi/core/mhi_dtr.c:108:7: warning: 'tiocm' may be used uninitialized in this function [-Wmaybe-uninitialized]
ret = get_user(tiocm, (u32 *)arg);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

vim +108 drivers/bus/mhi/core/mhi_dtr.c

90
91 long mhi_ioctl(struct mhi_device *mhi_dev, unsigned int cmd, unsigned long arg)
92 {
93 struct mhi_controller *mhi_cntrl = mhi_dev->mhi_cntrl;
94 struct mhi_chan *mhi_chan = mhi_dev->ul_chan;
95 int ret;
96
97 /* ioctl not supported by this controller */
98 if (!mhi_cntrl->dtr_dev)
99 return -EIO;
100
101 switch (cmd) {
102 case TIOCMGET:
103 return mhi_chan->tiocm;
104 case TIOCMSET:
105 {
106 u32 tiocm;
107
> 108 ret = get_user(tiocm, (u32 *)arg);
109 if (ret)
110 return ret;
111
112 return mhi_dtr_tiocmset(mhi_cntrl, mhi_chan, tiocm);
113 }
114 default:
115 break;
116 }
117
118 return -EINVAL;
119 }
120 EXPORT_SYMBOL(mhi_ioctl);
121

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip