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

From: Andy Shevchenko
Date: Tue Aug 09 2016 - 11:51:48 EST


On Mon, 2016-08-08 at 09:41 +0800, kbuild test robot wrote:
> tree:ÂÂÂhttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
> .git master
> head:ÂÂÂ29b4817d4018df78086157ea3a55c1d9424a7cfc
> commit: 4e80c8f505741cbdef3e10862ea36057e8d85e7c pinctrl: intel: Add
> Intel Merrifield pin controller support
> date:ÂÂÂ6 weeks ago
> config: x86_64-randconfig-x012-201632 (attached as .config)
> compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
> ÂÂÂÂÂÂÂÂgit checkout 4e80c8f505741cbdef3e10862ea36057e8d85e7c
> ÂÂÂÂÂÂÂÂ# save the attached .config to linux build tree
> ÂÂÂÂÂÂÂÂmake ARCH=x86_64Â
>
> All errors (new ones prefixed by >>):

Patch was sent quite before this report has been generated.
https://patchwork.ozlabs.org/patch/654916/


>
> ÂÂÂdrivers/pinctrl/intel/pinctrl-merrifield.c: In function
> 'mrfld_pin_dbg_show':
> > > drivers/pinctrl/intel/pinctrl-merrifield.c:518:10: error: implicit
> > > declaration of function 'readl' [-Werror=implicit-function-
> > > declaration]
> ÂÂÂÂÂvalue = readl(bufcfg);
> ÂÂÂÂÂÂÂÂÂÂÂÂÂ^~~~~
> ÂÂÂdrivers/pinctrl/intel/pinctrl-merrifield.c: In function
> 'mrfld_update_bufcfg':
> > > drivers/pinctrl/intel/pinctrl-merrifield.c:575:2: error: implicit
> > > declaration of function 'writel' [-Werror=implicit-function-
> > > declaration]
> ÂÂÂÂÂwritel(value, bufcfg);
> ÂÂÂÂÂ^~~~~~
> ÂÂÂcc1: some warnings being treated as errors
>
> 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