From patchwork Mon Jul 9 08:36:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10513887 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 30238600CA for ; Mon, 9 Jul 2018 08:37:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CAC4286F8 for ; Mon, 9 Jul 2018 08:37:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6070928725; Mon, 9 Jul 2018 08:37:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2FF68286F8 for ; Mon, 9 Jul 2018 08:37:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8E0CE6E3E1; Mon, 9 Jul 2018 08:37:05 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by gabe.freedesktop.org (Postfix) with ESMTPS id 95FB36E3D9 for ; Mon, 9 Jul 2018 08:37:01 +0000 (UTC) Received: by mail-ed1-x541.google.com with SMTP id d3-v6so13290004edi.1 for ; Mon, 09 Jul 2018 01:37:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=k8vn/HvfenjIobV8K5/94RK0D1EV/hUIYoYQGqLAxTk=; b=qQ1BK8FboVq2jtYqKSCNZ4PgYYBzWjCSU+lvrWtYEEtl9OHn3Cy8TpD/HbwHGztRgf j8NC2wkaqI8ElUvTnQnV2qSc2G6cxcuKBxr1ITWnuZcaGDgjC6eJOu9tJ5XjJ/Meih6P YJlPAWRDy0emOnGTERJcF2mgGQEby2atdhC/1sDr4O3zXpMiki0NnECJm9y9HeNnK8// RcVViKf2WeGsaagUVuaTzMqUNGkbc1J1Wol+k8XDxKJpC+a/YuPWR0AxVyRLmHc66b6V QHXayqfcfdiGU9ofJRjUVcGJwXJXC/1y1jGijyXus1nuDfZMINhrMgWbr2ggUkia7nuq 4T+w== X-Gm-Message-State: APt69E1hpAsMvwvw73zx0BkBzaFIsVkQg+wb/2EF+K0Ysl/b9k26z125 5gyTJ9eGmb/QXlCOJaBAzD5dEw== X-Google-Smtp-Source: AAOMgpe4QdsPKM2s7HJalVZ6TE7Ys0ablMhEmAlQ0LKSF5sJn5STtsLXzelBTWvHn9penw9r/3Y5wQ== X-Received: by 2002:a50:e885:: with SMTP id f5-v6mr21390996edn.39.1531125420328; Mon, 09 Jul 2018 01:37:00 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:5628:0:496f:7dc5:66d7:a057]) by smtp.gmail.com with ESMTPSA id 8-v6sm340067edv.77.2018.07.09.01.36.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 01:36:59 -0700 (PDT) From: Daniel Vetter To: LKML Date: Mon, 9 Jul 2018 10:36:41 +0200 Message-Id: <20180709083650.23549-3-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180709083650.23549-1-daniel.vetter@ffwll.ch> References: <20180709083650.23549-1-daniel.vetter@ffwll.ch> Subject: [Intel-gfx] [PATCH 03/12] cgroup: use for_each_if X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , Intel Graphics Development , cgroups@vger.kernel.org, DRI Development , Li Zefan , Johannes Weiner , Tejun Heo , Daniel Vetter MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Avoids the need to invert the condition instead of the open-coded version. Signed-off-by: Daniel Vetter Cc: Tejun Heo Cc: Li Zefan Cc: Johannes Weiner Cc: cgroups@vger.kernel.org Acked-by: Tejun Heo --- include/linux/cgroup.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index c9fdf6f57913..666c6200d61d 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -287,9 +287,7 @@ void css_task_iter_end(struct css_task_iter *it); for ((leader) = cgroup_taskset_first((tset), &(dst_css)); \ (leader); \ (leader) = cgroup_taskset_next((tset), &(dst_css))) \ - if ((leader) != (leader)->group_leader) \ - ; \ - else + for_each_if ((leader) == (leader)->group_leader) /* * Inline functions.