Skip to contentSkip to conversation

do_mounts: Make name_to_dev_t parameter const

PATCH New Jörn Engel 1 participant 1 message Apr 24, 2012 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 do_mounts: Make name_to_dev_t parameter const

Al, would you be a good person to take this patch?

Prevents annoying and unnecessary compiler warnings elsewhere.

include/linux/mount.h +1 -1
index 604f122..10d5323 100644
@@ -111,6 +111,6 @@ extern struct vfsmount *vfs_kern_mount(struct file_system_type *type,
 extern void mnt_set_expiry(struct vfsmount *mnt, struct list_head *expiry_list);
 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 */
init/do_mounts.c +2 -2
index c0851a8..5378145 100644
@@ -93,7 +93,7 @@ no_match:
  *
  * Returns the matching dev_t on success or 0 on failure.
  */
-static dev_t devt_from_partuuid(char *uuid_str)
+static dev_t devt_from_partuuid(const char *uuid_str)
 {
 	dev_t res = 0;
 	struct device *dev = NULL;
@@ -133,7 +133,7 @@ done:
  *	bangs.
  */
 
-dev_t name_to_dev_t(char *name)
+dev_t name_to_dev_t(const char *name)
 {
 	char s[32];
 	char *p;
Signature · 1 line
1.7.9.1