From: Sergei Trofimovich <slyich@gmail.com>
To: linux-kernel@vger.kernel.org, trivial@kernel.org
Cc: Sergei Trofimovich <slyfox@inbox.ru>
Subject: [PATCH] cleanup: shmem_file_setup: 'char *' -> 'const char *' for name argument
Date: Sat, 6 Jun 2009 00:58:12 +0300 [thread overview]
Message-ID: <1244239092-8795-1-git-send-email-slyich@gmail.com> (raw)
From: Sergei Trofimovich <slyfox@inbox.ru>
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>
---
include/linux/mm.h | 2 +-
mm/shmem.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index bff1f0d..e2d8d63 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -726,7 +726,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 *);
diff --git a/mm/shmem.c b/mm/shmem.c
index b25f95c..a21d60a 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -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;
--
1.6.0.6
next reply other threads:[~2009-06-05 21:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-05 21:58 Sergei Trofimovich [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-06-05 21:48 [PATCH] cleanup: shmem_file_setup: 'char *' -> 'const char *' for name argument Sergei Trofimovich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1244239092-8795-1-git-send-email-slyich@gmail.com \
--to=slyich@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=slyfox@inbox.ru \
--cc=trivial@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox