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: 10513881 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 84F12600CA 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 6FD4F22362 for ; Mon, 9 Jul 2018 08:37:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 61C1228068; 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=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 028F927E71 for ; Mon, 9 Jul 2018 08:37:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DEE116E3DB; Mon, 9 Jul 2018 08:37:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5F88A6E3D4 for ; Mon, 9 Jul 2018 08:37:00 +0000 (UTC) Received: by mail-ed1-x542.google.com with SMTP id v22-v6so13271723edq.4 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=Dpqijq2UUajT+89oDFyk8QYbELF6AN147qcAuzaoaury8rmQd8nw8aSW6wGDSKGXlC hikOacqu14Y0mWuuLeNs0b3wyj1IFq9h2LhGGcQOqepApyrmZ8wYGM+KmoqnZ8WvZ7Tt gtxD8nO8tjgTPR4hCKGMAz+URJ9FELmLRP4ZnSqqSx0opQM3nd/zVaVykPATk8gqGvDh OSgZWxDBN509HVIXoQppiPnf2YNEi7iWZJ+CHXAqle/e+aEJsM2kiQieKGBr8S+xvwJO ztd+KnW54w1Au9JPXtpDWQ3CWkMiDxuP96N8xmMfGZShVz9Qn5fzOe0F8yyTM/rJyRNB oWdw== X-Gm-Message-State: APt69E1gcrV1SRkTwRDPgD6AXgQEbqHx2sl3cAxeFM+C9TAhsvTXb3zn oFDn31VJ7+ecfnhoZiY7IpHyKA== 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 Subject: [PATCH 02/12] blk: use for_each_if 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> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - 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: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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))) /**