lkml.org 
[lkml]   [2021]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] cgroup: Remove unnecessary call to strstrip()
Date
Hello Michal,

Michal Koutný <mkoutny@suse.com> writes:
> On Sun, Jan 03, 2021 at 02:50:01AM +0000, Hao Lee <haolee.swjtu@gmail.com> wrote:
>> The string buf will be stripped in cgroup_procs_write_start() before it
>> is converted to int, so remove this unnecessary call to strstrip().
> Good catch, Hao.
>
> Perhaps the code be then simplified a bit
>
> -- >8 --
> From: =?UTF-8?q?Michal=20Koutn=C3=BD?= <mkoutny@suse.com>
> Date: Thu, 14 Jan 2021 13:23:39 +0100
> Subject: [PATCH] cgroup: cgroup.{procs,threads} factor out common parts
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> The functions cgroup_threads_start and cgroup_procs_start are almost

You meant cgroup_threads_write and cgroup_procs_write.

> kernel/cgroup/cgroup.c | 55 +++++++++++-------------------------------
> 1 file changed, 14 insertions(+), 41 deletions(-)

Ok, sure, that's a good thing.

Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>

\
 
 \ /
  Last update: 2021-01-14 18:38    [W:0.073 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site