From: Hao Lee <haolee.swjtu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Cc: lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
haolee.swjtu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
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
WARNING: multiple messages have this Message-ID (diff)
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:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-03 2:50 Hao Lee [this message]
2021-01-03 2:50 ` [PATCH] cgroup: Remove unnecessary call to strstrip() Hao Lee
[not found] ` <20210103024846.GA15337-aLGwGs2JoHKXlosIQRE7iA@public.gmane.org>
2021-01-14 12:44 ` Michal Koutný
2021-01-14 12:44 ` Michal Koutný
2021-01-14 17:35 ` Daniel Jordan
2021-01-14 17:35 ` Daniel Jordan
2021-01-15 2:19 ` Hao Lee
2021-01-15 2:19 ` Hao Lee
2021-01-15 20:31 ` Tejun Heo
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-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.