drivers/i2c/busses/i2c-icy.c:125:16: error: implicit declaration of function 'ZTWO_VADDR'
From: kernel test robot
Date: Sun Jun 07 2020 - 10:42:19 EST
Hi Max,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3b69e8b4571125bec1f77f886174fe6cab6b9d75
commit: 4768e90ecaec6b503ff64229bda5d91186d2edd3 i2c: Add i2c-icy for I2C on m68k/Amiga
date: 9 months ago
config: m68k-randconfig-r022-20200607 (attached as .config)
compiler: m68k-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
git checkout 4768e90ecaec6b503ff64229bda5d91186d2edd3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/i2c/busses/i2c-icy.c: In function 'icy_probe':
>> drivers/i2c/busses/i2c-icy.c:125:16: error: implicit declaration of function 'ZTWO_VADDR' [-Werror=implicit-function-declaration]
125 | i2c->reg_s0 = ZTWO_VADDR(z->resource.start);
| ^~~~~~~~~~
>> drivers/i2c/busses/i2c-icy.c:125:14: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
125 | i2c->reg_s0 = ZTWO_VADDR(z->resource.start);
| ^
drivers/i2c/busses/i2c-icy.c:126:14: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
126 | i2c->reg_s1 = ZTWO_VADDR(z->resource.start + 2);
| ^
cc1: some warnings being treated as errors
vim +/ZTWO_VADDR +125 drivers/i2c/busses/i2c-icy.c
93
94 /*
95 * Main i2c-icy part
96 */
97 static int icy_probe(struct zorro_dev *z,
98 const struct zorro_device_id *ent)
99 {
100 struct icy_i2c *i2c;
101 struct i2c_algo_pcf_data *algo_data;
102
103 i2c = devm_kzalloc(&z->dev, sizeof(*i2c), GFP_KERNEL);
104 if (!i2c)
105 return -ENOMEM;
106
107 algo_data = devm_kzalloc(&z->dev, sizeof(*algo_data), GFP_KERNEL);
108 if (!algo_data)
109 return -ENOMEM;
110
111 dev_set_drvdata(&z->dev, i2c);
112 i2c->adapter.dev.parent = &z->dev;
113 i2c->adapter.owner = THIS_MODULE;
114 /* i2c->adapter.algo assigned by i2c_pcf_add_bus() */
115 i2c->adapter.algo_data = algo_data;
116 strlcpy(i2c->adapter.name, "ICY I2C Zorro adapter",
117 sizeof(i2c->adapter.name));
118
119 if (!devm_request_mem_region(&z->dev,
120 z->resource.start,
121 4, i2c->adapter.name))
122 return -ENXIO;
123
124 /* Driver private data */
> 125 i2c->reg_s0 = ZTWO_VADDR(z->resource.start);
126 i2c->reg_s1 = ZTWO_VADDR(z->resource.start + 2);
127
128 algo_data->data = i2c;
129 algo_data->setpcf = icy_pcf_setpcf;
130 algo_data->getpcf = icy_pcf_getpcf;
131 algo_data->getown = icy_pcf_getown;
132 algo_data->getclock = icy_pcf_getclock;
133 algo_data->waitforpin = icy_pcf_waitforpin;
134
135 if (i2c_pcf_add_bus(&i2c->adapter)) {
136 dev_err(&z->dev, "i2c_pcf_add_bus() failed\n");
137 return -ENXIO;
138 }
139
140 dev_info(&z->dev, "ICY I2C controller at %pa, IRQ not implemented\n",
141 &z->resource.start);
142
143 return 0;
144 }
145
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip