All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Rafał Miłecki" <zajec5@gmail.com>,
	"Linus Walleij" <linus.walleij@linaro.org>
Cc: kbuild-all@lists.01.org, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org, "Rafał Miłecki" <rafal@milecki.pl>
Subject: Re: [PATCH] pinctrl: add one more "const" for generic function groups
Date: Fri, 17 Dec 2021 12:04:06 +0800	[thread overview]
Message-ID: <202112171229.i6D3onAx-lkp@intel.com> (raw)
In-Reply-To: <20211215174821.21668-1-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 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/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: arm64-randconfig-s031-20211216 (https://download.01.org/0day-ci/archive/20211217/202112171229.i6D3onAx-lkp@intel.com/config)
compiler: aarch64-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/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 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/pinctrl/

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/pinctrl-keembay.c:1594:29: sparse: sparse: incorrect type in assignment (different modifiers) @@     expected char const **grp @@     got char const *const *group_names @@
   drivers/pinctrl/pinctrl-keembay.c:1594:29: sparse:     expected char const **grp
   drivers/pinctrl/pinctrl-keembay.c:1594:29: sparse:     got char const *const *group_names

vim +1594 drivers/pinctrl/pinctrl-keembay.c

ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1556  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1557  static int keembay_add_functions(struct keembay_pinctrl *kpc,
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1558  				 struct function_desc *function)
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1559  {
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1560  	unsigned int i;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1561  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1562  	/* Assign the groups for each function */
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1563  	for (i = 0; i < kpc->npins; i++) {
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1564  		const struct pinctrl_pin_desc *pdesc = keembay_pins + i;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1565  		struct keembay_mux_desc *mux = pdesc->drv_data;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1566  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1567  		while (mux->name) {
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1568  			struct function_desc *func;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1569  			const char **grp;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1570  			size_t grp_size;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1571  			u32 j, grp_num;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1572  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1573  			for (j = 0; j < kpc->nfuncs; j++) {
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1574  				if (!strcmp(mux->name, function[j].name))
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1575  					break;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1576  			}
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1577  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1578  			if (j == kpc->nfuncs)
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1579  				return -EINVAL;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1580  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1581  			func = function + j;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1582  			grp_num = func->num_group_names;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1583  			grp_size = sizeof(*func->group_names);
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1584  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1585  			if (!func->group_names) {
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1586  				func->group_names = devm_kcalloc(kpc->dev,
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1587  								 grp_num,
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1588  								 grp_size,
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1589  								 GFP_KERNEL);
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1590  				if (!func->group_names)
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1591  					return -ENOMEM;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1592  			}
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1593  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06 @1594  			grp = func->group_names;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1595  			while (*grp)
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1596  				grp++;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1597  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1598  			*grp = pdesc->name;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1599  			mux++;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1600  		}
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1601  	}
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1602  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1603  	/* Add all functions */
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1604  	for (i = 0; i < kpc->nfuncs; i++) {
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1605  		pinmux_generic_add_function(kpc->pctrl,
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1606  					    function[i].name,
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1607  					    function[i].group_names,
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1608  					    function[i].num_group_names,
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1609  					    function[i].data);
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1610  	}
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1611  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1612  	return 0;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1613  }
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1614  

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] pinctrl: add one more "const" for generic function groups
Date: Fri, 17 Dec 2021 12:04:06 +0800	[thread overview]
Message-ID: <202112171229.i6D3onAx-lkp@intel.com> (raw)
In-Reply-To: <20211215174821.21668-1-zajec5@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 6692 bytes --]

Hi "Rafał,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linusw-pinctrl/devel]
[also build test WARNING on 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/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: arm64-randconfig-s031-20211216 (https://download.01.org/0day-ci/archive/20211217/202112171229.i6D3onAx-lkp(a)intel.com/config)
compiler: aarch64-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/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 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/pinctrl/

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/pinctrl-keembay.c:1594:29: sparse: sparse: incorrect type in assignment (different modifiers) @@     expected char const **grp @@     got char const *const *group_names @@
   drivers/pinctrl/pinctrl-keembay.c:1594:29: sparse:     expected char const **grp
   drivers/pinctrl/pinctrl-keembay.c:1594:29: sparse:     got char const *const *group_names

vim +1594 drivers/pinctrl/pinctrl-keembay.c

ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1556  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1557  static int keembay_add_functions(struct keembay_pinctrl *kpc,
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1558  				 struct function_desc *function)
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1559  {
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1560  	unsigned int i;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1561  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1562  	/* Assign the groups for each function */
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1563  	for (i = 0; i < kpc->npins; i++) {
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1564  		const struct pinctrl_pin_desc *pdesc = keembay_pins + i;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1565  		struct keembay_mux_desc *mux = pdesc->drv_data;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1566  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1567  		while (mux->name) {
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1568  			struct function_desc *func;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1569  			const char **grp;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1570  			size_t grp_size;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1571  			u32 j, grp_num;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1572  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1573  			for (j = 0; j < kpc->nfuncs; j++) {
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1574  				if (!strcmp(mux->name, function[j].name))
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1575  					break;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1576  			}
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1577  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1578  			if (j == kpc->nfuncs)
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1579  				return -EINVAL;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1580  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1581  			func = function + j;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1582  			grp_num = func->num_group_names;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1583  			grp_size = sizeof(*func->group_names);
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1584  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1585  			if (!func->group_names) {
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1586  				func->group_names = devm_kcalloc(kpc->dev,
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1587  								 grp_num,
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1588  								 grp_size,
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1589  								 GFP_KERNEL);
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1590  				if (!func->group_names)
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1591  					return -ENOMEM;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1592  			}
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1593  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06 @1594  			grp = func->group_names;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1595  			while (*grp)
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1596  				grp++;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1597  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1598  			*grp = pdesc->name;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1599  			mux++;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1600  		}
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1601  	}
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1602  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1603  	/* Add all functions */
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1604  	for (i = 0; i < kpc->nfuncs; i++) {
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1605  		pinmux_generic_add_function(kpc->pctrl,
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1606  					    function[i].name,
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1607  					    function[i].group_names,
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1608  					    function[i].num_group_names,
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1609  					    function[i].data);
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1610  	}
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1611  
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1612  	return 0;
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1613  }
ffd4e739358be03 Lakshmi Sowjanya D 2021-08-06  1614  

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

  parent reply	other threads:[~2021-12-17  4:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15 17:48 [PATCH] pinctrl: add one more "const" for generic function groups Rafał Miłecki
2021-12-15 23:18 ` kernel test robot
2021-12-15 23:18   ` kernel test robot
2021-12-16  1:00 ` kernel test robot
2021-12-16  1:00   ` kernel test robot
2021-12-16  3:07 ` Linus Walleij
2021-12-17  4:04 ` kernel test robot [this message]
2021-12-17  4:04   ` kernel test robot

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=202112171229.i6D3onAx-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafal@milecki.pl \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.