Commit 855d9765 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds

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@avx2Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 1240ea0d
...@@ -499,6 +499,14 @@ struct proc_dir_entry *proc_create_data(const char *name, umode_t mode, ...@@ -499,6 +499,14 @@ struct proc_dir_entry *proc_create_data(const char *name, umode_t mode,
} }
EXPORT_SYMBOL(proc_create_data); EXPORT_SYMBOL(proc_create_data);
struct proc_dir_entry *proc_create(const char *name, umode_t mode,
struct proc_dir_entry *parent,
const struct file_operations *proc_fops)
{
return proc_create_data(name, mode, parent, proc_fops, NULL);
}
EXPORT_SYMBOL(proc_create);
void proc_set_size(struct proc_dir_entry *de, loff_t size) void proc_set_size(struct proc_dir_entry *de, loff_t size)
{ {
de->size = size; de->size = size;
......
...@@ -28,13 +28,7 @@ extern struct proc_dir_entry *proc_create_data(const char *, umode_t, ...@@ -28,13 +28,7 @@ extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
const struct file_operations *, const struct file_operations *,
void *); void *);
static inline struct proc_dir_entry *proc_create( struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct file_operations *proc_fops);
const char *name, umode_t mode, struct proc_dir_entry *parent,
const struct file_operations *proc_fops)
{
return proc_create_data(name, mode, parent, proc_fops, NULL);
}
extern void proc_set_size(struct proc_dir_entry *, loff_t); extern void proc_set_size(struct proc_dir_entry *, loff_t);
extern void proc_set_user(struct proc_dir_entry *, kuid_t, kgid_t); extern void proc_set_user(struct proc_dir_entry *, kuid_t, kgid_t);
extern void *PDE_DATA(const struct inode *); extern void *PDE_DATA(const struct inode *);
......
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