Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1702816 > unrolled thread

[PATCH] staging: lustre: obd: make echo_lock_ops const

Started byBhumika Goyal <bhumirks@gmail.com>
First post2017-08-03 11:20 +0200
Last post2017-08-03 19:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging: lustre: obd: make echo_lock_ops const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-03 11:20 +0200
    Re: [PATCH] staging: lustre: obd: make echo_lock_ops const James Simmons <jsimmons@infradead.org> - 2017-08-03 19:30 +0200

#1702816 — [PATCH] staging: lustre: obd: make echo_lock_ops const

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-08-03 11:20 +0200
Subject[PATCH] staging: lustre: obd: make echo_lock_ops const
Message-ID<uaksq-6mu-19@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1703300

FromJames Simmons <jsimmons@infradead.org>
Date2017-08-03 19:30 +0200
Message-ID<uas6C-3bf-7@gated-at.bofh.it>
In reply to#1702816
> 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
> 
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web