Skip to content

Commit

Permalink
mm cleanup: shmem_file_setup: 'char *' -> 'const char *' for name arg…
Browse files Browse the repository at this point in the history
…ument

As function shmem_file_setup does not modify/allocate/free/pass given
filename - mark it as const.

Signed-off-by: Sergei Trofimovich <[email protected]>
Cc: Hugh Dickins <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Sergei Trofimovich authored and torvalds committed Jun 17, 2009
1 parent aca8bf3 commit 168f5ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);

Expand Down
2 changes: 1 addition & 1 deletion mm/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 168f5ac

Please sign in to comment.