From: kernel test robot <lkp@intel.com>
To: "Rafał Miłecki" <zajec5@gmail.com>,
"Rob Herring" <robh+dt@kernel.org>,
"Linus Walleij" <linus.walleij@linaro.org>
Cc: kbuild-all@lists.01.org,
"Álvaro Fernández Rojas" <noltari@gmail.com>,
"Jonas Gorski" <jonas.gorski@gmail.com>,
"Randy Dunlap" <rdunlap@infradead.org>,
"Florian Fainelli" <f.fainelli@gmail.com>,
linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
bcm-kernel-feedback-list@broadcom.com,
"Rafał Miłecki" <rafal@milecki.pl>
Subject: Re: [PATCH 2/2] pinctrl: bcm: add driver for BCM4908 pinmux
Date: Thu, 16 Dec 2021 22:26:11 +0800 [thread overview]
Message-ID: <202112162229.R65wpBRJ-lkp@intel.com> (raw)
In-Reply-To: <20211215204753.5956-2-zajec5@gmail.com>
Hi "Rafał,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linusw-pinctrl/devel]
[also build test WARNING on robh/for-next linus/master v5.16-rc5 next-20211215]
[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]
url: https://github.com/0day-ci/linux/commits/Rafa-Mi-ecki/dt-bindings-pinctrl-Add-binding-for-BCM4908-pinctrl/20211216-044855
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
config: alpha-randconfig-s031-20211216 (https://download.01.org/0day-ci/archive/20211216/202112162229.R65wpBRJ-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/52ad0e1851a5d242cde2829eca853a7369807c42
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Rafa-Mi-ecki/dt-bindings-pinctrl-Add-binding-for-BCM4908-pinctrl/20211216-044855
git checkout 52ad0e1851a5d242cde2829eca853a7369807c42
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=alpha SHELL=/bin/bash drivers/perf/ drivers/pinctrl/bcm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/pinctrl/bcm/pinctrl-bcm4908.c:542:53: sparse: sparse: incorrect type in argument 3 (different modifiers) @@ expected char const **groups @@ got char const *const *const groups @@
drivers/pinctrl/bcm/pinctrl-bcm4908.c:542:53: sparse: expected char const **groups
drivers/pinctrl/bcm/pinctrl-bcm4908.c:542:53: sparse: got char const *const *const groups
vim +542 drivers/pinctrl/bcm/pinctrl-bcm4908.c
468
469 static int bcm4908_pinctrl_probe(struct platform_device *pdev)
470 {
471 struct device *dev = &pdev->dev;
472 struct bcm4908_pinctrl *bcm4908_pinctrl;
473 struct pinctrl_desc *pctldesc;
474 struct pinctrl_pin_desc *pins;
475 int i;
476
477 bcm4908_pinctrl = devm_kzalloc(dev, sizeof(*bcm4908_pinctrl), GFP_KERNEL);
478 if (!bcm4908_pinctrl)
479 return -ENOMEM;
480 pctldesc = &bcm4908_pinctrl->pctldesc;
481 platform_set_drvdata(pdev, bcm4908_pinctrl);
482
483 /* Set basic properties */
484
485 bcm4908_pinctrl->dev = dev;
486
487 bcm4908_pinctrl->base = devm_platform_ioremap_resource(pdev, 0);
488 if (IS_ERR(bcm4908_pinctrl->base)) {
489 dev_err(dev, "Failed to map pinctrl regs\n");
490 return PTR_ERR(bcm4908_pinctrl->base);
491 }
492
493 memcpy(pctldesc, &bcm4908_pinctrl_desc, sizeof(*pctldesc));
494
495 /* Set pinctrl properties */
496
497 pins = devm_kcalloc(dev, BCM4908_NUM_PINS,
498 sizeof(struct pinctrl_pin_desc), GFP_KERNEL);
499 if (!pins)
500 return -ENOMEM;
501 for (i = 0; i < BCM4908_NUM_PINS; i++) {
502 pins[i].number = i;
503 pins[i].name = devm_kasprintf(dev, GFP_KERNEL, "pin%d", i);
504 if (!pins[i].name)
505 return -ENOMEM;
506 }
507 pctldesc->pins = pins;
508 pctldesc->npins = BCM4908_NUM_PINS;
509
510 /* Register */
511
512 bcm4908_pinctrl->pctldev = devm_pinctrl_register(dev, pctldesc, bcm4908_pinctrl);
513 if (IS_ERR(bcm4908_pinctrl->pctldev)) {
514 dev_err(dev, "Failed to register pinctrl\n");
515 return PTR_ERR(bcm4908_pinctrl->pctldev);
516 }
517
518 /* Groups */
519
520 for (i = 0; i < ARRAY_SIZE(bcm4908_pinctrl_grps); i++) {
521 const struct bcm4908_pinctrl_grp *group = &bcm4908_pinctrl_grps[i];
522 int *pins;
523 int j;
524
525 pins = devm_kcalloc(dev, group->num_pins, sizeof(*pins), GFP_KERNEL);
526 if (!pins)
527 return -ENOMEM;
528 for (j = 0; j < group->num_pins; j++)
529 pins[j] = group->pins[j].number;
530
531 pinctrl_generic_add_group(bcm4908_pinctrl->pctldev, group->name,
532 pins, group->num_pins, (void *)group);
533 }
534
535 /* Functions */
536
537 for (i = 0; i < ARRAY_SIZE(bcm4908_pinctrl_functions); i++) {
538 const struct bcm4908_pinctrl_function *function = &bcm4908_pinctrl_functions[i];
539
540 pinmux_generic_add_function(bcm4908_pinctrl->pctldev,
541 function->name,
> 542 function->groups,
543 function->num_groups, NULL);
544 }
545
546 return 0;
547 }
548
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next prev parent reply other threads:[~2021-12-16 14:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-15 20:47 [PATCH 1/2] dt-bindings: pinctrl: Add binding for BCM4908 pinctrl Rafał Miłecki
2021-12-15 20:47 ` [PATCH 2/2] pinctrl: bcm: add driver for BCM4908 pinmux Rafał Miłecki
2021-12-16 6:34 ` kernel test robot
2021-12-16 14:26 ` kernel test robot [this message]
2021-12-16 19:55 ` Andy Shevchenko
2021-12-22 10:19 ` Rafał Miłecki
2021-12-22 12:12 ` Andy Shevchenko
2021-12-15 22:27 ` [PATCH 1/2] dt-bindings: pinctrl: Add binding for BCM4908 pinctrl Rob Herring
2021-12-15 22:35 ` Rafał Miłecki
2021-12-16 15:32 ` Rob Herring
2021-12-16 15:35 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202112162229.R65wpBRJ-lkp@intel.com \
--to=lkp@intel.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=jonas.gorski@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=noltari@gmail.com \
--cc=rafal@milecki.pl \
--cc=rdunlap@infradead.org \
--cc=robh+dt@kernel.org \
--cc=zajec5@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).