mm cleanup: shmem_file_setup: 'char *' -> 'const char *' for name argument
authorSergei Trofimovich <slyfox@inbox.ru>
Tue, 16 Jun 2009 22:33:02 +0000 (15:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jun 2009 02:47:44 +0000 (19:47 -0700)
As function shmem_file_setup does not modify/allocate/free/pass given
filename - mark it as const.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/mm.h
mm/shmem.c

index f0473a88ca2e0a220a2557b2be2bbdd3d26ce488..d88d6fc530ade07b88272c033804404c064c2440 100644 (file)
@@ -724,7 +724,7 @@ static inline int shmem_lock(struct file *file, int lock,
        return 0;
 }
 #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 *);
 
index 47ab191822876c673249d77fb08c4ad7430a598f..e89d7ec18eda46d42abf68c3994db0e33cfded06 100644 (file)
@@ -2612,7 +2612,7 @@ int shmem_unuse(swp_entry_t entry, struct page *page)
  * @size: size to be set for the file
  * @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;
        struct file *file;