Re: drivers/pinctrl/intel/pinctrl-merrifield.c:518: error: implicit declaration of function 'readl'

From: Andy Shevchenko
Date: Mon Aug 15 2016 - 05:10:39 EST


On Sun, 2016-08-14 at 08:05 +0800, kbuild test robot wrote:
> Hi Andy,
>
> FYI, the error/warning still remains.

Linus, can you apply the fix for next v4.8-rcX?

>
> tree:ÂÂÂhttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
> .git master
> head:ÂÂÂ329f4152911c276b074bec75a0443f88821afdb7
> commit: 4e80c8f505741cbdef3e10862ea36057e8d85e7c pinctrl: intel: Add
> Intel Merrifield pin controller support
> date:ÂÂÂ7 weeks ago
> config: x86_64-randconfig-s2-08140746 (attached as .config)
> compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
> reproduce:
> ÂÂÂÂÂÂÂÂgit checkout 4e80c8f505741cbdef3e10862ea36057e8d85e7c
> ÂÂÂÂÂÂÂÂ# save the attached .config to linux build tree
> ÂÂÂÂÂÂÂÂmake ARCH=x86_64Â
>
> All errors (new ones prefixed by >>):
>
> ÂÂÂdrivers/pinctrl/intel/pinctrl-merrifield.c: In function
> 'mrfld_pin_dbg_show':
> >
> > >
> > > drivers/pinctrl/intel/pinctrl-merrifield.c:518: error: implicit
> > > declaration of function 'readl'
> ÂÂÂdrivers/pinctrl/intel/pinctrl-merrifield.c: In function
> 'mrfld_update_bufcfg':
> >
> > >
> > > drivers/pinctrl/intel/pinctrl-merrifield.c:575: error: implicit
> > > declaration of function 'writel'
>
> vim +/readl +518 drivers/pinctrl/intel/pinctrl-merrifield.c
>
> ÂÂÂ512 if (!mrfld_buf_available(mp, pin)) {
> ÂÂÂ513 seq_puts(s, "not available");
> ÂÂÂ514 return;
> ÂÂÂ515 }
> ÂÂÂ516
> ÂÂÂ517 bufcfg = mrfld_get_bufcfg(mp, pin);
> Â> 518 value = readl(bufcfg);
> ÂÂÂ519
> ÂÂÂ520 mode = (value & BUFCFG_PINMODE_MASK) >>
> BUFCFG_PINMODE_SHIFT;
> ÂÂÂ521 if (!mode)
> ÂÂÂ522 seq_puts(s, "GPIO ");
> ÂÂÂ523 else
> ÂÂÂ524 seq_printf(s, "mode %d ", mode);
> ÂÂÂ525
> ÂÂÂ526 seq_printf(s, "0x%08x", value);
> ÂÂÂ527 }
> ÂÂÂ528
> ÂÂÂ529 static const struct pinctrl_ops mrfld_pinctrl_ops = {
> ÂÂÂ530 .get_groups_count = mrfld_get_groups_count,
> ÂÂÂ531 .get_group_name = mrfld_get_group_name,
> ÂÂÂ532 .get_group_pins = mrfld_get_group_pins,
> ÂÂÂ533 .pin_dbg_show = mrfld_pin_dbg_show,
> ÂÂÂ534 };
> ÂÂÂ535
> ÂÂÂ536 static int mrfld_get_functions_count(struct pinctrl_dev
> *pctldev)
> ÂÂÂ537 {
> ÂÂÂ538 struct mrfld_pinctrl *mp =
> pinctrl_dev_get_drvdata(pctldev);
> ÂÂÂ539
> ÂÂÂ540 return mp->nfunctions;
> ÂÂÂ541 }
> ÂÂÂ542
> ÂÂÂ543 static const char *mrfld_get_function_name(struct
> pinctrl_dev *pctldev,
> ÂÂÂ544 ÂÂÂunsigned int
> function)
> ÂÂÂ545 {
> ÂÂÂ546 struct mrfld_pinctrl *mp =
> pinctrl_dev_get_drvdata(pctldev);
> ÂÂÂ547
> ÂÂÂ548 return mp->functions[function].name;
> ÂÂÂ549 }
> ÂÂÂ550
> ÂÂÂ551 static int mrfld_get_function_groups(struct pinctrl_dev
> *pctldev,
> ÂÂÂ552 ÂÂÂÂÂunsigned int
> function,
> ÂÂÂ553 ÂÂÂÂÂconst char * const
> **groups,
> ÂÂÂ554 ÂÂÂÂÂunsigned int *
> const ngroups)
> ÂÂÂ555 {
> ÂÂÂ556 struct mrfld_pinctrl *mp =
> pinctrl_dev_get_drvdata(pctldev);
> ÂÂÂ557
> ÂÂÂ558 *groups = mp->functions[function].groups;
> ÂÂÂ559 *ngroups = mp->functions[function].ngroups;
> ÂÂÂ560 return 0;
> ÂÂÂ561 }
> ÂÂÂ562
> ÂÂÂ563 static void mrfld_update_bufcfg(struct mrfld_pinctrl
> *mp, unsigned int pin,
> ÂÂÂ564 u32 bits, u32 mask)
> ÂÂÂ565 {
> ÂÂÂ566 void __iomem *bufcfg;
> ÂÂÂ567 u32 value;
> ÂÂÂ568
> ÂÂÂ569 bufcfg = mrfld_get_bufcfg(mp, pin);
> ÂÂÂ570 value = readl(bufcfg);
> ÂÂÂ571
> ÂÂÂ572 value &= ~mask;
> ÂÂÂ573 value |= bits & mask;
> ÂÂÂ574
> Â> 575 writel(value, bufcfg);
> ÂÂÂ576 }
> ÂÂÂ577
> ÂÂÂ578 static int mrfld_pinmux_set_mux(struct pinctrl_dev
> *pctldev,
>
> ---
> 0-DAY kernel test infrastructureÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂOpen Source Technology
> Center
> https://lists.01.org/pipermail/kbuild-allÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂIntel
> Corporation

--
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy