aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2017-09-08 19:13:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-08 21:26:47 -0400
commit855d97657d4d335970622f0d95ca4966d3f77ee7 (patch)
treeae1977c4af1e7bbd515ab07f2366d56478d0cb79
parent1240ea0dc3bb7066299689c82ebe2861c90a0254 (diff)
proc: uninline proc_create()
Save some code from ~320 invocations all clearing last argument. add/remove: 3/0 grow/shrink: 0/158 up/down: 45/-702 (-657) function old new delta proc_create - 17 +17 __ksymtab_proc_create - 16 +16 __kstrtab_proc_create - 12 +12 yam_init_driver 301 298 -3 ... cifs_proc_init 249 228 -21 via_fb_pci_probe 2304 2280 -24 Link: http://lkml.kernel.org/r/20170819094702.GA27864@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--fs/proc/generic.c8
-rw-r--r--include/linux/proc_fs.h8
2 files changed, 9 insertions, 7 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index e3cda0b5968f..85566abe6f83 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -499,6 +499,14 @@ out:
499} 499}
500EXPORT_SYMBOL(proc_create_data); 500EXPORT_SYMBOL(proc_create_data);
501 501
502struct proc_dir_entry *proc_create(const char *name, umode_t mode,
503 struct proc_dir_entry *parent,
504 const struct file_operations *proc_fops)
505{
506 return proc_create_data(name, mode, parent, proc_fops, NULL);
507}
508EXPORT_SYMBOL(proc_create);
509
502void proc_set_size(struct proc_dir_entry *de, loff_t size) 510void proc_set_size(struct proc_dir_entry *de, loff_t size)
503{ 511{
504 de->size = size; 512 de->size = size;
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 2d2bf592d9db..76124dd4e36d 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -28,13 +28,7 @@ extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
28 const struct file_operations *, 28 const struct file_operations *,
29 void *); 29 void *);
30 30
31static inline struct proc_dir_entry *proc_create( 31struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct file_operations *proc_fops);
32 const char *name, umode_t mode, struct proc_dir_entry *parent,
33 const struct file_operations *proc_fops)
34{
35 return proc_create_data(name, mode, parent, proc_fops, NULL);
36}
37
38extern void proc_set_size(struct proc_dir_entry *, loff_t); 32extern void proc_set_size(struct proc_dir_entry *, loff_t);
39extern void proc_set_user(struct proc_dir_entry *, kuid_t, kgid_t); 33extern void proc_set_user(struct proc_dir_entry *, kuid_t, kgid_t);
40extern void *PDE_DATA(const struct inode *); 34extern void *PDE_DATA(const struct inode *);