lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202311230820.oBQop844-lkp@intel.com>
Date:   Thu, 23 Nov 2023 11:11:21 +0800
From:   kernel test robot <lkp@...el.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Biju Das <biju.das.jz@...renesas.com>,
        Claudiu Beznea <claudiu.beznea.uj@...renesas.com>,
        Jianlong Huang <jianlong.huang@...rfivetech.com>,
        linux-arm-kernel@...ts.infradead.org, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-mediatek@...ts.infradead.org,
        openbmc@...ts.ozlabs.org, linux-mips@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, linux-renesas-soc@...r.kernel.org
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        Ray Jui <rjui@...adcom.com>,
        Scott Branden <sbranden@...adcom.com>,
        Broadcom internal kernel review list 
        <bcm-kernel-feedback-list@...adcom.com>,
        Dong Aisheng <aisheng.dong@....com>,
        Fabio Estevam <festevam@...il.com>,
        Shawn Guo <shawnguo@...nel.org>, Jacky Bai <ping.bai@....com>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        NXP Linux Team <linux-imx@....com>,
        Sean Wang <sean.wang@...nel.org>,
        Jonathan Neuschäfer <j.neuschaefer@....net>
Subject: Re: [PATCH v1 01/17] pinctrl: equilibrium: Convert to use struct
 pingroup

Hi Andy,

kernel test robot noticed the following build errors:

[auto build test ERROR on linusw-pinctrl/devel]
[also build test ERROR on linusw-pinctrl/for-next geert-renesas-drivers/renesas-pinctrl pinctrl-samsung/for-next linus/master v6.7-rc2 next-20231122]
[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-equilibrium-Convert-to-use-struct-pingroup/20231123-005932
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
patch link:    https://lore.kernel.org/r/20231122164040.2262742-2-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v1 01/17] pinctrl: equilibrium: Convert to use struct pingroup
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20231123/202311230820.oBQop844-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231123/202311230820.oBQop844-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311230820.oBQop844-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/pinctrl/pinctrl-equilibrium.c:750:17: error: read-only variable is not assignable
                           grp->pins[j] = pin_id;
                           ~~~~~~~~~~~~ ^
>> drivers/pinctrl/pinctrl-equilibrium.c:761:23: error: no member named 'num_pins' in 'struct pingroup'
                                                   grp->pins, grp->num_pins,
                                                              ~~~  ^
   2 errors generated.


vim +750 drivers/pinctrl/pinctrl-equilibrium.c

   702	
   703	static int eqbr_build_groups(struct eqbr_pinctrl_drv_data *drvdata)
   704	{
   705		struct device *dev = drvdata->dev;
   706		struct device_node *node = dev->of_node;
   707		unsigned int *pinmux, pin_id, pinmux_id;
   708		struct pingroup group, *grp = &group;
   709		struct device_node *np;
   710		struct property *prop;
   711		int j, err;
   712	
   713		for_each_child_of_node(node, np) {
   714			prop = of_find_property(np, "groups", NULL);
   715			if (!prop)
   716				continue;
   717	
   718			grp->npins = of_property_count_u32_elems(np, "pins");
   719			if (grp->npins < 0) {
   720				dev_err(dev, "No pins in the group: %s\n", prop->name);
   721				of_node_put(np);
   722				return -EINVAL;
   723			}
   724			grp->name = prop->value;
   725			grp->pins = devm_kcalloc(dev, grp->npins, sizeof(*grp->pins), GFP_KERNEL);
   726			if (!grp->pins) {
   727				of_node_put(np);
   728				return -ENOMEM;
   729			}
   730	
   731			pinmux = devm_kcalloc(dev, grp->npins, sizeof(*pinmux), GFP_KERNEL);
   732			if (!pinmux) {
   733				of_node_put(np);
   734				return -ENOMEM;
   735			}
   736	
   737			for (j = 0; j < grp->npins; j++) {
   738				if (of_property_read_u32_index(np, "pins", j, &pin_id)) {
   739					dev_err(dev, "Group %s: Read intel pins id failed\n",
   740						grp->name);
   741					of_node_put(np);
   742					return -EINVAL;
   743				}
   744				if (pin_id >= drvdata->pctl_desc.npins) {
   745					dev_err(dev, "Group %s: Invalid pin ID, idx: %d, pin %u\n",
   746						grp->name, j, pin_id);
   747					of_node_put(np);
   748					return -EINVAL;
   749				}
 > 750				grp->pins[j] = pin_id;
   751				if (of_property_read_u32_index(np, "pinmux", j, &pinmux_id)) {
   752					dev_err(dev, "Group %s: Read intel pinmux id failed\n",
   753						grp->name);
   754					of_node_put(np);
   755					return -EINVAL;
   756				}
   757				pinmux[j] = pinmux_id;
   758			}
   759	
   760			err = pinctrl_generic_add_group(drvdata->pctl_dev, grp->name,
 > 761							grp->pins, grp->num_pins,
   762							pinmux);
   763			if (err < 0) {
   764				dev_err(dev, "Failed to register group %s\n", grp->name);
   765				of_node_put(np);
   766				return err;
   767			}
   768			memset(&group, 0, sizeof(group));
   769			pinmux = NULL;
   770		}
   771	
   772		return 0;
   773	}
   774	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ