From patchwork Mon Jul 9 08:36:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10513879 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 6B696604D4 for ; Mon, 9 Jul 2018 08:37:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5753C22362 for ; Mon, 9 Jul 2018 08:37:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B35B27F10; Mon, 9 Jul 2018 08:37:08 +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=-3.6 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,URIBL_SBL autolearn=ham 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 E0E0525D99 for ; Mon, 9 Jul 2018 08:37:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 820726E3D8; Mon, 9 Jul 2018 08:37:01 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5BF586E3D3 for ; Mon, 9 Jul 2018 08:37:00 +0000 (UTC) Received: by mail-ed1-x543.google.com with SMTP id e19-v6so13258568edq.7 for ; Mon, 09 Jul 2018 01:37:00 -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=OBCzw08VgKkjE2xja9WidJUg36mrD2Mca0eSXgRqBhQ=; b=MLz77+gE49Vblb4DV3F3ChCK0u+JUNoZ2PRxeNIMHYgOITt4V22FQ+Kw5BGuHSuGKz AjEu/EIZ9p2rNlY0UKSAsshLgZ6CAoiywhXJjyr5/kmxYQG8OTvvcjR+rOD7q3gqBrNP i8Uaw1ymwMhMdF+5nO+rvOs30peyYK+QfLf4GXGinvswlHxJHrkFswKHC+soeoSgDQLK oV5ad0vrcg3XS3lTRIaUhuz3sZuM9LN/z5uRNmgfSNurQXTrr+l9eeJlAxfx2/Yh4MJd Q+OFe3m2SZaRwd0/rI40/YzFPAcgfj1mthRf0B67r6cc9JsCSTwBeGnWMia6tiChxIQ6 suAw== X-Gm-Message-State: APt69E1Fz1Xq0t90R0/f8FYtffqCMUEPllfU6YNQ9xEVLHwJMmBNRqFE Reck6LHoQlg1D1TFESOsXfmZ3Q== X-Google-Smtp-Source: AAOMgpeYrfhfxKS2I9kxGPmgZGxVOhexWsI/B8PDyWi5V0LHR2pz3vZ+RRztBSlQ+J0YE5ui0VH+8g== X-Received: by 2002:a50:8e09:: with SMTP id 9-v6mr81145edw.101.1531125419067; Mon, 09 Jul 2018 01:36:59 -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.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 01:36:58 -0700 (PDT) From: Daniel Vetter To: LKML Date: Mon, 9 Jul 2018 10:36:40 +0200 Message-Id: <20180709083650.23549-2-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 02/12] blk: 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: Jens Axboe , Kate Stewart , Arnd Bergmann , Daniel Vetter , Intel Graphics Development , DRI Development , Joseph Qi , Shaohua Li , Greg Kroah-Hartman , 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 Makes the macros resilient against if {} else {} blocks right afterwards. Signed-off-by: Daniel Vetter Cc: Tejun Heo Cc: Jens Axboe Cc: Shaohua Li Cc: Kate Stewart Cc: Greg Kroah-Hartman Cc: Joseph Qi Cc: Daniel Vetter Cc: Arnd Bergmann Acked-by: Tejun Heo --- include/linux/blk-cgroup.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h index 6c666fd7de3c..f1c3afe42c26 100644 --- a/include/linux/blk-cgroup.h +++ b/include/linux/blk-cgroup.h @@ -382,7 +382,7 @@ static inline void blkg_put(struct blkcg_gq *blkg) */ #define blkg_for_each_descendant_pre(d_blkg, pos_css, p_blkg) \ css_for_each_descendant_pre((pos_css), &(p_blkg)->blkcg->css) \ - if (((d_blkg) = __blkg_lookup(css_to_blkcg(pos_css), \ + for_each_if (((d_blkg) = __blkg_lookup(css_to_blkcg(pos_css), \ (p_blkg)->q, false))) /** @@ -397,7 +397,7 @@ static inline void blkg_put(struct blkcg_gq *blkg) */ #define blkg_for_each_descendant_post(d_blkg, pos_css, p_blkg) \ css_for_each_descendant_post((pos_css), &(p_blkg)->blkcg->css) \ - if (((d_blkg) = __blkg_lookup(css_to_blkcg(pos_css), \ + for_each_if (((d_blkg) = __blkg_lookup(css_to_blkcg(pos_css), \ (p_blkg)->q, false))) /**