aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMimi Zohar <zohar@linux.vnet.ibm.com>2017-09-12 22:45:33 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-14 23:18:45 -0400
commit711aab1dbb324d321e3d84368a435a78908c7bce (patch)
tree59f2bfbe02d994f4f69dc8d44fc8a4a4bd12228b
parent6ed0529fef09f50ef41d396cb55c5519e4936b16 (diff)
vfs: constify path argument to kernel_read_file_from_path
This patch constifies the path argument to kernel_read_file_from_path(). Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com> Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--fs/exec.c2
-rw-r--r--include/linux/fs.h2
-rw-r--r--sound/oss/sound_firmware.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 69a543259aa5..ac34d9724684 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -955,7 +955,7 @@ out:
955} 955}
956EXPORT_SYMBOL_GPL(kernel_read_file); 956EXPORT_SYMBOL_GPL(kernel_read_file);
957 957
958int kernel_read_file_from_path(char *path, void **buf, loff_t *size, 958int kernel_read_file_from_path(const char *path, void **buf, loff_t *size,
959 loff_t max_size, enum kernel_read_file_id id) 959 loff_t max_size, enum kernel_read_file_id id)
960{ 960{
961 struct file *file; 961 struct file *file;
diff --git a/include/linux/fs.h b/include/linux/fs.h
index bc475dfeb4ce..339e73742e73 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2815,7 +2815,7 @@ static inline const char *kernel_read_file_id_str(enum kernel_read_file_id id)
2815 2815
2816extern int kernel_read_file(struct file *, void **, loff_t *, loff_t, 2816extern int kernel_read_file(struct file *, void **, loff_t *, loff_t,
2817 enum kernel_read_file_id); 2817 enum kernel_read_file_id);
2818extern int kernel_read_file_from_path(char *, void **, loff_t *, loff_t, 2818extern int kernel_read_file_from_path(const char *, void **, loff_t *, loff_t,
2819 enum kernel_read_file_id); 2819 enum kernel_read_file_id);
2820extern int kernel_read_file_from_fd(int, void **, loff_t *, loff_t, 2820extern int kernel_read_file_from_fd(int, void **, loff_t *, loff_t,
2821 enum kernel_read_file_id); 2821 enum kernel_read_file_id);
diff --git a/sound/oss/sound_firmware.h b/sound/oss/sound_firmware.h
index da4c67e005ed..2be465277ba0 100644
--- a/sound/oss/sound_firmware.h
+++ b/sound/oss/sound_firmware.h
@@ -21,7 +21,7 @@ static inline int mod_firmware_load(const char *fn, char **fp)
21 loff_t size; 21 loff_t size;
22 int err; 22 int err;
23 23
24 err = kernel_read_file_from_path((char *)fn, (void **)fp, &size, 24 err = kernel_read_file_from_path(fn, (void **)fp, &size,
25 131072, READING_FIRMWARE); 25 131072, READING_FIRMWARE);
26 if (err < 0) 26 if (err < 0)
27 return 0; 27 return 0;