From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6E9CC001DE for ; Fri, 28 Jul 2023 08:53:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235262AbjG1Ix4 (ORCPT ); Fri, 28 Jul 2023 04:53:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235398AbjG1IxT (ORCPT ); Fri, 28 Jul 2023 04:53:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F540E78 for ; Fri, 28 Jul 2023 01:52:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2D76F62066 for ; Fri, 28 Jul 2023 08:52:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5137BC433C9; Fri, 28 Jul 2023 08:52:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690534348; bh=WnKx5b2dYcaG+Eh6WNCuqVjIDJEzl+wAwDZBzXJN8T8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=aFBAUPXTkoxVul/P2gf4QTWuBLnklC/yNpy6U5KDIX76YYZJF+UEFVRC7Or9OCxXw y3jn772GGaORIVWb9wikImeGQ/kw/iWHBU3Efx2J2A+s2hFAPofUyeZetIU2g3CVXa eti92qTubtxsMkL2AxqPkYxJejNpSebdvnaKToIe8aMDLts/9BGOjiQHZRslzAPqGY 3/7GCnxEBEQNSnYF9VKlosx9BztLPyi3sBKiZzO/k+ZyN4wPxTDoWNm2eHGqEciMVa 9fMeRGM+lm8zJhrgYN0y6nP/09GRidq22KecZlVg3HVA6KTMYLTQimZQoChzmpuRXL ljzaW0v3i9pSg== Date: Fri, 28 Jul 2023 10:52:18 +0200 From: Mauro Carvalho Chehab To: Sakari Ailus Cc: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com, Philipp Zabel , hverkuil@xs4all.nl, Francesco Dolcini , aishwarya.kothari@toradex.com, Robert Foss , Todor Tomov , Hyun Kwon , bingbu.cao@intel.com, niklas.soderlund@ragnatech.se, Kieran Bingham , Benjamin Mugnier , Sylvain Petinot , Eugen Hristev , Nicolas Ferre , Maxime Ripard , Rui Miguel Silva , Fabio Estevam , Bryan O'Donoghue , Sylwester Nawrocki , Dafna Hirschfeld , Hugues Fruchet , Yong Deng , Paul Kocialkowski , "Lad, Prabhakar" , Benoit Parrot , Steve Longerbeam , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Marco Felsch Subject: Re: [PATCH v6 26/38] media: v4l: async: Try more connections Message-ID: <20230728105218.390d6b0b@coco.lan> In-Reply-To: <20230727054255.1183255-27-sakari.ailus@linux.intel.com> References: <20230727054255.1183255-1-sakari.ailus@linux.intel.com> <20230727054255.1183255-27-sakari.ailus@linux.intel.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Em Thu, 27 Jul 2023 08:42:43 +0300 Sakari Ailus escreveu: > When an async sub-device is registered, it used to be that the first one > of its connections were matched when found. Continue looking for matches > until a notifier no longer has any. >=20 > Signed-off-by: Sakari Ailus > Tested-by: Philipp Zabel # imx6qp > Tested-by: Niklas S=C3=B6derlund # rcar += adv746x > Tested-by: Aishwarya Kothari # Apalis i.M= X6Q with TC358743 > Tested-by: Lad Prabhakar # Rene= sas RZ/G2L SMARC > --- > drivers/media/v4l2-core/v4l2-async.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-co= re/v4l2-async.c > index 44f72aa75c19..6b3c02d27ebf 100644 > --- a/drivers/media/v4l2-core/v4l2-async.c > +++ b/drivers/media/v4l2-core/v4l2-async.c > @@ -789,6 +789,7 @@ int v4l2_async_register_subdev(struct v4l2_subdev *sd) > if (!v4l2_dev) > continue; > =20 > +again: > asc =3D v4l2_async_find_match(notifier, sd); > if (!asc) > continue; > @@ -801,13 +802,12 @@ int v4l2_async_register_subdev(struct v4l2_subdev *= sd) > if (ret) > goto err_unbind; > =20 > - goto out_unlock; > + goto again; > } Using a goto here instead of a do {} while is not nice. I'll merge it as-is, but please send a followup patch using a proper loop. Regards Thanks, Mauro