All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/shmem.c: constify anon_ops
@ 2016-09-14 22:02 ` Rasmus Villemoes
  0 siblings, 0 replies; 4+ messages in thread
From: Rasmus Villemoes @ 2016-09-14 22:02 UTC (permalink / raw)
  To: Hugh Dickins; +Cc: Rasmus Villemoes, linux-mm, linux-kernel

Every other dentry_operations instance is const, and this one might as
well be.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 mm/shmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/shmem.c b/mm/shmem.c
index fd8b2b5741b1..693ffdc5899a 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -4077,7 +4077,7 @@ EXPORT_SYMBOL_GPL(shmem_truncate_range);
 
 /* common code */
 
-static struct dentry_operations anon_ops = {
+static const struct dentry_operations anon_ops = {
 	.d_dname = simple_dname
 };
 
-- 
2.1.4

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

* [PATCH] mm/shmem.c: constify anon_ops
@ 2016-09-14 22:02 ` Rasmus Villemoes
  0 siblings, 0 replies; 4+ messages in thread
From: Rasmus Villemoes @ 2016-09-14 22:02 UTC (permalink / raw)
  To: Hugh Dickins; +Cc: Rasmus Villemoes, linux-mm, linux-kernel

Every other dentry_operations instance is const, and this one might as
well be.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 mm/shmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/shmem.c b/mm/shmem.c
index fd8b2b5741b1..693ffdc5899a 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -4077,7 +4077,7 @@ EXPORT_SYMBOL_GPL(shmem_truncate_range);
 
 /* common code */
 
-static struct dentry_operations anon_ops = {
+static const struct dentry_operations anon_ops = {
 	.d_dname = simple_dname
 };
 
-- 
2.1.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] mm/shmem.c: constify anon_ops
  2016-09-14 22:02 ` Rasmus Villemoes
@ 2016-09-16 19:06   ` Hugh Dickins
  -1 siblings, 0 replies; 4+ messages in thread
From: Hugh Dickins @ 2016-09-16 19:06 UTC (permalink / raw)
  To: Rasmus Villemoes, Andrew Morton; +Cc: Hugh Dickins, linux-mm, linux-kernel

On Thu, 15 Sep 2016, Rasmus Villemoes wrote:

> Every other dentry_operations instance is const, and this one might as
> well be.
> 
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>

Indeed, thanks,

Acked-by: Hugh Dickins <hughd@google.com>

> ---
>  mm/shmem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/shmem.c b/mm/shmem.c
> index fd8b2b5741b1..693ffdc5899a 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -4077,7 +4077,7 @@ EXPORT_SYMBOL_GPL(shmem_truncate_range);
>  
>  /* common code */
>  
> -static struct dentry_operations anon_ops = {
> +static const struct dentry_operations anon_ops = {
>  	.d_dname = simple_dname
>  };
>  
> -- 
> 2.1.4

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

* Re: [PATCH] mm/shmem.c: constify anon_ops
@ 2016-09-16 19:06   ` Hugh Dickins
  0 siblings, 0 replies; 4+ messages in thread
From: Hugh Dickins @ 2016-09-16 19:06 UTC (permalink / raw)
  To: Rasmus Villemoes, Andrew Morton; +Cc: Hugh Dickins, linux-mm, linux-kernel

On Thu, 15 Sep 2016, Rasmus Villemoes wrote:

> Every other dentry_operations instance is const, and this one might as
> well be.
> 
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>

Indeed, thanks,

Acked-by: Hugh Dickins <hughd@google.com>

> ---
>  mm/shmem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/shmem.c b/mm/shmem.c
> index fd8b2b5741b1..693ffdc5899a 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -4077,7 +4077,7 @@ EXPORT_SYMBOL_GPL(shmem_truncate_range);
>  
>  /* common code */
>  
> -static struct dentry_operations anon_ops = {
> +static const struct dentry_operations anon_ops = {
>  	.d_dname = simple_dname
>  };
>  
> -- 
> 2.1.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2016-09-16 19:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-14 22:02 [PATCH] mm/shmem.c: constify anon_ops Rasmus Villemoes
2016-09-14 22:02 ` Rasmus Villemoes
2016-09-16 19:06 ` Hugh Dickins
2016-09-16 19:06   ` Hugh Dickins

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.