Skip to content

Commit

Permalink
vfs: constify path argument to kernel_read_file_from_path
Browse files Browse the repository at this point in the history
This patch constifies the path argument to kernel_read_file_from_path().

Signed-off-by: Mimi Zohar <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Mimi Zohar authored and torvalds committed Sep 15, 2017
1 parent 6ed0529 commit 711aab1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ int kernel_read_file(struct file *file, void **buf, loff_t *size,
}
EXPORT_SYMBOL_GPL(kernel_read_file);

int kernel_read_file_from_path(char *path, void **buf, loff_t *size,
int kernel_read_file_from_path(const char *path, void **buf, loff_t *size,
loff_t max_size, enum kernel_read_file_id id)
{
struct file *file;
Expand Down
2 changes: 1 addition & 1 deletion include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2815,7 +2815,7 @@ static inline const char *kernel_read_file_id_str(enum kernel_read_file_id id)

extern int kernel_read_file(struct file *, void **, loff_t *, loff_t,
enum kernel_read_file_id);
extern int kernel_read_file_from_path(char *, void **, loff_t *, loff_t,
extern int kernel_read_file_from_path(const char *, void **, loff_t *, loff_t,
enum kernel_read_file_id);
extern int kernel_read_file_from_fd(int, void **, loff_t *, loff_t,
enum kernel_read_file_id);
Expand Down
2 changes: 1 addition & 1 deletion sound/oss/sound_firmware.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ static inline int mod_firmware_load(const char *fn, char **fp)
loff_t size;
int err;

err = kernel_read_file_from_path((char *)fn, (void **)fp, &size,
err = kernel_read_file_from_path(fn, (void **)fp, &size,
131072, READING_FIRMWARE);
if (err < 0)
return 0;
Expand Down

0 comments on commit 711aab1

Please sign in to comment.