mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: lustre: obd: make echo_lock_ops const
@ 2017-08-03  9:12 Bhumika Goyal
  2017-08-03 17:26 ` James Simmons
  0 siblings, 1 reply; 2+ messages in thread
From: Bhumika Goyal @ 2017-08-03  9:12 UTC (permalink / raw)
  To: julia.lawall, oleg.drokin, andreas.dilger, jsimmons, gregkh,
	lustre-devel, devel, linux-kernel
  Cc: Bhumika Goyal

Declare echo_lock_ops object of type cl_lock_operations as const as it
is only passed to the function cl_lock_slice_add. The corresponding
argument is of type const, so make the object const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/staging/lustre/lustre/obdecho/echo_client.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c
index 1c4a8fe..b3fbc3c 100644
--- a/drivers/staging/lustre/lustre/obdecho/echo_client.c
+++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c
@@ -319,7 +319,7 @@ static void echo_lock_fini(const struct lu_env *env,
 	kmem_cache_free(echo_lock_kmem, ecl);
 }
 
-static struct cl_lock_operations echo_lock_ops = {
+static const struct cl_lock_operations echo_lock_ops = {
 	.clo_fini      = echo_lock_fini,
 };
 
-- 
1.9.1

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

* Re: [PATCH] staging: lustre: obd: make echo_lock_ops const
  2017-08-03  9:12 [PATCH] staging: lustre: obd: make echo_lock_ops const Bhumika Goyal
@ 2017-08-03 17:26 ` James Simmons
  0 siblings, 0 replies; 2+ messages in thread
From: James Simmons @ 2017-08-03 17:26 UTC (permalink / raw)
  To: Bhumika Goyal
  Cc: julia.lawall, oleg.drokin, andreas.dilger, gregkh, lustre-devel,
	devel, linux-kernel


> Declare echo_lock_ops object of type cl_lock_operations as const as it
> is only passed to the function cl_lock_slice_add. The corresponding
> argument is of type const, so make the object const.
> 

Acked-by: James Simmons <jsimmons@infradead.org> 

> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
>  drivers/staging/lustre/lustre/obdecho/echo_client.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c
> index 1c4a8fe..b3fbc3c 100644
> --- a/drivers/staging/lustre/lustre/obdecho/echo_client.c
> +++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c
> @@ -319,7 +319,7 @@ static void echo_lock_fini(const struct lu_env *env,
>  	kmem_cache_free(echo_lock_kmem, ecl);
>  }
>  
> -static struct cl_lock_operations echo_lock_ops = {
> +static const struct cl_lock_operations echo_lock_ops = {
>  	.clo_fini      = echo_lock_fini,
>  };
>  
> -- 
> 1.9.1
> 
> 

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

end of thread, other threads:[~2017-08-03 17:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-03  9:12 [PATCH] staging: lustre: obd: make echo_lock_ops const Bhumika Goyal
2017-08-03 17:26 ` James Simmons

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®