* [PATCH] reset: zynq: Make reset_control_ops const
@ 2016-02-08 13:29 Philipp Zabel
2016-02-08 14:48 ` kbuild test robot
0 siblings, 1 reply; 2+ messages in thread
From: Philipp Zabel @ 2016-02-08 13:29 UTC (permalink / raw)
To: linux-kernel; +Cc: Moritz Fischer, Philipp Zabel
The zynq_reset_ops structure is never modified. Make it const.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
drivers/reset/reset-zynq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/reset/reset-zynq.c b/drivers/reset/reset-zynq.c
index c6b3cd8..a7e87bc 100644
--- a/drivers/reset/reset-zynq.c
+++ b/drivers/reset/reset-zynq.c
@@ -86,7 +86,7 @@ static int zynq_reset_status(struct reset_controller_dev *rcdev,
return !!(reg & BIT(offset));
}
-static struct reset_control_ops zynq_reset_ops = {
+static const struct reset_control_ops zynq_reset_ops = {
.assert = zynq_reset_assert,
.deassert = zynq_reset_deassert,
.status = zynq_reset_status,
--
2.7.0.rc3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] reset: zynq: Make reset_control_ops const
2016-02-08 13:29 [PATCH] reset: zynq: Make reset_control_ops const Philipp Zabel
@ 2016-02-08 14:48 ` kbuild test robot
0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2016-02-08 14:48 UTC (permalink / raw)
To: Philipp Zabel; +Cc: kbuild-all, linux-kernel, Moritz Fischer, Philipp Zabel
[-- Attachment #1: Type: text/plain, Size: 3089 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-zynq-Make-reset_control_ops-const/20160208-213337
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/reset-zynq.c: In function 'zynq_reset_probe':
>> drivers/reset/reset-zynq.c:122:18: warning: assignment discards 'const' qualifier from pointer target type
priv->rcdev.ops = &zynq_reset_ops;
^
vim +/const +122 drivers/reset/reset-zynq.c
fedf42b5 Moritz Fischer 2015-07-30 106 "syscon");
fedf42b5 Moritz Fischer 2015-07-30 107 if (IS_ERR(priv->slcr)) {
fedf42b5 Moritz Fischer 2015-07-30 108 dev_err(&pdev->dev, "unable to get zynq-slcr regmap");
fedf42b5 Moritz Fischer 2015-07-30 109 return PTR_ERR(priv->slcr);
fedf42b5 Moritz Fischer 2015-07-30 110 }
fedf42b5 Moritz Fischer 2015-07-30 111
fedf42b5 Moritz Fischer 2015-07-30 112 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
fedf42b5 Moritz Fischer 2015-07-30 113 if (!res) {
fedf42b5 Moritz Fischer 2015-07-30 114 dev_err(&pdev->dev, "missing IO resource\n");
fedf42b5 Moritz Fischer 2015-07-30 115 return -ENODEV;
fedf42b5 Moritz Fischer 2015-07-30 116 }
fedf42b5 Moritz Fischer 2015-07-30 117
fedf42b5 Moritz Fischer 2015-07-30 118 priv->offset = res->start;
fedf42b5 Moritz Fischer 2015-07-30 119
fedf42b5 Moritz Fischer 2015-07-30 120 priv->rcdev.owner = THIS_MODULE;
fedf42b5 Moritz Fischer 2015-07-30 121 priv->rcdev.nr_resets = resource_size(res) / 4 * BITS_PER_LONG;
fedf42b5 Moritz Fischer 2015-07-30 @122 priv->rcdev.ops = &zynq_reset_ops;
fedf42b5 Moritz Fischer 2015-07-30 123 priv->rcdev.of_node = pdev->dev.of_node;
fedf42b5 Moritz Fischer 2015-07-30 124
d1f15aa0 Masahiro Yamada 2015-11-05 125 return reset_controller_register(&priv->rcdev);
fedf42b5 Moritz Fischer 2015-07-30 126 }
fedf42b5 Moritz Fischer 2015-07-30 127
fedf42b5 Moritz Fischer 2015-07-30 128 static int zynq_reset_remove(struct platform_device *pdev)
fedf42b5 Moritz Fischer 2015-07-30 129 {
fedf42b5 Moritz Fischer 2015-07-30 130 struct zynq_reset_data *priv = platform_get_drvdata(pdev);
:::::: The code at line 122 was first introduced by commit
:::::: fedf42b50d51758ce43fe0a652991dc01421f422 reset: reset-zynq: Adding support for Xilinx Zynq reset controller.
:::::: TO: Moritz Fischer <moritz.fischer@ettus.com>
:::::: CC: Philipp Zabel <p.zabel@pengutronix.de>
---
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:49 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:29 [PATCH] reset: zynq: Make reset_control_ops const Philipp Zabel
2016-02-08 14:48 ` 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®