提交 168f5ac6 编写于 作者: S Sergei Trofimovich 提交者: Linus Torvalds

mm cleanup: shmem_file_setup: 'char *' -> 'const char *' for name argument

As function shmem_file_setup does not modify/allocate/free/pass given
filename - mark it as const.
Signed-off-by: NSergei Trofimovich <slyfox@inbox.ru>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 aca8bf32
...@@ -724,7 +724,7 @@ static inline int shmem_lock(struct file *file, int lock, ...@@ -724,7 +724,7 @@ static inline int shmem_lock(struct file *file, int lock,
return 0; return 0;
} }
#endif #endif
struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags); struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags);
int shmem_zero_setup(struct vm_area_struct *); int shmem_zero_setup(struct vm_area_struct *);
......
...@@ -2612,7 +2612,7 @@ int shmem_unuse(swp_entry_t entry, struct page *page) ...@@ -2612,7 +2612,7 @@ int shmem_unuse(swp_entry_t entry, struct page *page)
* @size: size to be set for the file * @size: size to be set for the file
* @flags: VM_NORESERVE suppresses pre-accounting of the entire object size * @flags: VM_NORESERVE suppresses pre-accounting of the entire object size
*/ */
struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags) struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags)
{ {
int error; int error;
struct file *file; struct file *file;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册