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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202112160723.nSvHR7gk-lkp@intel.com>
Date:   Thu, 16 Dec 2021 07:18:19 +0800
From:   kernel test robot <lkp@...el.com>
To:     Rafał Miłecki <zajec5@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>
Cc:     kbuild-all@...ts.01.org, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Rafał Miłecki <rafal@...ecki.pl>
Subject: Re: [PATCH] pinctrl: add one more "const" for generic function groups

Hi "Rafał,

I love your patch! Yet something to improve:

[auto build test ERROR on linusw-pinctrl/devel]
[also build test ERROR on v5.16-rc5 next-20211214]
[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/pinctrl-add-one-more-const-for-generic-function-groups/20211216-014859
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
config: arm-randconfig-c002-20211214 (https://download.01.org/0day-ci/archive/20211216/202112160723.nSvHR7gk-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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
        # https://github.com/0day-ci/linux/commit/e4338a6ad34998afb60c5ad294aafa06cd7110a7
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Rafa-Mi-ecki/pinctrl-add-one-more-const-for-generic-function-groups/20211216-014859
        git checkout e4338a6ad34998afb60c5ad294aafa06cd7110a7
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/pinctrl/freescale/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   drivers/pinctrl/freescale/pinctrl-imx.c: In function 'imx_pinctrl_parse_functions':
>> drivers/pinctrl/freescale/pinctrl-imx.c:672:38: error: assignment of read-only location '*(func->group_names + (sizetype)(i * 4))'
     672 |                 func->group_names[i] = child->name;
         |                                      ^


vim +672 drivers/pinctrl/freescale/pinctrl-imx.c

ae75ff81453840 drivers/pinctrl/pinctrl-imx.c           Dong Aisheng       2012-04-27  642  
150632b09aadf1 drivers/pinctrl/pinctrl-imx.c           Greg Kroah-Hartman 2012-12-21  643  static int imx_pinctrl_parse_functions(struct device_node *np,
e566fc11ea76ec drivers/pinctrl/freescale/pinctrl-imx.c Gary Bisson        2017-01-02  644  				       struct imx_pinctrl *ipctl,
150632b09aadf1 drivers/pinctrl/pinctrl-imx.c           Greg Kroah-Hartman 2012-12-21  645  				       u32 index)
ae75ff81453840 drivers/pinctrl/pinctrl-imx.c           Dong Aisheng       2012-04-27  646  {
e566fc11ea76ec drivers/pinctrl/freescale/pinctrl-imx.c Gary Bisson        2017-01-02  647  	struct pinctrl_dev *pctl = ipctl->pctl;
ae75ff81453840 drivers/pinctrl/pinctrl-imx.c           Dong Aisheng       2012-04-27  648  	struct device_node *child;
3fd6d6ad73af90 drivers/pinctrl/freescale/pinctrl-imx.c Gary Bisson        2017-01-02  649  	struct function_desc *func;
e566fc11ea76ec drivers/pinctrl/freescale/pinctrl-imx.c Gary Bisson        2017-01-02  650  	struct group_desc *grp;
ae75ff81453840 drivers/pinctrl/pinctrl-imx.c           Dong Aisheng       2012-04-27  651  	u32 i = 0;
ae75ff81453840 drivers/pinctrl/pinctrl-imx.c           Dong Aisheng       2012-04-27  652  
94f4e54cecaf3e drivers/pinctrl/freescale/pinctrl-imx.c Rob Herring        2018-08-27  653  	dev_dbg(pctl->dev, "parse function(%d): %pOFn\n", index, np);
ae75ff81453840 drivers/pinctrl/pinctrl-imx.c           Dong Aisheng       2012-04-27  654  
3fd6d6ad73af90 drivers/pinctrl/freescale/pinctrl-imx.c Gary Bisson        2017-01-02  655  	func = pinmux_generic_get_function(pctl, index);
a51c158bf0f7ca drivers/pinctrl/freescale/pinctrl-imx.c Gary Bisson        2016-12-02  656  	if (!func)
a51c158bf0f7ca drivers/pinctrl/freescale/pinctrl-imx.c Gary Bisson        2016-12-02  657  		return -EINVAL;
ae75ff81453840 drivers/pinctrl/pinctrl-imx.c           Dong Aisheng       2012-04-27  658  
ae75ff81453840 drivers/pinctrl/pinctrl-imx.c           Dong Aisheng       2012-04-27  659  	/* Initialise function */
ae75ff81453840 drivers/pinctrl/pinctrl-imx.c           Dong Aisheng       2012-04-27  660  	func->name = np->name;
3fd6d6ad73af90 drivers/pinctrl/freescale/pinctrl-imx.c Gary Bisson        2017-01-02  661  	func->num_group_names = of_get_child_count(np);
3fd6d6ad73af90 drivers/pinctrl/freescale/pinctrl-imx.c Gary Bisson        2017-01-02  662  	if (func->num_group_names == 0) {
f5843492ecefcf drivers/pinctrl/freescale/pinctrl-imx.c Stefan Agner       2018-01-06  663  		dev_err(ipctl->dev, "no groups defined in %pOF\n", np);
ae75ff81453840 drivers/pinctrl/pinctrl-imx.c           Dong Aisheng       2012-04-27  664  		return -EINVAL;
ae75ff81453840 drivers/pinctrl/pinctrl-imx.c           Dong Aisheng       2012-04-27  665  	}
f5843492ecefcf drivers/pinctrl/freescale/pinctrl-imx.c Stefan Agner       2018-01-06  666  	func->group_names = devm_kcalloc(ipctl->dev, func->num_group_names,
3fd6d6ad73af90 drivers/pinctrl/freescale/pinctrl-imx.c Gary Bisson        2017-01-02  667  					 sizeof(char *), GFP_KERNEL);
49af64e6b52208 drivers/pinctrl/freescale/pinctrl-imx.c Christophe JAILLET 2017-05-06  668  	if (!func->group_names)
49af64e6b52208 drivers/pinctrl/freescale/pinctrl-imx.c Christophe JAILLET 2017-05-06  669  		return -ENOMEM;
ae75ff81453840 drivers/pinctrl/pinctrl-imx.c           Dong Aisheng       2012-04-27  670  
ae75ff81453840 drivers/pinctrl/pinctrl-imx.c           Dong Aisheng       2012-04-27  671  	for_each_child_of_node(np, child) {
3fd6d6ad73af90 drivers/pinctrl/freescale/pinctrl-imx.c Gary Bisson        2017-01-02 @672  		func->group_names[i] = child->name;
a51c158bf0f7ca drivers/pinctrl/freescale/pinctrl-imx.c Gary Bisson        2016-12-02  673  
f5843492ecefcf drivers/pinctrl/freescale/pinctrl-imx.c Stefan Agner       2018-01-06  674  		grp = devm_kzalloc(ipctl->dev, sizeof(struct group_desc),
a51c158bf0f7ca drivers/pinctrl/freescale/pinctrl-imx.c Gary Bisson        2016-12-02  675  				   GFP_KERNEL);
bf4b87b0d06aa3 drivers/pinctrl/freescale/pinctrl-imx.c Nishka Dasgupta    2019-08-08  676  		if (!grp) {
bf4b87b0d06aa3 drivers/pinctrl/freescale/pinctrl-imx.c Nishka Dasgupta    2019-08-08  677  			of_node_put(child);
a51c158bf0f7ca drivers/pinctrl/freescale/pinctrl-imx.c Gary Bisson        2016-12-02  678  			return -ENOMEM;
bf4b87b0d06aa3 drivers/pinctrl/freescale/pinctrl-imx.c Nishka Dasgupta    2019-08-08  679  		}
a51c158bf0f7ca drivers/pinctrl/freescale/pinctrl-imx.c Gary Bisson        2016-12-02  680  
f5843492ecefcf drivers/pinctrl/freescale/pinctrl-imx.c Stefan Agner       2018-01-06  681  		mutex_lock(&ipctl->mutex);
e566fc11ea76ec drivers/pinctrl/freescale/pinctrl-imx.c Gary Bisson        2017-01-02  682  		radix_tree_insert(&pctl->pin_group_tree,
f5843492ecefcf drivers/pinctrl/freescale/pinctrl-imx.c Stefan Agner       2018-01-06  683  				  ipctl->group_index++, grp);
f5843492ecefcf drivers/pinctrl/freescale/pinctrl-imx.c Stefan Agner       2018-01-06  684  		mutex_unlock(&ipctl->mutex);
a51c158bf0f7ca drivers/pinctrl/freescale/pinctrl-imx.c Gary Bisson        2016-12-02  685  
a5cadbbb081cb8 drivers/pinctrl/freescale/pinctrl-imx.c Dong Aisheng       2017-05-19  686  		imx_pinctrl_parse_groups(child, grp, ipctl, i++);
ae75ff81453840 drivers/pinctrl/pinctrl-imx.c           Dong Aisheng       2012-04-27  687  	}
ae75ff81453840 drivers/pinctrl/pinctrl-imx.c           Dong Aisheng       2012-04-27  688  
ae75ff81453840 drivers/pinctrl/pinctrl-imx.c           Dong Aisheng       2012-04-27  689  	return 0;
ae75ff81453840 drivers/pinctrl/pinctrl-imx.c           Dong Aisheng       2012-04-27  690  }
ae75ff81453840 drivers/pinctrl/pinctrl-imx.c           Dong Aisheng       2012-04-27  691  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ