Linux cgroups development
 help / color / mirror / Atom feed
From: zzuedu2000-9Onoh4P/yGk@public.gmane.org
To: tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
	hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Markus.Elfring-S0/GAf8tV78@public.gmane.org,
	songmuchun-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org,
	buddy.zhang-Dw/NWeUnuQfQT0dZR+AlfA@public.gmane.org,
	Wei Fenghai <zzuedu2000-9Onoh4P/yGk@public.gmane.org>
Subject: [PATCH] cgroup: Refactor two assignments in css_task_iter_next_css_set()
Date: Sun, 14 Jun 2020 10:28:33 +0800	[thread overview]
Message-ID: <20200614022833.2641-1-zzuedu2000@163.com> (raw)

From: Wei Fenghai <zzuedu2000-9Onoh4P/yGk@public.gmane.org>

Combine two assignments for the variable ‘l’ into one statement.

Signed-off-by: Wei Fenghai <zzuedu2000-9Onoh4P/yGk@public.gmane.org>
---
 kernel/cgroup/cgroup.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 1ea181a58465..c3e6db6e44d8 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -4352,8 +4352,7 @@ static struct css_set *css_task_iter_next_css_set(struct css_task_iter *it)
 	}
 
 	/* find the next cset */
-	l = it->cset_pos;
-	l = l->next;
+	l = it->cset_pos->next;
 	if (l == it->cset_head) {
 		it->cset_pos = NULL;
 		return NULL;
-- 
2.17.1



             reply	other threads:[~2020-06-14  2:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-14  2:28 zzuedu2000-9Onoh4P/yGk [this message]
2020-06-14 18:10 ` [PATCH] cgroup: Refactor two assignments in css_task_iter_next_css_set() James Bottomley
2020-06-14 23:22   ` zzuedu2000
     [not found]     ` <20200614232224.1804-1-zzuedu2000-9Onoh4P/yGk@public.gmane.org>
2020-06-15  1:11       ` Zefan Li

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=20200614022833.2641-1-zzuedu2000@163.com \
    --to=zzuedu2000-9onoh4p/ygk@public.gmane.org \
    --cc=Markus.Elfring-S0/GAf8tV78@public.gmane.org \
    --cc=buddy.zhang-Dw/NWeUnuQfQT0dZR+AlfA@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=songmuchun-EC8Uxl6Npydl57MIdRCFDg@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox