Re: [PATCH] reset: sti: Make reset_control_ops const

From: kbuild test robot
Date: Mon Feb 08 2016 - 09:53:49 EST


Hi Philipp,

[auto build test WARNING on v4.5-rc3]
[also build test WARNING on next-20160208]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url: https://github.com/0day-ci/linux/commits/Philipp-Zabel/reset-sti-Make-reset_control_ops-const/20160208-213304
config: arm-multi_v7_defconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm

All warnings (new ones prefixed by >>):

drivers/reset/sti/reset-syscfg.c: In function 'syscfg_reset_controller_register':
>> drivers/reset/sti/reset-syscfg.c:161:14: warning: assignment discards 'const' qualifier from pointer target type
rc->rst.ops = &syscfg_reset_ops,
^

vim +/const +161 drivers/reset/sti/reset-syscfg.c

e5d76075 Stephen Gallimore 2013-08-07 145 const struct syscfg_reset_controller_data *data)
e5d76075 Stephen Gallimore 2013-08-07 146 {
e5d76075 Stephen Gallimore 2013-08-07 147 struct syscfg_reset_controller *rc;
e5d76075 Stephen Gallimore 2013-08-07 148 size_t size;
e5d76075 Stephen Gallimore 2013-08-07 149 int i, err;
e5d76075 Stephen Gallimore 2013-08-07 150
e5d76075 Stephen Gallimore 2013-08-07 151 rc = devm_kzalloc(dev, sizeof(*rc), GFP_KERNEL);
e5d76075 Stephen Gallimore 2013-08-07 152 if (!rc)
e5d76075 Stephen Gallimore 2013-08-07 153 return -ENOMEM;
e5d76075 Stephen Gallimore 2013-08-07 154
e5d76075 Stephen Gallimore 2013-08-07 155 size = sizeof(struct syscfg_reset_channel) * data->nr_channels;
e5d76075 Stephen Gallimore 2013-08-07 156
e5d76075 Stephen Gallimore 2013-08-07 157 rc->channels = devm_kzalloc(dev, size, GFP_KERNEL);
e5d76075 Stephen Gallimore 2013-08-07 158 if (!rc->channels)
e5d76075 Stephen Gallimore 2013-08-07 159 return -ENOMEM;
e5d76075 Stephen Gallimore 2013-08-07 160
e5d76075 Stephen Gallimore 2013-08-07 @161 rc->rst.ops = &syscfg_reset_ops,
e5d76075 Stephen Gallimore 2013-08-07 162 rc->rst.of_node = dev->of_node;
e5d76075 Stephen Gallimore 2013-08-07 163 rc->rst.nr_resets = data->nr_channels;
e5d76075 Stephen Gallimore 2013-08-07 164 rc->active_low = data->active_low;
e5d76075 Stephen Gallimore 2013-08-07 165
e5d76075 Stephen Gallimore 2013-08-07 166 for (i = 0; i < data->nr_channels; i++) {
e5d76075 Stephen Gallimore 2013-08-07 167 struct regmap *map;
e5d76075 Stephen Gallimore 2013-08-07 168 struct regmap_field *f;
e5d76075 Stephen Gallimore 2013-08-07 169 const char *compatible = data->channels[i].compatible;

:::::: The code at line 161 was first introduced by commit
:::::: e5d76075d9300a483619f7f308a693311af9c2cb drivers: reset: STi SoC system configuration reset controller support

:::::: TO: Stephen Gallimore <stephen.gallimore@xxxxxx>
:::::: CC: Srinivas Kandagatla <srinivas.kandagatla@xxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data