Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sysctl: Remove superfluous __do_proc_* indirection

Remove "__" from __do_proc_do{intvec,uintvec,ulongvec_minmax} internal
functions and delete their corresponding do_proc_do* wrappers. These
indirections are unnecessary as they do not add extra logic nor do they
indicate a layer separation.

Signed-off-by: Joel Granados <joel.granados@kernel.org>

+13 -39
+13 -39
kernel/sysctl.c
··· 398 398 399 399 static const char proc_wspace_sep[] = { ' ', '\t', '\n' }; 400 400 401 - static int __do_proc_dointvec(const struct ctl_table *table, int write, 402 - void *buffer, size_t *lenp, loff_t *ppos, 403 - int (*conv)(bool *negp, unsigned long *lvalp, 404 - int *valp, int write, 405 - const struct ctl_table *table)) 401 + 402 + static int do_proc_dointvec(const struct ctl_table *table, int write, 403 + void *buffer, size_t *lenp, loff_t *ppos, 404 + int (*conv)(bool *negp, unsigned long *lvalp, int *valp, 405 + int write, const struct ctl_table *table)) 406 406 { 407 407 int *i, vleft, first = 1, err = 0; 408 408 size_t left; ··· 470 470 return err; 471 471 } 472 472 473 - static int do_proc_dointvec(const struct ctl_table *table, int write, 474 - void *buffer, size_t *lenp, loff_t *ppos, 475 - int (*conv)(bool *negp, unsigned long *lvalp, int *valp, 476 - int write, const struct ctl_table *table)) 477 - { 478 - return __do_proc_dointvec(table, write, buffer, lenp, ppos, conv); 479 - } 480 - 481 473 static int do_proc_douintvec_w(const struct ctl_table *table, void *buffer, 482 474 size_t *lenp, loff_t *ppos, 483 475 int (*conv)(unsigned long *lvalp, ··· 518 526 519 527 return 0; 520 528 521 - /* This is in keeping with old __do_proc_dointvec() */ 522 529 bail_early: 523 530 *ppos += *lenp; 524 531 return err; ··· 553 562 return err; 554 563 } 555 564 556 - static int __do_proc_douintvec(const struct ctl_table *table, int write, 557 - void *buffer, size_t *lenp, loff_t *ppos, 558 - int (*conv)(unsigned long *lvalp, 559 - unsigned int *valp, int write, 560 - const struct ctl_table *table)) 565 + int do_proc_douintvec(const struct ctl_table *table, int write, void *buffer, 566 + size_t *lenp, loff_t *ppos, 567 + int (*conv)(unsigned long *lvalp, unsigned int *valp, 568 + int write, const struct ctl_table *table)) 561 569 { 562 570 unsigned int vleft; 563 571 ··· 582 592 if (write) 583 593 return do_proc_douintvec_w(table, buffer, lenp, ppos, conv); 584 594 return do_proc_douintvec_r(table, buffer, lenp, ppos, conv); 585 - } 586 - 587 - int do_proc_douintvec(const struct ctl_table *table, int write, 588 - void *buffer, size_t *lenp, loff_t *ppos, 589 - int (*conv)(unsigned long *lvalp, 590 - unsigned int *valp, int write, 591 - const struct ctl_table *table)) 592 - { 593 - return __do_proc_douintvec(table, write, buffer, lenp, ppos, conv); 594 595 } 595 596 596 597 /** ··· 812 831 } 813 832 EXPORT_SYMBOL_GPL(proc_dou8vec_minmax); 814 833 815 - static int __do_proc_doulongvec_minmax(const struct ctl_table *table, 816 - int write, void *buffer, size_t *lenp, loff_t *ppos, 817 - unsigned long convmul, unsigned long convdiv) 834 + static int do_proc_doulongvec_minmax(const struct ctl_table *table, int write, 835 + void *buffer, size_t *lenp, loff_t *ppos, 836 + unsigned long convmul, 837 + unsigned long convdiv) 818 838 { 819 839 unsigned long *i, *min, *max; 820 840 int vleft, first = 1, err = 0; ··· 884 902 out: 885 903 *ppos += *lenp; 886 904 return err; 887 - } 888 - 889 - static int do_proc_doulongvec_minmax(const struct ctl_table *table, int write, 890 - void *buffer, size_t *lenp, loff_t *ppos, unsigned long convmul, 891 - unsigned long convdiv) 892 - { 893 - return __do_proc_doulongvec_minmax(table, write, buffer, lenp, ppos, 894 - convmul, convdiv); 895 905 } 896 906 897 907 /**