linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: make "migrate_reason_names[]" const char *
@ 2018-11-24  9:05 Alexey Dobriyan
  2018-11-26  8:25 ` Vlastimil Babka
  2018-11-29 10:06 ` David Hildenbrand
  0 siblings, 2 replies; 3+ messages in thread
From: Alexey Dobriyan @ 2018-11-24  9:05 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, vbabka

Those strings are immutable as well.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 include/linux/migrate.h |    2 +-
 mm/debug.c              |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@ -29,7 +29,7 @@ enum migrate_reason {
 };
 
 /* In mm/debug.c; also keep sync with include/trace/events/migrate.h */
-extern char *migrate_reason_names[MR_TYPES];
+extern const char *migrate_reason_names[MR_TYPES];
 
 static inline struct page *new_page_nodemask(struct page *page,
 				int preferred_nid, nodemask_t *nodemask)
--- a/mm/debug.c
+++ b/mm/debug.c
@@ -17,7 +17,7 @@
 
 #include "internal.h"
 
-char *migrate_reason_names[MR_TYPES] = {
+const char *migrate_reason_names[MR_TYPES] = {
 	"compaction",
 	"memory_failure",
 	"memory_hotplug",

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

* Re: [PATCH] mm: make "migrate_reason_names[]" const char *
  2018-11-24  9:05 [PATCH] mm: make "migrate_reason_names[]" const char * Alexey Dobriyan
@ 2018-11-26  8:25 ` Vlastimil Babka
  2018-11-29 10:06 ` David Hildenbrand
  1 sibling, 0 replies; 3+ messages in thread
From: Vlastimil Babka @ 2018-11-26  8:25 UTC (permalink / raw)
  To: Alexey Dobriyan, akpm; +Cc: linux-mm

On 11/24/18 10:05 AM, Alexey Dobriyan wrote:
> Those strings are immutable as well.
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>

Sounds a bit random, but why not.

Acked-by: Vlastimil Babka <vbabka@suse.cz>

> ---
> 
>  include/linux/migrate.h |    2 +-
>  mm/debug.c              |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> --- a/include/linux/migrate.h
> +++ b/include/linux/migrate.h
> @@ -29,7 +29,7 @@ enum migrate_reason {
>  };
>  
>  /* In mm/debug.c; also keep sync with include/trace/events/migrate.h */
> -extern char *migrate_reason_names[MR_TYPES];
> +extern const char *migrate_reason_names[MR_TYPES];
>  
>  static inline struct page *new_page_nodemask(struct page *page,
>  				int preferred_nid, nodemask_t *nodemask)
> --- a/mm/debug.c
> +++ b/mm/debug.c
> @@ -17,7 +17,7 @@
>  
>  #include "internal.h"
>  
> -char *migrate_reason_names[MR_TYPES] = {
> +const char *migrate_reason_names[MR_TYPES] = {
>  	"compaction",
>  	"memory_failure",
>  	"memory_hotplug",
> 

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

* Re: [PATCH] mm: make "migrate_reason_names[]" const char *
  2018-11-24  9:05 [PATCH] mm: make "migrate_reason_names[]" const char * Alexey Dobriyan
  2018-11-26  8:25 ` Vlastimil Babka
@ 2018-11-29 10:06 ` David Hildenbrand
  1 sibling, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2018-11-29 10:06 UTC (permalink / raw)
  To: Alexey Dobriyan, akpm; +Cc: linux-mm, vbabka

On 24.11.18 10:05, Alexey Dobriyan wrote:
> Those strings are immutable as well.
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
> 
>  include/linux/migrate.h |    2 +-
>  mm/debug.c              |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> --- a/include/linux/migrate.h
> +++ b/include/linux/migrate.h
> @@ -29,7 +29,7 @@ enum migrate_reason {
>  };
>  
>  /* In mm/debug.c; also keep sync with include/trace/events/migrate.h */
> -extern char *migrate_reason_names[MR_TYPES];
> +extern const char *migrate_reason_names[MR_TYPES];
>  
>  static inline struct page *new_page_nodemask(struct page *page,
>  				int preferred_nid, nodemask_t *nodemask)
> --- a/mm/debug.c
> +++ b/mm/debug.c
> @@ -17,7 +17,7 @@
>  
>  #include "internal.h"
>  
> -char *migrate_reason_names[MR_TYPES] = {
> +const char *migrate_reason_names[MR_TYPES] = {
>  	"compaction",
>  	"memory_failure",
>  	"memory_hotplug",
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 

Thanks,

David / dhildenb

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

end of thread, other threads:[~2018-11-29 10:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-24  9:05 [PATCH] mm: make "migrate_reason_names[]" const char * Alexey Dobriyan
2018-11-26  8:25 ` Vlastimil Babka
2018-11-29 10:06 ` David Hildenbrand

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).