Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d65af78 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds
Browse files

sysctl: remove "struct file *" argument of ->proc_handler



It's unused.

It isn't needed -- read or write flag is already passed and sysctl
shouldn't care about the rest.

It _was_ used in two places at arch/frv for some reason.

Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c0d0787b
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ static int user_atoi(char __user *ubuf, size_t len)
/*
 * Send us to sleep.
 */
static int sysctl_pm_do_suspend(ctl_table *ctl, int write, struct file *filp,
static int sysctl_pm_do_suspend(ctl_table *ctl, int write,
				void __user *buffer, size_t *lenp, loff_t *fpos)
{
	int retval, mode;
@@ -198,13 +198,13 @@ static int try_set_cmode(int new_cmode)
}


static int cmode_procctl(ctl_table *ctl, int write, struct file *filp,
static int cmode_procctl(ctl_table *ctl, int write,
			 void __user *buffer, size_t *lenp, loff_t *fpos)
{
	int new_cmode;

	if (!write)
		return proc_dointvec(ctl, write, filp, buffer, lenp, fpos);
		return proc_dointvec(ctl, write, buffer, lenp, fpos);

	new_cmode = user_atoi(buffer, *lenp);

@@ -301,13 +301,13 @@ static int try_set_cm(int new_cm)
	return 0;
}

static int p0_procctl(ctl_table *ctl, int write, struct file *filp,
static int p0_procctl(ctl_table *ctl, int write,
		      void __user *buffer, size_t *lenp, loff_t *fpos)
{
	int new_p0;

	if (!write)
		return proc_dointvec(ctl, write, filp, buffer, lenp, fpos);
		return proc_dointvec(ctl, write, buffer, lenp, fpos);

	new_p0 = user_atoi(buffer, *lenp);

@@ -345,13 +345,13 @@ static int p0_sysctl(ctl_table *table,
	return 1;
}

static int cm_procctl(ctl_table *ctl, int write, struct file *filp,
static int cm_procctl(ctl_table *ctl, int write,
		      void __user *buffer, size_t *lenp, loff_t *fpos)
{
	int new_cm;

	if (!write)
		return proc_dointvec(ctl, write, filp, buffer, lenp, fpos);
		return proc_dointvec(ctl, write, buffer, lenp, fpos);

	new_cm = user_atoi(buffer, *lenp);

+9 −9
Original line number Diff line number Diff line
@@ -56,12 +56,12 @@ int sysctl_lasatstring(ctl_table *table,


/* And the same for proc */
int proc_dolasatstring(ctl_table *table, int write, struct file *filp,
int proc_dolasatstring(ctl_table *table, int write,
		       void *buffer, size_t *lenp, loff_t *ppos)
{
	int r;

	r = proc_dostring(table, write, filp, buffer, lenp, ppos);
	r = proc_dostring(table, write, buffer, lenp, ppos);
	if ((!write) || r)
		return r;

@@ -71,12 +71,12 @@ int proc_dolasatstring(ctl_table *table, int write, struct file *filp,
}

/* proc function to write EEPROM after changing int entry */
int proc_dolasatint(ctl_table *table, int write, struct file *filp,
int proc_dolasatint(ctl_table *table, int write,
		       void *buffer, size_t *lenp, loff_t *ppos)
{
	int r;

	r = proc_dointvec(table, write, filp, buffer, lenp, ppos);
	r = proc_dointvec(table, write, buffer, lenp, ppos);
	if ((!write) || r)
		return r;

@@ -89,7 +89,7 @@ int proc_dolasatint(ctl_table *table, int write, struct file *filp,
static int rtctmp;

/* proc function to read/write RealTime Clock */
int proc_dolasatrtc(ctl_table *table, int write, struct file *filp,
int proc_dolasatrtc(ctl_table *table, int write,
		       void *buffer, size_t *lenp, loff_t *ppos)
{
	struct timespec ts;
@@ -102,7 +102,7 @@ int proc_dolasatrtc(ctl_table *table, int write, struct file *filp,
		if (rtctmp < 0)
			rtctmp = 0;
	}
	r = proc_dointvec(table, write, filp, buffer, lenp, ppos);
	r = proc_dointvec(table, write, buffer, lenp, ppos);
	if (r)
		return r;

@@ -154,7 +154,7 @@ int sysctl_lasat_rtc(ctl_table *table,
#endif

#ifdef CONFIG_INET
int proc_lasat_ip(ctl_table *table, int write, struct file *filp,
int proc_lasat_ip(ctl_table *table, int write,
		       void *buffer, size_t *lenp, loff_t *ppos)
{
	unsigned int ip;
@@ -231,12 +231,12 @@ static int sysctl_lasat_prid(ctl_table *table,
	return 0;
}

int proc_lasat_prid(ctl_table *table, int write, struct file *filp,
int proc_lasat_prid(ctl_table *table, int write,
		       void *buffer, size_t *lenp, loff_t *ppos)
{
	int r;

	r = proc_dointvec(table, write, filp, buffer, lenp, ppos);
	r = proc_dointvec(table, write, buffer, lenp, ppos);
	if (r < 0)
		return r;
	if (write) {
+4 −5
Original line number Diff line number Diff line
@@ -50,10 +50,9 @@ static struct platform_device *appldata_pdev;
 * /proc entries (sysctl)
 */
static const char appldata_proc_name[APPLDATA_PROC_NAME_LENGTH] = "appldata";
static int appldata_timer_handler(ctl_table *ctl, int write, struct file *filp,
static int appldata_timer_handler(ctl_table *ctl, int write,
				  void __user *buffer, size_t *lenp, loff_t *ppos);
static int appldata_interval_handler(ctl_table *ctl, int write,
					 struct file *filp,
					 void __user *buffer,
					 size_t *lenp, loff_t *ppos);

@@ -247,7 +246,7 @@ __appldata_vtimer_setup(int cmd)
 * Start/Stop timer, show status of timer (0 = not active, 1 = active)
 */
static int
appldata_timer_handler(ctl_table *ctl, int write, struct file *filp,
appldata_timer_handler(ctl_table *ctl, int write,
			   void __user *buffer, size_t *lenp, loff_t *ppos)
{
	int len;
@@ -289,7 +288,7 @@ appldata_timer_handler(ctl_table *ctl, int write, struct file *filp,
 * current timer interval.
 */
static int
appldata_interval_handler(ctl_table *ctl, int write, struct file *filp,
appldata_interval_handler(ctl_table *ctl, int write,
			   void __user *buffer, size_t *lenp, loff_t *ppos)
{
	int len, interval;
@@ -335,7 +334,7 @@ appldata_interval_handler(ctl_table *ctl, int write, struct file *filp,
 * monitoring (0 = not in process, 1 = in process)
 */
static int
appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
appldata_generic_handler(ctl_table *ctl, int write,
			   void __user *buffer, size_t *lenp, loff_t *ppos)
{
	struct appldata_ops *ops = NULL, *tmp_ops;
+2 −2
Original line number Diff line number Diff line
@@ -881,11 +881,11 @@ static int debug_active=1;
 * if debug_active is already off
 */
static int
s390dbf_procactive(ctl_table *table, int write, struct file *filp,
s390dbf_procactive(ctl_table *table, int write,
                     void __user *buffer, size_t *lenp, loff_t *ppos)
{
	if (!write || debug_stoppable || !debug_active)
		return proc_dointvec(table, write, filp, buffer, lenp, ppos);
		return proc_dointvec(table, write, buffer, lenp, ppos);
	else
		return 0;
}
+2 −2
Original line number Diff line number Diff line
@@ -262,7 +262,7 @@ cmm_skip_blanks(char *cp, char **endp)
static struct ctl_table cmm_table[];

static int
cmm_pages_handler(ctl_table *ctl, int write, struct file *filp,
cmm_pages_handler(ctl_table *ctl, int write,
		  void __user *buffer, size_t *lenp, loff_t *ppos)
{
	char buf[16], *p;
@@ -303,7 +303,7 @@ cmm_pages_handler(ctl_table *ctl, int write, struct file *filp,
}

static int
cmm_timeout_handler(ctl_table *ctl, int write, struct file *filp,
cmm_timeout_handler(ctl_table *ctl, int write,
		    void __user *buffer, size_t *lenp, loff_t *ppos)
{
	char buf[64], *p;
Loading