[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202210072115.yhuuUUyW-lkp@intel.com>
Date: Fri, 7 Oct 2022 21:33:09 +0800
From: kernel test robot <lkp@...el.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Basavaraj Natikar <Basavaraj.Natikar@....com>,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [rft, PATCH v1 1/1] pinctrl: Clean up headers
Hi Andy,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linusw-pinctrl/devel]
[also build test WARNING on linus/master v6.0 next-20221007]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/pinctrl-Clean-up-headers/20221007-183311
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
config: x86_64-randconfig-a002-20221003
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/intel-lab-lkp/linux/commit/5b392edeea764a64953fbab65c9a06b2745ebdd7
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Andy-Shevchenko/pinctrl-Clean-up-headers/20221007-183311
git checkout 5b392edeea764a64953fbab65c9a06b2745ebdd7
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/pinctrl/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/pinctrl/pinmux.c:34:46: error: incomplete definition of type 'struct pinctrl_desc'
const struct pinmux_ops *ops = pctldev->desc->pmxops;
~~~~~~~~~~~~~^
drivers/pinctrl/core.h:44:9: note: forward declaration of 'struct pinctrl_desc'
struct pinctrl_desc *desc;
^
drivers/pinctrl/pinmux.c:87:46: error: incomplete definition of type 'struct pinctrl_desc'
const struct pinmux_ops *ops = pctldev->desc->pmxops;
~~~~~~~~~~~~~^
drivers/pinctrl/core.h:44:9: note: forward declaration of 'struct pinctrl_desc'
struct pinctrl_desc *desc;
^
drivers/pinctrl/pinmux.c:113:46: error: incomplete definition of type 'struct pinctrl_desc'
const struct pinmux_ops *ops = pctldev->desc->pmxops;
~~~~~~~~~~~~~^
drivers/pinctrl/core.h:44:9: note: forward declaration of 'struct pinctrl_desc'
struct pinctrl_desc *desc;
^
drivers/pinctrl/pinmux.c:210:46: error: incomplete definition of type 'struct pinctrl_desc'
const struct pinmux_ops *ops = pctldev->desc->pmxops;
~~~~~~~~~~~~~^
drivers/pinctrl/core.h:44:9: note: forward declaration of 'struct pinctrl_desc'
struct pinctrl_desc *desc;
^
drivers/pinctrl/pinmux.c:270:46: error: incomplete definition of type 'struct pinctrl_gpio_range'
owner = kasprintf(GFP_KERNEL, "%s:%d", range->name, gpio);
~~~~~^
include/linux/pinctrl/pinmux.h:17:8: note: forward declaration of 'struct pinctrl_gpio_range'
struct pinctrl_gpio_range;
^
drivers/pinctrl/pinmux.c:310:21: error: incomplete definition of type 'struct pinctrl_desc'
ops = pctldev->desc->pmxops;
~~~~~~~~~~~~~^
drivers/pinctrl/core.h:44:9: note: forward declaration of 'struct pinctrl_desc'
struct pinctrl_desc *desc;
^
drivers/pinctrl/pinmux.c:323:46: error: incomplete definition of type 'struct pinctrl_desc'
const struct pinmux_ops *ops = pctldev->desc->pmxops;
~~~~~~~~~~~~~^
drivers/pinctrl/core.h:44:9: note: forward declaration of 'struct pinctrl_desc'
struct pinctrl_desc *desc;
^
drivers/pinctrl/pinmux.c:344:49: error: incomplete definition of type 'struct pinctrl_desc'
const struct pinmux_ops *pmxops = pctldev->desc->pmxops;
~~~~~~~~~~~~~^
drivers/pinctrl/core.h:44:9: note: forward declaration of 'struct pinctrl_desc'
struct pinctrl_desc *desc;
^
drivers/pinctrl/pinmux.c:408:51: error: incomplete definition of type 'struct pinctrl_desc'
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
~~~~~~~~~~~~~^
drivers/pinctrl/core.h:44:9: note: forward declaration of 'struct pinctrl_desc'
struct pinctrl_desc *desc;
^
drivers/pinctrl/pinmux.c:409:46: error: incomplete definition of type 'struct pinctrl_desc'
const struct pinmux_ops *ops = pctldev->desc->pmxops;
~~~~~~~~~~~~~^
drivers/pinctrl/core.h:44:9: note: forward declaration of 'struct pinctrl_desc'
struct pinctrl_desc *desc;
^
drivers/pinctrl/pinmux.c:416:13: error: incomplete definition of type 'struct pinctrl_ops'
if (pctlops->get_group_pins)
~~~~~~~^
drivers/pinctrl/pinmux.c:408:15: note: forward declaration of 'struct pinctrl_ops'
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
^
drivers/pinctrl/pinmux.c:417:16: error: incomplete definition of type 'struct pinctrl_ops'
ret = pctlops->get_group_pins(pctldev, setting->data.mux.group,
~~~~~~~^
drivers/pinctrl/pinmux.c:408:15: note: forward declaration of 'struct pinctrl_ops'
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
^
drivers/pinctrl/pinmux.c:424:18: error: incomplete definition of type 'struct pinctrl_ops'
gname = pctlops->get_group_name(pctldev,
~~~~~~~^
drivers/pinctrl/pinmux.c:408:15: note: forward declaration of 'struct pinctrl_ops'
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
^
drivers/pinctrl/pinmux.c:441:19: error: incomplete definition of type 'struct pinctrl_ops'
gname = pctlops->get_group_name(pctldev,
~~~~~~~^
drivers/pinctrl/pinmux.c:408:15: note: forward declaration of 'struct pinctrl_ops'
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
^
drivers/pinctrl/pinmux.c:447:5: error: implicit declaration of function 'pinctrl_dev_get_name' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
pinctrl_dev_get_name(pctldev));
^
>> drivers/pinctrl/pinmux.c:447:5: warning: format specifies type 'char *' but the argument has type 'int' [-Wformat]
pinctrl_dev_get_name(pctldev));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:144:65: note: expanded from macro 'dev_err'
dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
_p_func(dev, fmt, ##__VA_ARGS__); \
~~~ ^~~~~~~~~~~
drivers/pinctrl/pinmux.c:489:51: error: incomplete definition of type 'struct pinctrl_desc'
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
~~~~~~~~~~~~~^
drivers/pinctrl/core.h:44:9: note: forward declaration of 'struct pinctrl_desc'
struct pinctrl_desc *desc;
^
drivers/pinctrl/pinmux.c:496:13: error: incomplete definition of type 'struct pinctrl_ops'
if (pctlops->get_group_pins)
~~~~~~~^
drivers/pinctrl/pinmux.c:489:15: note: forward declaration of 'struct pinctrl_ops'
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
^
drivers/pinctrl/pinmux.c:497:16: error: incomplete definition of type 'struct pinctrl_ops'
ret = pctlops->get_group_pins(pctldev, setting->data.mux.group,
~~~~~~~^
drivers/pinctrl/pinmux.c:489:15: note: forward declaration of 'struct pinctrl_ops'
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
^
drivers/pinctrl/pinmux.c:503:18: error: incomplete definition of type 'struct pinctrl_ops'
gname = pctlops->get_group_name(pctldev,
~~~~~~~^
drivers/pinctrl/pinmux.c:489:15: note: forward declaration of 'struct pinctrl_ops'
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
vim +447 drivers/pinctrl/pinmux.c
2744e8afb3b763 Linus Walleij 2011-05-02 404
3f713b7c223ebe Masahiro Yamada 2017-08-04 405 int pinmux_enable_setting(const struct pinctrl_setting *setting)
2744e8afb3b763 Linus Walleij 2011-05-02 406 {
7ecdb16fe63e5b Stephen Warren 2012-03-02 407 struct pinctrl_dev *pctldev = setting->pctldev;
ba110d90c08d96 Stephen Warren 2012-03-02 408 const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
2744e8afb3b763 Linus Walleij 2011-05-02 409 const struct pinmux_ops *ops = pctldev->desc->pmxops;
e5b3b2d9ed2026 Antoine Tenart 2014-04-10 410 int ret = 0;
e5b3b2d9ed2026 Antoine Tenart 2014-04-10 411 const unsigned *pins = NULL;
e5b3b2d9ed2026 Antoine Tenart 2014-04-10 412 unsigned num_pins = 0;
ba110d90c08d96 Stephen Warren 2012-03-02 413 int i;
ba110d90c08d96 Stephen Warren 2012-03-02 414 struct pin_desc *desc;
ba110d90c08d96 Stephen Warren 2012-03-02 415
e5b3b2d9ed2026 Antoine Tenart 2014-04-10 416 if (pctlops->get_group_pins)
ba110d90c08d96 Stephen Warren 2012-03-02 417 ret = pctlops->get_group_pins(pctldev, setting->data.mux.group,
ba110d90c08d96 Stephen Warren 2012-03-02 418 &pins, &num_pins);
e5b3b2d9ed2026 Antoine Tenart 2014-04-10 419
ba110d90c08d96 Stephen Warren 2012-03-02 420 if (ret) {
1c8e794432c2ee Linus Walleij 2013-08-14 421 const char *gname;
1c8e794432c2ee Linus Walleij 2013-08-14 422
ba110d90c08d96 Stephen Warren 2012-03-02 423 /* errors only affect debug data, so just warn */
1c8e794432c2ee Linus Walleij 2013-08-14 424 gname = pctlops->get_group_name(pctldev,
ba110d90c08d96 Stephen Warren 2012-03-02 425 setting->data.mux.group);
1c8e794432c2ee Linus Walleij 2013-08-14 426 dev_warn(pctldev->dev,
1c8e794432c2ee Linus Walleij 2013-08-14 427 "could not get pins for group %s\n",
1c8e794432c2ee Linus Walleij 2013-08-14 428 gname);
ba110d90c08d96 Stephen Warren 2012-03-02 429 num_pins = 0;
ba110d90c08d96 Stephen Warren 2012-03-02 430 }
ba110d90c08d96 Stephen Warren 2012-03-02 431
1a78958dc212f3 Linus Walleij 2012-10-17 432 /* Try to allocate all pins in this group, one by one */
1a78958dc212f3 Linus Walleij 2012-10-17 433 for (i = 0; i < num_pins; i++) {
1a78958dc212f3 Linus Walleij 2012-10-17 434 ret = pin_request(pctldev, pins[i], setting->dev_name, NULL);
1a78958dc212f3 Linus Walleij 2012-10-17 435 if (ret) {
1c8e794432c2ee Linus Walleij 2013-08-14 436 const char *gname;
1c8e794432c2ee Linus Walleij 2013-08-14 437 const char *pname;
1c8e794432c2ee Linus Walleij 2013-08-14 438
1c8e794432c2ee Linus Walleij 2013-08-14 439 desc = pin_desc_get(pctldev, pins[i]);
1c8e794432c2ee Linus Walleij 2013-08-14 440 pname = desc ? desc->name : "non-existing";
1c8e794432c2ee Linus Walleij 2013-08-14 441 gname = pctlops->get_group_name(pctldev,
1c8e794432c2ee Linus Walleij 2013-08-14 442 setting->data.mux.group);
1a78958dc212f3 Linus Walleij 2012-10-17 443 dev_err(pctldev->dev,
1c8e794432c2ee Linus Walleij 2013-08-14 444 "could not request pin %d (%s) from group %s "
1c8e794432c2ee Linus Walleij 2013-08-14 445 " on device %s\n",
1c8e794432c2ee Linus Walleij 2013-08-14 446 pins[i], pname, gname,
1c8e794432c2ee Linus Walleij 2013-08-14 @447 pinctrl_dev_get_name(pctldev));
e38d457de7be63 Axel Lin 2012-11-10 448 goto err_pin_request;
1a78958dc212f3 Linus Walleij 2012-10-17 449 }
1a78958dc212f3 Linus Walleij 2012-10-17 450 }
1a78958dc212f3 Linus Walleij 2012-10-17 451
1a78958dc212f3 Linus Walleij 2012-10-17 452 /* Now that we have acquired the pins, encode the mux setting */
ba110d90c08d96 Stephen Warren 2012-03-02 453 for (i = 0; i < num_pins; i++) {
ba110d90c08d96 Stephen Warren 2012-03-02 454 desc = pin_desc_get(pctldev, pins[i]);
ba110d90c08d96 Stephen Warren 2012-03-02 455 if (desc == NULL) {
ba110d90c08d96 Stephen Warren 2012-03-02 456 dev_warn(pctldev->dev,
ba110d90c08d96 Stephen Warren 2012-03-02 457 "could not get pin desc for pin %d\n",
ba110d90c08d96 Stephen Warren 2012-03-02 458 pins[i]);
ba110d90c08d96 Stephen Warren 2012-03-02 459 continue;
ba110d90c08d96 Stephen Warren 2012-03-02 460 }
ba110d90c08d96 Stephen Warren 2012-03-02 461 desc->mux_setting = &(setting->data.mux);
ba110d90c08d96 Stephen Warren 2012-03-02 462 }
2744e8afb3b763 Linus Walleij 2011-05-02 463
03e9f0cac5da6a Linus Walleij 2014-09-03 464 ret = ops->set_mux(pctldev, setting->data.mux.func,
1e2082b5207217 Stephen Warren 2012-03-02 465 setting->data.mux.group);
e38d457de7be63 Axel Lin 2012-11-10 466
e38d457de7be63 Axel Lin 2012-11-10 467 if (ret)
03e9f0cac5da6a Linus Walleij 2014-09-03 468 goto err_set_mux;
e38d457de7be63 Axel Lin 2012-11-10 469
e38d457de7be63 Axel Lin 2012-11-10 470 return 0;
e38d457de7be63 Axel Lin 2012-11-10 471
03e9f0cac5da6a Linus Walleij 2014-09-03 472 err_set_mux:
e38d457de7be63 Axel Lin 2012-11-10 473 for (i = 0; i < num_pins; i++) {
e38d457de7be63 Axel Lin 2012-11-10 474 desc = pin_desc_get(pctldev, pins[i]);
e38d457de7be63 Axel Lin 2012-11-10 475 if (desc)
e38d457de7be63 Axel Lin 2012-11-10 476 desc->mux_setting = NULL;
e38d457de7be63 Axel Lin 2012-11-10 477 }
e38d457de7be63 Axel Lin 2012-11-10 478 err_pin_request:
e38d457de7be63 Axel Lin 2012-11-10 479 /* On error release all taken pins */
e38d457de7be63 Axel Lin 2012-11-10 480 while (--i >= 0)
e38d457de7be63 Axel Lin 2012-11-10 481 pin_free(pctldev, pins[i], NULL);
e38d457de7be63 Axel Lin 2012-11-10 482
e38d457de7be63 Axel Lin 2012-11-10 483 return ret;
befe5bdfbb698b Linus Walleij 2012-02-09 484 }
2744e8afb3b763 Linus Walleij 2011-05-02 485
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (137024 bytes)
Powered by blists - more mailing lists