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

Commit 95e1d765 authored by Saravana Kannan's avatar Saravana Kannan
Browse files

cpufreq: schedutil: Switch from sprintf to scnprintf



sprintf is a banned function. Don't use it for internally authored code.

Change-Id: Ifebe4eed2495f94fce13ea40e608cf82cd8ddae1
Signed-off-by: default avatarSaravana Kannan <skannan@codeaurora.org>
parent 099e9fc7
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -513,7 +513,7 @@ static ssize_t hispeed_load_show(struct gov_attr_set *attr_set, char *buf)
{
	struct sugov_tunables *tunables = to_sugov_tunables(attr_set);

	return sprintf(buf, "%u\n", tunables->hispeed_load);
	return scnprintf(buf, PAGE_SIZE, "%u\n", tunables->hispeed_load);
}

static ssize_t hispeed_load_store(struct gov_attr_set *attr_set,
@@ -533,7 +533,7 @@ static ssize_t hispeed_freq_show(struct gov_attr_set *attr_set, char *buf)
{
	struct sugov_tunables *tunables = to_sugov_tunables(attr_set);

	return sprintf(buf, "%u\n", tunables->hispeed_freq);
	return scnprintf(buf, PAGE_SIZE, "%u\n", tunables->hispeed_freq);
}

static ssize_t hispeed_freq_store(struct gov_attr_set *attr_set,
@@ -565,7 +565,7 @@ static ssize_t pl_show(struct gov_attr_set *attr_set, char *buf)
{
	struct sugov_tunables *tunables = to_sugov_tunables(attr_set);

	return sprintf(buf, "%u\n", tunables->pl);
	return scnprintf(buf, PAGE_SIZE, "%u\n", tunables->pl);
}

static ssize_t pl_store(struct gov_attr_set *attr_set, const char *buf,