From: Mauro Carvalho Chehab <mchehab@kernel.org>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com,
Philipp Zabel <p.zabel@pengutronix.de>,
hverkuil@xs4all.nl, Francesco Dolcini <francesco@dolcini.it>,
aishwarya.kothari@toradex.com, Robert Foss <rfoss@kernel.org>,
Todor Tomov <todor.too@gmail.com>,
Hyun Kwon <hyun.kwon@xilinx.com>,
bingbu.cao@intel.com, niklas.soderlund@ragnatech.se,
Kieran Bingham <kieran.bingham@ideasonboard.com>,
Benjamin Mugnier <benjamin.mugnier@foss.st.com>,
Sylvain Petinot <sylvain.petinot@foss.st.com>,
Eugen Hristev <eugen.hristev@collabora.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Maxime Ripard <mripard@kernel.org>,
Rui Miguel Silva <rmfrfs@gmail.com>,
Fabio Estevam <festevam@gmail.com>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Dafna Hirschfeld <dafna@fastmail.com>,
Hugues Fruchet <hugues.fruchet@foss.st.com>,
Yong Deng <yong.deng@magewell.com>,
Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
"Lad, Prabhakar" <prabhakar.csengg@gmail.com>,
Benoit Parrot <bparrot@ti.com>,
Steve Longerbeam <slongerbeam@gmail.com>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Sowjanya Komatineni <skomatineni@nvidia.com>,
Marco Felsch <m.felsch@pengutronix.de>
Subject: Re: [PATCH v6 26/38] media: v4l: async: Try more connections
Date: Fri, 28 Jul 2023 10:52:18 +0200 [thread overview]
Message-ID: <20230728105218.390d6b0b@coco.lan> (raw)
In-Reply-To: <20230727054255.1183255-27-sakari.ailus@linux.intel.com>
Em Thu, 27 Jul 2023 08:42:43 +0300
Sakari Ailus <sakari.ailus@linux.intel.com> 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.
>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> # imx6qp
> Tested-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> # rcar + adv746x
> Tested-by: Aishwarya Kothari <aishwarya.kothari@toradex.com> # Apalis i.MX6Q with TC358743
> Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # Renesas RZ/G2L SMARC
> ---
> drivers/media/v4l2-core/v4l2-async.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/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;
>
> +again:
> asc = 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;
>
> - 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
next prev parent reply other threads:[~2023-07-28 8:53 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 5:42 [PATCH v6 00/38] Separate links and async sub-devices Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 01/38] media: v4l: async: Drop v4l2_async_nf_parse_fwnode_endpoints() Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 02/38] media: v4l: fwnode: Remove unneeded forward declaration Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 03/38] media: atmel-isi: Remote unneeeded " Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 04/38] media: xilinx-vipp: Clean up bound async notifier callback Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 05/38] media: omap3isp: Move link creation to bound callback Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 06/38] media: Documentation: v4l: Fix async notifier registration example Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 07/38] media: Documentation: v4l: Add section titles for async Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 08/38] media: Documentation: v4l: Fix async sensor subdev helper documentation Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 09/38] media: Documentation: v4l: Document missing async subdev function Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 10/38] media: Documentation: v4l: Document v4l2_async_nf_cleanup Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 11/38] media: v4l: async: Add some debug prints Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 12/38] media: v4l: async: Clean up testing for duplicate async subdevs Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 13/38] media: v4l: async: Don't check whether asd is NULL in validity check Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 14/38] media: v4l: async: Make V4L2 async match information a struct Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 15/38] media: v4l: async: Rename V4L2_ASYNC_MATCH_ macros, add TYPE_ Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 16/38] media: v4l: async: Only pass match information for async subdev validation Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 17/38] media: v4l: async: Clean up list heads and entries Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 18/38] media: v4l: async: Simplify async sub-device fwnode matching Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 19/38] media: v4l: async: Rename v4l2_async_subdev as v4l2_async_connection Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 20/38] media: v4l: async: Clean up error handling in v4l2_async_match_notify Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 21/38] media: v4l: async: Drop duplicate handling when adding connections Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 22/38] media: v4l: async: Rework internal lists Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 23/38] media: v4l: async: Obtain async connection based on sub-device Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 24/38] media: v4l: async: Allow multiple connections between entities Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 25/38] media: v4l: async: Drop unneeded list entry initialisation Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 26/38] media: v4l: async: Try more connections Sakari Ailus
2023-07-28 8:52 ` Mauro Carvalho Chehab [this message]
2023-07-27 5:42 ` [PATCH v6 27/38] media: v4l: async: Support fwnode endpoint list matching for subdevs Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 28/38] media: adv748x: Return to endpoint matching Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 29/38] media: pxa_camera: Fix probe error handling Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 30/38] media: pxa_camera: Register V4L2 device early Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 31/38] media: marvell: cafe: Register V4L2 device earlier Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 32/38] media: am437x-vpfe: Register V4L2 device early Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 33/38] media: omap3isp: Initialise V4L2 async notifier later Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 34/38] media: xilinx-vipp: Init async notifier after registering V4L2 device Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 35/38] media: davinci: " Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 36/38] media: qcom: Initialise V4L2 async notifier later Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 37/38] media: v4l: async: Set v4l2_device and subdev in async notifier init Sakari Ailus
2023-07-27 5:42 ` [PATCH v6 38/38] media: Documentation: v4l: Document sub-device notifiers Sakari Ailus
2023-07-28 9:02 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230728105218.390d6b0b@coco.lan \
--to=mchehab@kernel.org \
--cc=aishwarya.kothari@toradex.com \
--cc=benjamin.mugnier@foss.st.com \
--cc=bingbu.cao@intel.com \
--cc=bparrot@ti.com \
--cc=bryan.odonoghue@linaro.org \
--cc=dafna@fastmail.com \
--cc=eugen.hristev@collabora.com \
--cc=festevam@gmail.com \
--cc=francesco@dolcini.it \
--cc=hugues.fruchet@foss.st.com \
--cc=hverkuil@xs4all.nl \
--cc=hyun.kwon@xilinx.com \
--cc=jonathanh@nvidia.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=m.felsch@pengutronix.de \
--cc=mripard@kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=niklas.soderlund@ragnatech.se \
--cc=p.zabel@pengutronix.de \
--cc=paul.kocialkowski@bootlin.com \
--cc=prabhakar.csengg@gmail.com \
--cc=rfoss@kernel.org \
--cc=rmfrfs@gmail.com \
--cc=s.nawrocki@samsung.com \
--cc=sakari.ailus@linux.intel.com \
--cc=skomatineni@nvidia.com \
--cc=slongerbeam@gmail.com \
--cc=sylvain.petinot@foss.st.com \
--cc=thierry.reding@gmail.com \
--cc=todor.too@gmail.com \
--cc=yong.deng@magewell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.