[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1274802411-26613-1-git-send-email-wad@chromium.org>
Date: Tue, 25 May 2010 10:46:50 -0500
From: Will Drewry <wad@...omium.org>
To: linux-kernel@...r.kernel.org
Cc: Al Viro <viro@...iv.linux.org.uk>, Nick Piggin <npiggin@...e.de>,
Tejun Heo <tj@...nel.org>,
Scott James Remnant <scott@...ntu.com>,
Vegard Nossum <vegard.nossum@...il.com>,
Harald Hoyer <harald@...hat.com>,
Christoph Lameter <cl@...ux-foundation.org>, agk@...hat.com,
snitzer@...hat.com, Will Drewry <wad@...omium.org>
Subject: [PATCH 1/2] init: make the path argument a const in name_to_dev_t
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@...omium.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists