* [PATCH] reset: sti: Make reset_control_ops const
@ 2016-02-08 13:28 Philipp Zabel
2016-02-08 14:52 ` kbuild test robot
0 siblings, 1 reply; 2+ messages in thread
From: Philipp Zabel @ 2016-02-08 13:28 UTC (permalink / raw)
To: linux-kernel; +Cc: Stephen Gallimore, Srinivas Kandagatla, Philipp Zabel
The syscfg_reset_ops structure is never modified. Make it const.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
drivers/reset/sti/reset-syscfg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/reset/sti/reset-syscfg.c b/drivers/reset/sti/reset-syscfg.c
index 1600cc7..9bd57a5 100644
--- a/drivers/reset/sti/reset-syscfg.c
+++ b/drivers/reset/sti/reset-syscfg.c
@@ -134,7 +134,7 @@ static int syscfg_reset_status(struct reset_controller_dev *rcdev,
return rst->active_low ? !ret_val : !!ret_val;
}
-static struct reset_control_ops syscfg_reset_ops = {
+static const struct reset_control_ops syscfg_reset_ops = {
.reset = syscfg_reset_dev,
.assert = syscfg_reset_assert,
.deassert = syscfg_reset_deassert,
--
2.7.0.rc3
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] reset: sti: Make reset_control_ops const
2016-02-08 13:28 [PATCH] reset: sti: Make reset_control_ops const Philipp Zabel
@ 2016-02-08 14:52 ` kbuild test robot
0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2016-02-08 14:52 UTC (permalink / raw)
To: Philipp Zabel
Cc: kbuild-all, linux-kernel, Stephen Gallimore, Srinivas Kandagatla,
Philipp Zabel
[-- Attachment #1: Type: text/plain, Size: 3172 bytes --]
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@st.com>
:::::: CC: Srinivas Kandagatla <srinivas.kandagatla@st.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 36557 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-08 14:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-08 13:28 [PATCH] reset: sti: Make reset_control_ops const Philipp Zabel
2016-02-08 14:52 ` kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®