From patchwork Mon Jul 9 08:36:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10513909 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 51A5E603D7 for ; Mon, 9 Jul 2018 08:37:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D4D428A54 for ; Mon, 9 Jul 2018 08:37:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3132328A5A; Mon, 9 Jul 2018 08:37:39 +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=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 C66DC28A54 for ; Mon, 9 Jul 2018 08:37:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BAD796E3F1; Mon, 9 Jul 2018 08:37:10 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) by gabe.freedesktop.org (Postfix) with ESMTPS id B61D76E3EB for ; Mon, 9 Jul 2018 08:37:08 +0000 (UTC) Received: by mail-ed1-x544.google.com with SMTP id v22-v6so13272035edq.4 for ; Mon, 09 Jul 2018 01:37:08 -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=607ngiR7GJWd54iJ6atEwnm5vRYqqMJLNDix3AgXbFU=; b=GsRq82V4RuLU2Vi5SrmB2YDzqaBJIGt6SDJ3jGi3JPpjn5f7y0DfvFmjWLas9uGZex Nsm0F4ek25+Ps3Gl0hSL4xlKz78b6pu0qRJTwAngCXDsB6DE2WGuXIoalXl+Bv0np2U9 ym+DSEZbbYKhaPoQUrYZltAUIG6W5yfdK9ZDqJftAnCzhNfum23T6ovjuB7LByQmWpar ob80jVGhsN3sLRDY4R0GcmBN3BgW6rkMhOg2h6aIUAdM97AYlqgB2wp8bDxfW8GtV26g umMrKhid3e+CH0vOLbkambe8OEwVHNuZHcOGPfhkkM1luHTU7FjSDtIAZFYrzDgsJU1C 53vA== X-Gm-Message-State: APt69E3r+RWaY6Zs1lWWztD92R9mNY+YgdHAY+3oRlR+JwCUzUyF1Als 4wwuTrtFmhnwj+RaboER5h1k7A== X-Google-Smtp-Source: AAOMgpfeaLpsMczLfb2+MPzhVByFaFPUEvju+zfZpTgqnTGbTnML0cZbDHcgpRYfP5OQeJ/+GPivfg== X-Received: by 2002:a50:a2e5:: with SMTP id 92-v6mr19989986edm.106.1531125427354; Mon, 09 Jul 2018 01:37:07 -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.37.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 01:37:06 -0700 (PDT) From: Daniel Vetter To: LKML Date: Mon, 9 Jul 2018 10:36:47 +0200 Message-Id: <20180709083650.23549-9-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 09/12] nubus: 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 , Finn Thain , linux-m68k@lists.linux-m68k.org, DRI Development , 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 inverted check compared to the open-coded version. Signed-off-by: Daniel Vetter Cc: Finn Thain Cc: linux-m68k@lists.linux-m68k.org Acked-by: Finn Thain --- include/linux/nubus.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/nubus.h b/include/linux/nubus.h index eba50b057f6f..17fd07578ef7 100644 --- a/include/linux/nubus.h +++ b/include/linux/nubus.h @@ -127,7 +127,7 @@ struct nubus_rsrc *nubus_next_rsrc_or_null(struct nubus_rsrc *from); for (f = nubus_first_rsrc_or_null(); f; f = nubus_next_rsrc_or_null(f)) #define for_each_board_func_rsrc(b, f) \ - for_each_func_rsrc(f) if (f->board != b) {} else + for_each_func_rsrc(f) for_each_if (f->board == b) /* These are somewhat more NuBus-specific. They all return 0 for success and -1 for failure, as you'd expect. */