Commit 48d43bd7 authored by Roland Dreier's avatar Roland Dreier Committed by Linus Torvalds

[PATCH] fix proc_symlink() warning with CONFIG_PROC_FS=n

The last parameter of proc_symlink is usually a "const char *", but the
stub in <linux/proc_fs.h> for CONFIG_PROC_FS=n omits the const and makes
its last parameter a "char *".  This causes a warning about discarding
qualifiers for any code that passes something const for that last
parameter.

This patch fixes that up and also, for neatness's sake, makes the stub for
create_proc_read_entry() match the usual prototype more exactly (use
read_proc_t rather than the underlying function pointer type).
Signed-off-by: default avatarRoland Dreier <roland@topspin.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c7796032
...@@ -206,14 +206,13 @@ static inline struct proc_dir_entry *create_proc_entry(const char *name, ...@@ -206,14 +206,13 @@ static inline struct proc_dir_entry *create_proc_entry(const char *name,
#define remove_proc_entry(name, parent) do {} while (0) #define remove_proc_entry(name, parent) do {} while (0)
static inline struct proc_dir_entry *proc_symlink(const char *name, static inline struct proc_dir_entry *proc_symlink(const char *name,
struct proc_dir_entry *parent,char *dest) {return NULL;} struct proc_dir_entry *parent,const char *dest) {return NULL;}
static inline struct proc_dir_entry *proc_mkdir(const char *name, static inline struct proc_dir_entry *proc_mkdir(const char *name,
struct proc_dir_entry *parent) {return NULL;} struct proc_dir_entry *parent) {return NULL;}
static inline struct proc_dir_entry *create_proc_read_entry(const char *name, static inline struct proc_dir_entry *create_proc_read_entry(const char *name,
mode_t mode, struct proc_dir_entry *base, mode_t mode, struct proc_dir_entry *base,
int (*read_proc)(char *, char **, off_t, int, int *, void *), read_proc_t *read_proc, void * data) { return NULL; }
void * data) { return NULL; }
static inline struct proc_dir_entry *create_proc_info_entry(const char *name, static inline struct proc_dir_entry *create_proc_info_entry(const char *name,
mode_t mode, struct proc_dir_entry *base, get_info_t *get_info) mode_t mode, struct proc_dir_entry *base, get_info_t *get_info)
{ return NULL; } { return NULL; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment