From: Hao Lee <haolee.swjtu@gmail.com>
To: tj@kernel.org
Cc: lizefan@huawei.com, hannes@cmpxchg.org, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org, haolee.swjtu@gmail.com
Subject: [PATCH] cgroup: Remove unnecessary call to strstrip()
Date: Sun, 3 Jan 2021 02:50:01 +0000 [thread overview]
Message-ID: <20210103024846.GA15337@haolee.github.io> (raw)
The string buf will be stripped in cgroup_procs_write_start() before it
is converted to int, so remove this unnecessary call to strstrip().
Signed-off-by: Hao Lee <haolee.swjtu@gmail.com>
---
kernel/cgroup/cgroup.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 5e9cb81c088a..8b3554c1113a 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -4774,8 +4774,6 @@ static ssize_t cgroup_threads_write(struct kernfs_open_file *of,
ssize_t ret;
bool locked;
- buf = strstrip(buf);
-
dst_cgrp = cgroup_kn_lock_live(of->kn, false);
if (!dst_cgrp)
return -ENODEV;
--
2.24.1
next reply other threads:[~2021-01-03 2:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-03 2:50 Hao Lee [this message]
2021-01-14 12:44 ` [PATCH] cgroup: Remove unnecessary call to strstrip() Michal Koutný
2021-01-14 17:35 ` Daniel Jordan
2021-01-15 2:19 ` Hao Lee
2021-01-15 20:31 ` Tejun Heo
-- strict thread matches above, loose matches on Subject: below --
2020-09-08 13:33 Hao Lee
2020-10-01 14:46 ` Hao Lee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210103024846.GA15337@haolee.github.io \
--to=haolee.swjtu@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox