uml: const and other tidying
This patch also does some improvements for uml code. Improvements include dropping unnecessary cast, killing some unnecessary code and still some constifying for pointers etc.. Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
9226b83847
commit
c0a9290ecf
@ -229,7 +229,7 @@ static int proc_ide_read_media(char *page, char **start, off_t off, int count,
|
||||
return len;
|
||||
}
|
||||
|
||||
static void make_ide_entries(char *dev_name)
|
||||
static void make_ide_entries(const char *dev_name)
|
||||
{
|
||||
struct proc_dir_entry *dir, *ent;
|
||||
char name[64];
|
||||
@ -244,7 +244,7 @@ static void make_ide_entries(char *dev_name)
|
||||
ent->data = NULL;
|
||||
ent->read_proc = proc_ide_read_media;
|
||||
ent->write_proc = NULL;
|
||||
sprintf(name,"ide0/%s", dev_name);
|
||||
snprintf(name, sizeof(name), "ide0/%s", dev_name);
|
||||
proc_symlink(dev_name, proc_ide_root, name);
|
||||
}
|
||||
|
||||
@ -443,7 +443,7 @@ __uml_help(ubd_setup,
|
||||
" cluster filesystem and inappropriate at almost all other times.\n\n"
|
||||
);
|
||||
|
||||
static int udb_setup(char *str)
|
||||
static int udb_setup(const char *str)
|
||||
{
|
||||
printk("udb%s specified on command line is almost certainly a ubd -> "
|
||||
"udb TYPO\n", str);
|
||||
|
Reference in New Issue
Block a user