diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/debugfs/file.c | 2 | ||||
| -rw-r--r-- | fs/sysfs/file.c | 12 | ||||
| -rw-r--r-- | fs/sysfs/group.c | 6 |
3 files changed, 4 insertions, 16 deletions
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c index 568304d058a3..90f76575c056 100644 --- a/fs/debugfs/file.c +++ b/fs/debugfs/file.c | |||
| @@ -428,7 +428,7 @@ static ssize_t write_file_bool(struct file *file, const char __user *user_buf, | |||
| 428 | size_t count, loff_t *ppos) | 428 | size_t count, loff_t *ppos) |
| 429 | { | 429 | { |
| 430 | char buf[32]; | 430 | char buf[32]; |
| 431 | int buf_size; | 431 | size_t buf_size; |
| 432 | bool bv; | 432 | bool bv; |
| 433 | u32 *val = file->private_data; | 433 | u32 *val = file->private_data; |
| 434 | 434 | ||
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index da3fefe91a8f..1ad8c93c1b85 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c | |||
| @@ -24,13 +24,6 @@ | |||
| 24 | 24 | ||
| 25 | #include "sysfs.h" | 25 | #include "sysfs.h" |
| 26 | 26 | ||
| 27 | /* used in crash dumps to help with debugging */ | ||
| 28 | static char last_sysfs_file[PATH_MAX]; | ||
| 29 | void sysfs_printk_last_file(void) | ||
| 30 | { | ||
| 31 | printk(KERN_EMERG "last sysfs file: %s\n", last_sysfs_file); | ||
| 32 | } | ||
| 33 | |||
| 34 | /* | 27 | /* |
| 35 | * There's one sysfs_buffer for each open file and one | 28 | * There's one sysfs_buffer for each open file and one |
| 36 | * sysfs_open_dirent for each sysfs_dirent with one or more open | 29 | * sysfs_open_dirent for each sysfs_dirent with one or more open |
| @@ -337,11 +330,6 @@ static int sysfs_open_file(struct inode *inode, struct file *file) | |||
| 337 | struct sysfs_buffer *buffer; | 330 | struct sysfs_buffer *buffer; |
| 338 | const struct sysfs_ops *ops; | 331 | const struct sysfs_ops *ops; |
| 339 | int error = -EACCES; | 332 | int error = -EACCES; |
| 340 | char *p; | ||
| 341 | |||
| 342 | p = d_path(&file->f_path, last_sysfs_file, sizeof(last_sysfs_file)); | ||
| 343 | if (!IS_ERR(p)) | ||
| 344 | memmove(last_sysfs_file, p, strlen(p) + 1); | ||
| 345 | 333 | ||
| 346 | /* need attr_sd for attr and ops, its parent for kobj */ | 334 | /* need attr_sd for attr and ops, its parent for kobj */ |
| 347 | if (!sysfs_get_active(attr_sd)) | 335 | if (!sysfs_get_active(attr_sd)) |
diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c index c8769dc222d8..194414f8298c 100644 --- a/fs/sysfs/group.c +++ b/fs/sysfs/group.c | |||
| @@ -101,9 +101,9 @@ int sysfs_create_group(struct kobject *kobj, | |||
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | /** | 103 | /** |
| 104 | * sysfs_update_group - given a directory kobject, create an attribute group | 104 | * sysfs_update_group - given a directory kobject, update an attribute group |
| 105 | * @kobj: The kobject to create the group on | 105 | * @kobj: The kobject to update the group on |
| 106 | * @grp: The attribute group to create | 106 | * @grp: The attribute group to update |
| 107 | * | 107 | * |
| 108 | * This function updates an attribute group. Unlike | 108 | * This function updates an attribute group. Unlike |
| 109 | * sysfs_create_group(), it will explicitly not warn or error if any | 109 | * sysfs_create_group(), it will explicitly not warn or error if any |
