tree:
https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.10
head: 7f83e3957ff9006bacf8f0384e1f4992b8308c59
commit: a2f0fe92566de31d701bbb9952d576b48c1c4dd3 [11827/11855] CHROMIUM: Merge
'v5.10.37' into chromeos-5.10
config: csky-randconfig-r023-20210519 (attached as .config)
compiler: csky-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 remote add chrome-os
https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.10
git checkout a2f0fe92566de31d701bbb9952d576b48c1c4dd3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=csky
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/pinctrl/pinctrl-single.c: In function 'pcs_allocate_pin_table':
> drivers/pinctrl/pinctrl-single.c:725:6: error: variable
'num_pins_in_register' set but not used [-Werror=unused-but-set-variable]
725 | int num_pins_in_register = 0;
| ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/num_pins_in_register +725 drivers/pinctrl/pinctrl-single.c
8b8b091bf07fa7 Tony Lindgren 2012-07-10 712
8b8b091bf07fa7 Tony Lindgren 2012-07-10 713 /**
8b8b091bf07fa7 Tony Lindgren 2012-07-10 714 * pcs_allocate_pin_table() - adds
all the pins for the pinctrl driver
8b8b091bf07fa7 Tony Lindgren 2012-07-10 715 * @pcs: pcs driver instance
8b8b091bf07fa7 Tony Lindgren 2012-07-10 716 *
8b8b091bf07fa7 Tony Lindgren 2012-07-10 717 * In case of errors, resources are
freed in pcs_free_resources.
8b8b091bf07fa7 Tony Lindgren 2012-07-10 718 *
8b8b091bf07fa7 Tony Lindgren 2012-07-10 719 * If your hardware needs holes in
the address space, then just set
8b8b091bf07fa7 Tony Lindgren 2012-07-10 720 * up multiple driver instances.
8b8b091bf07fa7 Tony Lindgren 2012-07-10 721 */
150632b09aadf1 Greg Kroah-Hartman 2012-12-21 722 static int
pcs_allocate_pin_table(struct pcs_device *pcs)
8b8b091bf07fa7 Tony Lindgren 2012-07-10 723 {
8b8b091bf07fa7 Tony Lindgren 2012-07-10 724 int mux_bytes, nr_pins, i;
6f924b0b7cbe2a Manjunathappa, Prakash 2013-05-21 @725 int num_pins_in_register = 0;
8b8b091bf07fa7 Tony Lindgren 2012-07-10 726
8b8b091bf07fa7 Tony Lindgren 2012-07-10 727 mux_bytes = pcs->width /
BITS_PER_BYTE;
4e7e8017a80e18 Manjunathappa, Prakash 2013-05-21 728
4e7e8017a80e18 Manjunathappa, Prakash 2013-05-21 729 if (pcs->bits_per_mux) {
4e7e8017a80e18 Manjunathappa, Prakash 2013-05-21 730 pcs->bits_per_pin =
fls(pcs->fmask);
4e7e8017a80e18 Manjunathappa, Prakash 2013-05-21 731 nr_pins = (pcs->size *
BITS_PER_BYTE) / pcs->bits_per_pin;
6f924b0b7cbe2a Manjunathappa, Prakash 2013-05-21 732 num_pins_in_register =
pcs->width / pcs->bits_per_pin;
4e7e8017a80e18 Manjunathappa, Prakash 2013-05-21 733 } else {
8b8b091bf07fa7 Tony Lindgren 2012-07-10 734 nr_pins = pcs->size /
mux_bytes;
4e7e8017a80e18 Manjunathappa, Prakash 2013-05-21 735 }
8b8b091bf07fa7 Tony Lindgren 2012-07-10 736
8b8b091bf07fa7 Tony Lindgren 2012-07-10 737 dev_dbg(pcs->dev,
"allocating %i pins\n", nr_pins);
a86854d0c599b3 Kees Cook 2018-06-12 738 pcs->pins.pa =
devm_kcalloc(pcs->dev,
a86854d0c599b3 Kees Cook 2018-06-12 739 nr_pins,
sizeof(*pcs->pins.pa),
8b8b091bf07fa7 Tony Lindgren 2012-07-10 740 GFP_KERNEL);
8b8b091bf07fa7 Tony Lindgren 2012-07-10 741 if (!pcs->pins.pa)
8b8b091bf07fa7 Tony Lindgren 2012-07-10 742 return -ENOMEM;
8b8b091bf07fa7 Tony Lindgren 2012-07-10 743
8b8b091bf07fa7 Tony Lindgren 2012-07-10 744 pcs->desc.pins =
pcs->pins.pa;
8b8b091bf07fa7 Tony Lindgren 2012-07-10 745 pcs->desc.npins = nr_pins;
8b8b091bf07fa7 Tony Lindgren 2012-07-10 746
8b8b091bf07fa7 Tony Lindgren 2012-07-10 747 for (i = 0; i <
pcs->desc.npins; i++) {
8b8b091bf07fa7 Tony Lindgren 2012-07-10 748 unsigned offset;
8b8b091bf07fa7 Tony Lindgren 2012-07-10 749 int res;
8b8b091bf07fa7 Tony Lindgren 2012-07-10 750
da40d5fec5d70e Hanna Hawa 2021-03-19 751 offset =
pcs_pin_reg_offset_get(pcs, i);
353fcebf49e24e Hanna Hawa 2021-03-19 752 res = pcs_add_pin(pcs, offset);
8b8b091bf07fa7 Tony Lindgren 2012-07-10 753 if (res < 0) {
8b8b091bf07fa7 Tony Lindgren 2012-07-10 754 dev_err(pcs->dev, "error
adding pins: %i\n", res);
8b8b091bf07fa7 Tony Lindgren 2012-07-10 755 return res;
8b8b091bf07fa7 Tony Lindgren 2012-07-10 756 }
8b8b091bf07fa7 Tony Lindgren 2012-07-10 757 }
8b8b091bf07fa7 Tony Lindgren 2012-07-10 758
8b8b091bf07fa7 Tony Lindgren 2012-07-10 759 return 0;
8b8b091bf07fa7 Tony Lindgren 2012-07-10 760 }
8b8b091bf07fa7 Tony Lindgren 2012-07-10 761
:::::: The code at line 725 was first introduced by commit
:::::: 6f924b0b7cbe2a3d9c08f6134343fd366c35fdfa pinctrl: pinctrl-single: pin names for
pinctrl-single.bits
:::::: TO: Manjunathappa, Prakash <prakash.pm(a)ti.com>
:::::: CC: Linus Walleij <linus.walleij(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org