Content-Type: multipart/mixed; boundary="===============7239418746472924789==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH 2/2] pinctrl: bcm: add driver for BCM4908 pinmux Date: Thu, 16 Dec 2021 22:26:11 +0800 Message-ID: <202112162229.R65wpBRJ-lkp@intel.com> In-Reply-To: <20211215204753.5956-2-zajec5@gmail.com> List-Id: --===============7239418746472924789== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi "Rafa=C5=82, 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-20211= 215] [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-p= inctrl-Add-binding-for-BCM4908-pinctrl/20211216-044855 base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctr= l.git devel config: alpha-randconfig-s031-20211216 (https://download.01.org/0day-ci/arc= hive/20211216/202112162229.R65wpBRJ-lkp(a)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/52ad0e1851a5d242cde2829ec= a853a7369807c42 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Rafa-Mi-ecki/dt-bindings-pinctrl-A= dd-binding-for-BCM4908-pinctrl/20211216-044855 git checkout 52ad0e1851a5d242cde2829eca853a7369807c42 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=3Dbuild_dir ARCH=3Da= lpha SHELL=3D/bin/bash drivers/perf/ drivers/pinctrl/bcm/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot 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 **group= s @@ 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 =3D &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 =3D devm_kzalloc(dev, sizeof(*bcm4908_pinctrl), GFP= _KERNEL); 478 if (!bcm4908_pinctrl) 479 return -ENOMEM; 480 pctldesc =3D &bcm4908_pinctrl->pctldesc; 481 platform_set_drvdata(pdev, bcm4908_pinctrl); 482 = 483 /* Set basic properties */ 484 = 485 bcm4908_pinctrl->dev =3D dev; 486 = 487 bcm4908_pinctrl->base =3D 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 =3D devm_kcalloc(dev, BCM4908_NUM_PINS, 498 sizeof(struct pinctrl_pin_desc), GFP_KERNEL); 499 if (!pins) 500 return -ENOMEM; 501 for (i =3D 0; i < BCM4908_NUM_PINS; i++) { 502 pins[i].number =3D i; 503 pins[i].name =3D devm_kasprintf(dev, GFP_KERNEL, "pin%d", i); 504 if (!pins[i].name) 505 return -ENOMEM; 506 } 507 pctldesc->pins =3D pins; 508 pctldesc->npins =3D BCM4908_NUM_PINS; 509 = 510 /* Register */ 511 = 512 bcm4908_pinctrl->pctldev =3D devm_pinctrl_register(dev, pctldesc, b= cm4908_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 =3D 0; i < ARRAY_SIZE(bcm4908_pinctrl_grps); i++) { 521 const struct bcm4908_pinctrl_grp *group =3D &bcm4908_pinctrl_grps[= i]; 522 int *pins; 523 int j; 524 = 525 pins =3D devm_kcalloc(dev, group->num_pins, sizeof(*pins), GFP_KER= NEL); 526 if (!pins) 527 return -ENOMEM; 528 for (j =3D 0; j < group->num_pins; j++) 529 pins[j] =3D 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 =3D 0; i < ARRAY_SIZE(bcm4908_pinctrl_functions); i++) { 538 const struct bcm4908_pinctrl_function *function =3D &bcm4908_pinct= rl_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(a)lists.01.org --===============7239418746472924789==--