From patchwork Mon Jul 9 08:36:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10513939 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 5DE8F600CA for ; Mon, 9 Jul 2018 08:38:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4909F28A59 for ; Mon, 9 Jul 2018 08:38:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D55D28A5E; Mon, 9 Jul 2018 08:38:19 +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 0E67128A59 for ; Mon, 9 Jul 2018 08:38:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4BAC26E406; Mon, 9 Jul 2018 08:37:18 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@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 26C2B6E3F2 for ; Mon, 9 Jul 2018 08:37:12 +0000 (UTC) Received: by mail-ed1-x542.google.com with SMTP id e19-v6so13259015edq.7 for ; Mon, 09 Jul 2018 01:37:12 -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=ECSxS/Tu1J8yJoeTNndRt3Ju+K1/adxa0HpIrDBgnIk=; b=RSQNSDi7Nu5ygcP5Zj/mRBqw9w3yPi7YvfkYuuuEcJU8/qhe4mCb9BEhr211Rl6i5d DuIk5VNaVH5R9Pl/AQbbhS6+dFS5aV1pRffKUrEx9GkQwhGEAGbKfC0zRVDksBMYgEEv 4Kc8PV+ZBR2BwnGjHTVR1uMq3bRapuDAIxT+G9WKO7E/u9OtKKD/ISgEj9HPjWXkSkMG SSlAKWvghJy9aLoGLP5tGF5vLqewqfp2Vmg6sPYoTFiQNi3P8TzlHW4H+wvMZgNnkvGx TJyCYhYMydcA2j256S1Jpl1OWJLfuikXuleIPiX/6VW3l5zRWlOwNQB8sPJ58TfNygss Uiww== X-Gm-Message-State: APt69E1UZEN+7Wu93XacfaeXb0e6Q2aBOEIoR3gqI8VBzRLksd7zrlYD 3ongCWn6MdmkwGBSU1AvmWxrDg== X-Google-Smtp-Source: AAOMgpfW2YyXQXz+DkEXJ3K+MK75A2gCWsR9Atbs2ObyPxL+jus6EmNmlXfd/mes5dn2XfU7YaXHBQ== X-Received: by 2002:a50:8e09:: with SMTP id 9-v6mr81843edw.101.1531125430737; Mon, 09 Jul 2018 01:37:10 -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.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 01:37:10 -0700 (PDT) From: Daniel Vetter To: LKML Date: Mon, 9 Jul 2018 10:36:50 +0200 Message-Id: <20180709083650.23549-12-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 12/12] usb: 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 , linux-usb@vger.kernel.org, DRI Development , Greg Kroah-Hartman , 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 condition compared to the open-coded version. Signed-off-by: Daniel Vetter Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org --- include/linux/usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/usb.h b/include/linux/usb.h index 4cdd515a4385..a9da7237c619 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -732,7 +732,7 @@ extern struct usb_device *usb_hub_find_child(struct usb_device *hdev, for (port1 = 1, child = usb_hub_find_child(hdev, port1); \ port1 <= hdev->maxchild; \ child = usb_hub_find_child(hdev, ++port1)) \ - if (!child) continue; else + for_each_if (child) /* USB device locking */ #define usb_lock_device(udev) device_lock(&(udev)->dev)