[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202111171644.8jT9PUEF-lkp@intel.com>
Date: Wed, 17 Nov 2021 16:21:19 +0800
From: kernel test robot <lkp@...el.com>
To: Tony Huang <tonyhuang.sunplus@...il.com>, robh+dt@...nel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
derek.kiernan@...inx.com, dragan.cvetic@...inx.com, arnd@...db.de,
gregkh@...uxfoundation.org
Cc: kbuild-all@...ts.01.org, wells.lu@...plus.com,
Tony Huang <tony.huang@...plus.com>
Subject: Re: [PATCH 2/2] misc: Add iop driver for Sunplus SP7021
Hi Tony,
I love your patch! Yet something to improve:
[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on robh/for-next linux/master linus/master v5.16-rc1 next-20211117]
[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/Tony-Huang/Add-iop-driver-for-Sunplus-SP7021/20211117-145012
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git b5013d084e03e82ceeab4db8ae8ceeaebe76b0eb
config: nios2-randconfig-r024-20211117 (attached as .config)
compiler: nios2-linux-gcc (GCC) 11.2.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/0b52ba2fcf62ee9a39d385e15fd7fccacafb2895
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Tony-Huang/Add-iop-driver-for-Sunplus-SP7021/20211117-145012
git checkout 0b52ba2fcf62ee9a39d385e15fd7fccacafb2895
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash drivers/misc/iop/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All error/warnings (new ones prefixed by >>):
drivers/misc/iop/sunplus_iop.c: In function 'wakein_store':
>> drivers/misc/iop/sunplus_iop.c:227:46: error: 'B_SYSTEM_BASE' undeclared (first use in this function); did you mean 'SYSTEM_HALT'?
227 | reg = readl((void __iomem *)(B_SYSTEM_BASE + 32*4*1 + 4*2));
| ^~~~~~~~~~~~~
| SYSTEM_HALT
drivers/misc/iop/sunplus_iop.c:227:46: note: each undeclared identifier is reported only once for each function it appears in
drivers/misc/iop/sunplus_iop.c: In function 'setgpio_store':
>> drivers/misc/iop/sunplus_iop.c:313:22: warning: variable 'setnum' set but not used [-Wunused-but-set-variable]
313 | unsigned int setnum;
| ^~~~~~
>> drivers/misc/iop/sunplus_iop.c:312:23: warning: variable 'num' set but not used [-Wunused-but-set-variable]
312 | unsigned char num[1];
| ^~~
--
drivers/misc/iop/hal_iop.c: In function 'hal_iop_init':
>> drivers/misc/iop/hal_iop.c:42:45: error: 'B_SYSTEM_BASE' undeclared (first use in this function); did you mean 'SYSTEM_HALT'?
42 | writel(0x00100010, (void __iomem *)(B_SYSTEM_BASE + 32*4*0 + 4*1));
| ^~~~~~~~~~~~~
| SYSTEM_HALT
drivers/misc/iop/hal_iop.c:42:45: note: each undeclared identifier is reported only once for each function it appears in
drivers/misc/iop/hal_iop.c: In function 'hal_iop_load_normal_code':
drivers/misc/iop/hal_iop.c:90:45: error: 'B_SYSTEM_BASE' undeclared (first use in this function); did you mean 'SYSTEM_HALT'?
90 | writel(0x00100010, (void __iomem *)(B_SYSTEM_BASE + 32*4*0 + 4*1));
| ^~~~~~~~~~~~~
| SYSTEM_HALT
drivers/misc/iop/hal_iop.c: In function 'hal_iop_load_standby_code':
drivers/misc/iop/hal_iop.c:130:45: error: 'B_SYSTEM_BASE' undeclared (first use in this function); did you mean 'SYSTEM_HALT'?
130 | writel(0x00100010, (void __iomem *)(B_SYSTEM_BASE + 32*4*0 + 4*1));
| ^~~~~~~~~~~~~
| SYSTEM_HALT
drivers/misc/iop/hal_iop.c: In function 'hal_iop_normalmode':
drivers/misc/iop/hal_iop.c:169:45: error: 'B_SYSTEM_BASE' undeclared (first use in this function); did you mean 'SYSTEM_HALT'?
169 | writel(0x00100010, (void __iomem *)(B_SYSTEM_BASE + 32*4*0 + 4*1));
| ^~~~~~~~~~~~~
| SYSTEM_HALT
drivers/misc/iop/hal_iop.c: In function 'hal_iop_standbymode':
drivers/misc/iop/hal_iop.c:208:45: error: 'B_SYSTEM_BASE' undeclared (first use in this function); did you mean 'SYSTEM_HALT'?
208 | writel(0x00100010, (void __iomem *)(B_SYSTEM_BASE + 32*4*0 + 4*1));
| ^~~~~~~~~~~~~
| SYSTEM_HALT
drivers/misc/iop/hal_iop.c: In function 'hal_iop_get_iop_data':
>> drivers/misc/iop/hal_iop.c:239:70: warning: variable 'value_11' set but not used [-Wunused-but-set-variable]
239 | unsigned short value_6, value_7, value_8, value_9, value_10, value_11;
| ^~~~~~~~
>> drivers/misc/iop/hal_iop.c:239:60: warning: variable 'value_10' set but not used [-Wunused-but-set-variable]
239 | unsigned short value_6, value_7, value_8, value_9, value_10, value_11;
| ^~~~~~~~
>> drivers/misc/iop/hal_iop.c:238:69: warning: variable 'value_5' set but not used [-Wunused-but-set-variable]
238 | unsigned short value_0, value_1, value_2, value_3, value_4, value_5;
| ^~~~~~~
>> drivers/misc/iop/hal_iop.c:238:60: warning: variable 'value_4' set but not used [-Wunused-but-set-variable]
238 | unsigned short value_0, value_1, value_2, value_3, value_4, value_5;
| ^~~~~~~
drivers/misc/iop/hal_iop.c: In function 'hal_iop_suspend':
drivers/misc/iop/hal_iop.c:327:45: error: 'B_SYSTEM_BASE' undeclared (first use in this function); did you mean 'SYSTEM_HALT'?
327 | writel(0x00100010, (void __iomem *)(B_SYSTEM_BASE + 32*4*0 + 4*1));
| ^~~~~~~~~~~~~
| SYSTEM_HALT
drivers/misc/iop/hal_iop.c: In function 'hal_iop_shutdown':
drivers/misc/iop/hal_iop.c:406:45: error: 'B_SYSTEM_BASE' undeclared (first use in this function); did you mean 'SYSTEM_HALT'?
406 | writel(0x00100010, (void __iomem *)(B_SYSTEM_BASE + 32*4*0 + 4*1));
| ^~~~~~~~~~~~~
| SYSTEM_HALT
vim +227 drivers/misc/iop/sunplus_iop.c
218
219 static ssize_t wakein_store(struct device *dev, struct device_attribute *attr,
220 const char *buf, size_t count)
221 {
222 unsigned char ret = count;
223 unsigned int reg;
224
225 if (buf[0] == '0') {
226 DBG_INFO("Disable WAKE_IN\n");
> 227 reg = readl((void __iomem *)(B_SYSTEM_BASE + 32*4*1 + 4*2));
228 reg = 0x08000000;
229 writel(reg, (void __iomem *)(B_SYSTEM_BASE + 32*4*1 + 4*2));
230 iop_wake_in = 0;
231 } else if (buf[0] == '1') {
232 DBG_INFO("Enable WAKE_IN\n");
233 reg = readl((void __iomem *)(B_SYSTEM_BASE + 32*4*1 + 4*2));
234 reg |= 0x08000800;
235 writel(reg, (void __iomem *)(B_SYSTEM_BASE + 32*4*1 + 4*2));
236 iop_wake_in = 1;
237 } else {
238 DBG_INFO("echo 0 or 1 mode\n");
239 DBG_INFO("0:Disable WAKE_IN\n");
240 DBG_INFO("1:Enable WAKE_IN\n");
241 }
242 return ret;
243 }
244
245 static ssize_t getdata_show(struct device *dev, struct device_attribute *attr,
246 char *buf)
247 {
248 ssize_t len = 0;
249
250 DBG_INFO("iop_show_getdata\n");
251 hal_iop_get_iop_data(iop->iop_regs);
252 return len;
253 }
254
255 static ssize_t getdata_store(struct device *dev, struct device_attribute *attr,
256 const char *buf, size_t count)
257 {
258 int ret = count;
259
260 DBG_INFO("iop_store_getdata\n");
261 return ret;
262 }
263
264 static ssize_t setdata_show(struct device *dev, struct device_attribute *attr,
265 char *buf)
266 {
267 ssize_t len = 0;
268
269 DBG_INFO("iop_show_setdata\n");
270 return len;
271 }
272
273 static ssize_t setdata_store(struct device *dev, struct device_attribute *attr,
274 const char *buf, size_t count)
275 {
276 unsigned char num[1], value[4];
277 unsigned char ret = count;
278 unsigned int i, setnum, setvalue;
279 unsigned long val;
280 ssize_t status;
281
282 num[0] = buf[0];
283 for (i = 0; i < 4; i++)
284 value[i] = buf[2+i];
285
286 status = kstrtoul(value, 16, &val);
287 if (status)
288 return status;
289
290 setnum = (unsigned int)num[0];
291 setvalue = val;
292 DBG_INFO("setnum=%x\n", setnum);
293 DBG_INFO("setvalue=%x\n", setvalue);
294 hal_iop_set_iop_data(iop->iop_regs, setnum, setvalue);
295 hal_iop_get_iop_data(iop->iop_regs);
296 return ret;
297 }
298
299 static ssize_t setgpio_show(struct device *dev, struct device_attribute *attr,
300 char *buf)
301 {
302 ssize_t len = 0;
303
304 DBG_INFO("iop_store_setgpio\n");
305 return len;
306 }
307
308 static ssize_t setgpio_store(struct device *dev, struct device_attribute *attr,
309 const char *buf, size_t count)
310 {
311 int ret = count;
> 312 unsigned char num[1];
> 313 unsigned int setnum;
314 unsigned long val;
315 ssize_t status;
316
317 DBG_INFO("iop_store_setgpio\n");
318 num[0] = buf[0];
319 status = kstrtoul(buf, 16, &val);
320 if (status)
321 return status;
322 setnum = val;
323 DBG_INFO("set gpio number = %x\n", IOP_GPIO);
324 hal_gpio_init(iop->iop_regs, IOP_GPIO);
325 return ret;
326 }
327
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (33064 bytes)
Powered by blists - more mailing lists