public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] init: make the path argument a const in name_to_dev_t
@ 2010-05-25 15:46 Will Drewry
  2010-05-25 15:46 ` [PATCH 2/2] init, mount: export the name_to_dev_t symbol Will Drewry
  0 siblings, 1 reply; 8+ messages in thread
From: Will Drewry @ 2010-05-25 15:46 UTC (permalink / raw)
  To: linux-kernel
  Cc: Al Viro, Nick Piggin, Tejun Heo, Scott James Remnant,
	Vegard Nossum, Harald Hoyer, Christoph Lameter, agk, snitzer,
	Will Drewry

name_to_dev_t takes a char * argument which it never modifies.  This
change converts it to a const char *.

(This is useful with the second patch in the series which exports the
symbol.  External consumers of the function will now be able to pass in
a const char * without duping or casting away const-ness.)

Signed-off-by: Will Drewry <wad@chromium.org>
---
 include/linux/mount.h |    2 +-
 init/do_mounts.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/mount.h b/include/linux/mount.h
index 4bd0547..ad819a0 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -134,6 +134,6 @@ extern int do_add_mount(struct vfsmount *newmnt, struct path *path,
 
 extern void mark_mounts_for_expiry(struct list_head *mounts);
 
-extern dev_t name_to_dev_t(char *name);
+extern dev_t name_to_dev_t(const char *name);
 
 #endif /* _LINUX_MOUNT_H */
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 0848a5b..a322b13 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -75,7 +75,7 @@ __setup("rw", readwrite);
  *	bangs.
  */
 
-dev_t name_to_dev_t(char *name)
+dev_t name_to_dev_t(const char *name)
 {
 	char s[32];
 	char *p;
-- 
1.7.0.4


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

end of thread, other threads:[~2010-06-08 16:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-25 15:46 [PATCH 1/2] init: make the path argument a const in name_to_dev_t Will Drewry
2010-05-25 15:46 ` [PATCH 2/2] init, mount: export the name_to_dev_t symbol Will Drewry
2010-05-25 15:55   ` Christoph Hellwig
2010-05-25 16:05     ` Alasdair G Kergon
2010-05-25 16:11       ` Will Drewry
2010-05-25 17:21         ` Christoph Hellwig
2010-05-25 18:30           ` Mike Snitzer
2010-06-08 16:02             ` Will Drewry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox