linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH] f2fs: make "f2fs_fault_name[]" const char *
@ 2018-11-24  9:06 Alexey Dobriyan
  2018-11-24 10:25 ` Chao Yu
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2018-11-24  9:06 UTC (permalink / raw)
  To: jaegeuk, yuchao0; +Cc: linux-fsdevel, linux-f2fs-devel

Those strings are immutable.

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

 fs/f2fs/f2fs.h  |    2 +-
 fs/f2fs/super.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -67,7 +67,7 @@ struct f2fs_fault_info {
 	unsigned int inject_type;
 };
 
-extern char *f2fs_fault_name[FAULT_MAX];
+extern const char *f2fs_fault_name[FAULT_MAX];
 #define IS_FAULT_SET(fi, type) ((fi)->inject_type & (1 << (type)))
 #endif
 
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -38,7 +38,7 @@ static struct kmem_cache *f2fs_inode_cachep;
 
 #ifdef CONFIG_F2FS_FAULT_INJECTION
 
-char *f2fs_fault_name[FAULT_MAX] = {
+const char *f2fs_fault_name[FAULT_MAX] = {
 	[FAULT_KMALLOC]		= "kmalloc",
 	[FAULT_KVMALLOC]	= "kvmalloc",
 	[FAULT_PAGE_ALLOC]	= "page alloc",

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

* Re: [PATCH] f2fs: make "f2fs_fault_name[]" const char *
  2018-11-24  9:06 [PATCH] f2fs: make "f2fs_fault_name[]" const char * Alexey Dobriyan
@ 2018-11-24 10:25 ` Chao Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2018-11-24 10:25 UTC (permalink / raw)
  To: Alexey Dobriyan, jaegeuk; +Cc: linux-fsdevel, linux-f2fs-devel

On 2018/11/24 17:06, Alexey Dobriyan wrote:
> Those strings are immutable.
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,

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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-24  9:06 [PATCH] f2fs: make "f2fs_fault_name[]" const char * Alexey Dobriyan
2018-11-24 10:25 ` Chao Yu

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