Re: [PATCH] reset: hi6220: Make reset_control_ops const
From: kbuild test robot
Date: Mon Feb 08 2016 - 17:18:17 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-hi6220-Make-reset_control_ops-const/20160208-213019
config: arm-allyesconfig (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/hisilicon/hi6220_reset.c: In function 'hi6220_reset_probe':
>> drivers/reset/hisilicon/hi6220_reset.c:83:19: warning: assignment discards 'const' qualifier from pointer target type
data->rc_dev.ops = &hi6220_reset_ops;
^
vim +/const +83 drivers/reset/hisilicon/hi6220_reset.c
f59d23c2 Chen Feng 2015-11-20 67 struct hi6220_reset_data *data;
f59d23c2 Chen Feng 2015-11-20 68 struct resource *res;
f59d23c2 Chen Feng 2015-11-20 69 void __iomem *src_base;
f59d23c2 Chen Feng 2015-11-20 70
f59d23c2 Chen Feng 2015-11-20 71 data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
f59d23c2 Chen Feng 2015-11-20 72 if (!data)
f59d23c2 Chen Feng 2015-11-20 73 return -ENOMEM;
f59d23c2 Chen Feng 2015-11-20 74
f59d23c2 Chen Feng 2015-11-20 75 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
f59d23c2 Chen Feng 2015-11-20 76 src_base = devm_ioremap_resource(&pdev->dev, res);
f59d23c2 Chen Feng 2015-11-20 77 if (IS_ERR(src_base))
f59d23c2 Chen Feng 2015-11-20 78 return PTR_ERR(src_base);
f59d23c2 Chen Feng 2015-11-20 79
f59d23c2 Chen Feng 2015-11-20 80 data->assert_base = src_base + ASSERT_OFFSET;
f59d23c2 Chen Feng 2015-11-20 81 data->deassert_base = src_base + DEASSERT_OFFSET;
f59d23c2 Chen Feng 2015-11-20 82 data->rc_dev.nr_resets = MAX_INDEX;
f59d23c2 Chen Feng 2015-11-20 @83 data->rc_dev.ops = &hi6220_reset_ops;
f59d23c2 Chen Feng 2015-11-20 84 data->rc_dev.of_node = pdev->dev.of_node;
f59d23c2 Chen Feng 2015-11-20 85
f59d23c2 Chen Feng 2015-11-20 86 reset_controller_register(&data->rc_dev);
f59d23c2 Chen Feng 2015-11-20 87
f59d23c2 Chen Feng 2015-11-20 88 return 0;
f59d23c2 Chen Feng 2015-11-20 89 }
f59d23c2 Chen Feng 2015-11-20 90
f59d23c2 Chen Feng 2015-11-20 91 static const struct of_device_id hi6220_reset_match[] = {
:::::: The code at line 83 was first introduced by commit
:::::: f59d23c2c0eb23194ffc16f640dfac4da938b6ac reset: hi6220: Reset driver for hisilicon hi6220 SoC
:::::: TO: Chen Feng <puck.chen@xxxxxxxxxxxxx>
:::::: CC: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: Binary data