linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] reset: berlin: Make reset_control_ops const
@ 2016-02-08 13:28 Philipp Zabel
  2016-02-08 13:34 ` Antoine Tenart
  2016-02-08 14:57 ` kbuild test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Philipp Zabel @ 2016-02-08 13:28 UTC (permalink / raw)
  To: linux-kernel; +Cc: Antoine Tenart, Philipp Zabel

The berlin_reset_ops structure is never modified. Make it const.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/reset/reset-berlin.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/reset/reset-berlin.c b/drivers/reset/reset-berlin.c
index ac017df..369f391 100644
--- a/drivers/reset/reset-berlin.c
+++ b/drivers/reset/reset-berlin.c
@@ -46,7 +46,7 @@ static int berlin_reset_reset(struct reset_controller_dev *rcdev,
 	return 0;
 }
 
-static struct reset_control_ops berlin_reset_ops = {
+static const struct reset_control_ops berlin_reset_ops = {
 	.reset	= berlin_reset_reset,
 };
 
-- 
2.7.0.rc3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] reset: berlin: Make reset_control_ops const
  2016-02-08 13:28 [PATCH] reset: berlin: Make reset_control_ops const Philipp Zabel
@ 2016-02-08 13:34 ` Antoine Tenart
  2016-02-08 14:57 ` kbuild test robot
  1 sibling, 0 replies; 3+ messages in thread
From: Antoine Tenart @ 2016-02-08 13:34 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: linux-kernel, Antoine Tenart

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

On Mon, Feb 08, 2016 at 02:28:20PM +0100, Philipp Zabel wrote:
> The berlin_reset_ops structure is never modified. Make it const.
> 
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

Acked-by: Antoine Tenart <antoine.tenart@free-electrons.com>

> ---
>  drivers/reset/reset-berlin.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/reset/reset-berlin.c b/drivers/reset/reset-berlin.c
> index ac017df..369f391 100644
> --- a/drivers/reset/reset-berlin.c
> +++ b/drivers/reset/reset-berlin.c
> @@ -46,7 +46,7 @@ static int berlin_reset_reset(struct reset_controller_dev *rcdev,
>  	return 0;
>  }
>  
> -static struct reset_control_ops berlin_reset_ops = {
> +static const struct reset_control_ops berlin_reset_ops = {
>  	.reset	= berlin_reset_reset,
>  };
>  
> -- 
> 2.7.0.rc3
> 

-- 
Antoine Ténart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] reset: berlin: Make reset_control_ops const
  2016-02-08 13:28 [PATCH] reset: berlin: Make reset_control_ops const Philipp Zabel
  2016-02-08 13:34 ` Antoine Tenart
@ 2016-02-08 14:57 ` kbuild test robot
  1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2016-02-08 14:57 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: kbuild-all, linux-kernel, Antoine Tenart, Philipp Zabel

[-- Attachment #1: Type: text/plain, Size: 3117 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-berlin-Make-reset_control_ops-const/20160208-213105
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-berlin.c: In function 'berlin2_reset_probe':
>> drivers/reset/reset-berlin.c:85:18: warning: assignment discards 'const' qualifier from pointer target type
     priv->rcdev.ops = &berlin_reset_ops;
                     ^

vim +/const +85 drivers/reset/reset-berlin.c

bd13251f Antoine Ténart  2014-09-03  69  
aed6f3ca Antoine Tenart  2015-05-16  70  static int berlin2_reset_probe(struct platform_device *pdev)
aed6f3ca Antoine Tenart  2015-05-16  71  {
aed6f3ca Antoine Tenart  2015-05-16  72  	struct device_node *parent_np = of_get_parent(pdev->dev.of_node);
aed6f3ca Antoine Tenart  2015-05-16  73  	struct berlin_reset_priv *priv;
aed6f3ca Antoine Tenart  2015-05-16  74  
aed6f3ca Antoine Tenart  2015-05-16  75  	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
aed6f3ca Antoine Tenart  2015-05-16  76  	if (!priv)
aed6f3ca Antoine Tenart  2015-05-16  77  		return -ENOMEM;
aed6f3ca Antoine Tenart  2015-05-16  78  
aed6f3ca Antoine Tenart  2015-05-16  79  	priv->regmap = syscon_node_to_regmap(parent_np);
aed6f3ca Antoine Tenart  2015-05-16  80  	of_node_put(parent_np);
aed6f3ca Antoine Tenart  2015-05-16  81  	if (IS_ERR(priv->regmap))
aed6f3ca Antoine Tenart  2015-05-16  82  		return PTR_ERR(priv->regmap);
aed6f3ca Antoine Tenart  2015-05-16  83  
aed6f3ca Antoine Tenart  2015-05-16  84  	priv->rcdev.owner = THIS_MODULE;
aed6f3ca Antoine Tenart  2015-05-16 @85  	priv->rcdev.ops = &berlin_reset_ops;
aed6f3ca Antoine Tenart  2015-05-16  86  	priv->rcdev.of_node = pdev->dev.of_node;
aed6f3ca Antoine Tenart  2015-05-16  87  	priv->rcdev.of_reset_n_cells = 2;
aed6f3ca Antoine Tenart  2015-05-16  88  	priv->rcdev.of_xlate = berlin_reset_xlate;
aed6f3ca Antoine Tenart  2015-05-16  89  
d1f15aa0 Masahiro Yamada 2015-11-05  90  	return reset_controller_register(&priv->rcdev);
aed6f3ca Antoine Tenart  2015-05-16  91  }
aed6f3ca Antoine Tenart  2015-05-16  92  
aed6f3ca Antoine Tenart  2015-05-16  93  static const struct of_device_id berlin_reset_dt_match[] = {

:::::: The code at line 85 was first introduced by commit
:::::: aed6f3cadc860ddeec598ed82041c1f3773071b1 reset: berlin: convert to a platform driver

:::::: TO: Antoine Tenart <antoine.tenart@free-electrons.com>
:::::: CC: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.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] 3+ messages in thread

end of thread, other threads:[~2016-02-08 14:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-08 13:28 [PATCH] reset: berlin: Make reset_control_ops const Philipp Zabel
2016-02-08 13:34 ` Antoine Tenart
2016-02-08 14:57 ` 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;
as well as URLs for NNTP newsgroup(s).