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

Commit 4d3bb511 authored by Tejun Heo's avatar Tejun Heo
Browse files

cgroup: drop const from @buffer of cftype->write_string()



cftype->write_string() just passes on the writeable buffer from kernfs
and there's no reason to add const restriction on the buffer.  The
only thing const achieves is unnecessarily complicating parsing of the
buffer.  Drop const from @buffer.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Acked-by: default avatarLi Zefan <lizefan@huawei.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Michal Hocko <mhocko@suse.cz>                                           
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
parent 3dd06ffa
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1408,13 +1408,13 @@ static int tg_set_conf(struct cgroup_subsys_state *css, struct cftype *cft,
}

static int tg_set_conf_u64(struct cgroup_subsys_state *css, struct cftype *cft,
			   const char *buf)
			   char *buf)
{
	return tg_set_conf(css, cft, buf, true);
}

static int tg_set_conf_uint(struct cgroup_subsys_state *css, struct cftype *cft,
			    const char *buf)
			    char *buf)
{
	return tg_set_conf(css, cft, buf, false);
}
+2 −2
Original line number Diff line number Diff line
@@ -1701,13 +1701,13 @@ static int __cfqg_set_weight_device(struct cgroup_subsys_state *css,
}

static int cfqg_set_weight_device(struct cgroup_subsys_state *css,
				  struct cftype *cft, const char *buf)
				  struct cftype *cft, char *buf)
{
	return __cfqg_set_weight_device(css, cft, buf, false);
}

static int cfqg_set_leaf_weight_device(struct cgroup_subsys_state *css,
				       struct cftype *cft, const char *buf)
				       struct cftype *cft, char *buf)
{
	return __cfqg_set_weight_device(css, cft, buf, true);
}
+1 −1
Original line number Diff line number Diff line
@@ -454,7 +454,7 @@ struct cftype {
	 * Returns 0 or -ve error code.
	 */
	int (*write_string)(struct cgroup_subsys_state *css, struct cftype *cft,
			    const char *buffer);
			    char *buffer);
	/*
	 * trigger() callback can be used to get some kick from the
	 * userspace, when the actual string written is not important
+1 −1
Original line number Diff line number Diff line
@@ -2143,7 +2143,7 @@ static int cgroup_procs_write(struct cgroup_subsys_state *css,
}

static int cgroup_release_agent_write(struct cgroup_subsys_state *css,
				      struct cftype *cft, const char *buffer)
				      struct cftype *cft, char *buffer)
{
	struct cgroup_root *root = css->cgroup->root;

+1 −1
Original line number Diff line number Diff line
@@ -442,7 +442,7 @@ static void freezer_change_state(struct freezer *freezer, bool freeze)
}

static int freezer_write(struct cgroup_subsys_state *css, struct cftype *cft,
			 const char *buffer)
			 char *buffer)
{
	bool freeze;

Loading