[soc:omap1-multiplatform-5.18 27/30] drivers/pcmcia/omap_cf.c:239:18: error: implicit declaration of function 'pci_ioremap_io'; did you mean 'pci_ioremap_bar'?
kernel test robot
lkp at intel.com
Sun Apr 3 08:59:43 PDT 2022
tree: https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git omap1-multiplatform-5.18
head: 72d1cb88aa83d0866c848348b485cfc92639d206
commit: 88a4412a3cf3456cefe4177898f934b00d309793 [27/30] ARM: omap1: use pci_ioremap_io() for omap_cf
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20220403/202204032333.AUsyPf6y-lkp@intel.com/config)
compiler: arm-linux-gnueabi-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://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git/commit/?id=88a4412a3cf3456cefe4177898f934b00d309793
git remote add soc https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git
git fetch --no-tags soc omap1-multiplatform-5.18
git checkout 88a4412a3cf3456cefe4177898f934b00d309793
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All errors (new ones prefixed by >>):
drivers/pcmcia/omap_cf.c: In function 'omap_cf_set_socket':
drivers/pcmcia/omap_cf.c:127:25: warning: variable 'control' set but not used [-Wunused-but-set-variable]
127 | u16 control;
| ^~~~~~~
drivers/pcmcia/omap_cf.c: In function 'omap_cf_probe':
>> drivers/pcmcia/omap_cf.c:239:18: error: implicit declaration of function 'pci_ioremap_io'; did you mean 'pci_ioremap_bar'? [-Werror=implicit-function-declaration]
239 | status = pci_ioremap_io(cf->socket.io_offset, cf->phys_cf + SZ_4K);
| ^~~~~~~~~~~~~~
| pci_ioremap_bar
cc1: some warnings being treated as errors
vim +239 drivers/pcmcia/omap_cf.c
195
196 /*
197 * NOTE: right now the only board-specific platform_data is
198 * "what chipselect is used". Boards could want more.
199 */
200
201 static int __init omap_cf_probe(struct platform_device *pdev)
202 {
203 unsigned seg;
204 struct omap_cf_socket *cf;
205 int irq;
206 int status;
207 struct resource *res;
208
209 seg = (int) pdev->dev.platform_data;
210 if (seg == 0 || seg > 3)
211 return -ENODEV;
212
213 /* either CFLASH.IREQ (INT_1610_CF) or some GPIO */
214 irq = platform_get_irq(pdev, 0);
215 if (irq < 0)
216 return -EINVAL;
217
218 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
219
220 cf = kzalloc(sizeof *cf, GFP_KERNEL);
221 if (!cf)
222 return -ENOMEM;
223 timer_setup(&cf->timer, omap_cf_timer, 0);
224
225 cf->pdev = pdev;
226 platform_set_drvdata(pdev, cf);
227
228 /* this primarily just shuts up irq handling noise */
229 status = request_irq(irq, omap_cf_irq, IRQF_SHARED,
230 driver_name, cf);
231 if (status < 0)
232 goto fail0;
233 cf->irq = irq;
234 cf->socket.pci_irq = irq;
235 cf->phys_cf = res->start;
236
237 /* pcmcia layer only remaps "real" memory */
238 cf->socket.io_offset = 0x10000;
> 239 status = pci_ioremap_io(cf->socket.io_offset, cf->phys_cf + SZ_4K);
240 if (status) {
241 status = -ENOMEM;
242 goto fail1;
243 }
244
245 if (!request_mem_region(cf->phys_cf, SZ_8K, driver_name)) {
246 status = -ENXIO;
247 goto fail1;
248 }
249
250 /* NOTE: CF conflicts with MMC1 */
251 omap_cfg_reg(W11_1610_CF_CD1);
252 omap_cfg_reg(P11_1610_CF_CD2);
253 omap_cfg_reg(R11_1610_CF_IOIS16);
254 omap_cfg_reg(V10_1610_CF_IREQ);
255 omap_cfg_reg(W10_1610_CF_RESET);
256
257 omap_writew(~(1 << seg), CF_CFG);
258
259 pr_info("%s: cs%d on irq %d\n", driver_name, seg, irq);
260
261 /* CF uses armxor_ck, which is "always" available */
262
263 pr_debug("%s: sts %04x cfg %04x control %04x %s\n", driver_name,
264 omap_readw(CF_STATUS), omap_readw(CF_CFG),
265 omap_readw(CF_CONTROL),
266 omap_cf_present() ? "present" : "(not present)");
267
268 cf->socket.owner = THIS_MODULE;
269 cf->socket.dev.parent = &pdev->dev;
270 cf->socket.ops = &omap_cf_ops;
271 cf->socket.resource_ops = &pccard_static_ops;
272 cf->socket.features = SS_CAP_PCCARD | SS_CAP_STATIC_MAP
273 | SS_CAP_MEM_ALIGN;
274 cf->socket.map_size = SZ_2K;
275 cf->socket.io[0].res = &cf->iomem;
276
277 status = pcmcia_register_socket(&cf->socket);
278 if (status < 0)
279 goto fail2;
280
281 cf->active = 1;
282 mod_timer(&cf->timer, jiffies + POLL_INTERVAL);
283 return 0;
284
285 fail2:
286 release_mem_region(cf->phys_cf, SZ_8K);
287 fail1:
288 free_irq(irq, cf);
289 fail0:
290 kfree(cf);
291 return status;
292 }
293
--
0-DAY CI Kernel Test Service
https://01.org/lkp
More information about the linux-arm-kernel
mailing list