All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog: sp805: constify amba_id
@ 2017-08-23 16:34 Arvind Yadav
  2017-08-30  3:27 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-08-23 16:34 UTC (permalink / raw)
  To: wim, linux; +Cc: linux-kernel, linux-watchdog

amba_id are not supposed to change at runtime. All functions
working with const amba_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/watchdog/sp805_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
index e7a715e..03805bc 100644
--- a/drivers/watchdog/sp805_wdt.c
+++ b/drivers/watchdog/sp805_wdt.c
@@ -281,7 +281,7 @@ static int __maybe_unused sp805_wdt_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(sp805_wdt_dev_pm_ops, sp805_wdt_suspend,
 		sp805_wdt_resume);
 
-static struct amba_id sp805_wdt_ids[] = {
+static const struct amba_id sp805_wdt_ids[] = {
 	{
 		.id	= 0x00141805,
 		.mask	= 0x00ffffff,
-- 
2.7.4

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

* Re: watchdog: sp805: constify amba_id
  2017-08-23 16:34 [PATCH] watchdog: sp805: constify amba_id Arvind Yadav
@ 2017-08-30  3:27 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2017-08-30  3:27 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: wim, linux-kernel, linux-watchdog

On Wed, Aug 23, 2017 at 10:04:08PM +0530, Arvind Yadav wrote:
> amba_id are not supposed to change at runtime. All functions
> working with const amba_id. So mark the non-const structs as const.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/sp805_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
> index e7a715e..03805bc 100644
> --- a/drivers/watchdog/sp805_wdt.c
> +++ b/drivers/watchdog/sp805_wdt.c
> @@ -281,7 +281,7 @@ static int __maybe_unused sp805_wdt_resume(struct device *dev)
>  static SIMPLE_DEV_PM_OPS(sp805_wdt_dev_pm_ops, sp805_wdt_suspend,
>  		sp805_wdt_resume);
>  
> -static struct amba_id sp805_wdt_ids[] = {
> +static const struct amba_id sp805_wdt_ids[] = {
>  	{
>  		.id	= 0x00141805,
>  		.mask	= 0x00ffffff,

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

end of thread, other threads:[~2017-08-30  3:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23 16:34 [PATCH] watchdog: sp805: constify amba_id Arvind Yadav
2017-08-30  3:27 ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.