From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>,
Eugen Hristev <eugen.hristev@collabora.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Helge Deller <deller@gmx.de>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Maxime Ripard <mripard@kernel.org>,
Michal Simek <michal.simek@amd.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Rob Herring <robh+dt@kernel.org>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
coresight@lists.linaro.org, dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org,
linux-omap@vger.kernel.org, linux-staging@lists.linux.dev
Subject: Re: [PATCH 4/8] media: platform: ti: use for_each_endpoint_of_node()
Date: Mon, 25 Mar 2024 23:25:44 +0000 [thread overview]
Message-ID: <87v8593nd3.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <02d6efba-6d1c-465f-a06d-cf7c02656e21@moroto.mountain>
Hi Dan
> > We already have for_each_endpoint_of_node(), don't use
> > of_graph_get_next_endpoint() directly. Replace it.
> >
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
(snip)
> > - for (i = 0; ; i++) {
> > + for_each_endpoint_of_node(dev->of_node, endpoint) {
> > struct v4l2_fwnode_endpoint bus_cfg = { .bus_type = 0 };
> > struct device_node *rem;
> >
> > - endpoint = of_graph_get_next_endpoint(dev->of_node, endpoint);
> > - if (!endpoint)
> > - break;
> > -
> > sdinfo = &pdata->sub_devs[i];
> ^
> "i" is uninitialized now.
>
> Also in the initializer it has "struct device_node *endpoint = NULL;"
> which is unnecessary now. And at the end it has:
>
> of_node_put(endpoint);
> return pdata;
>
> Since endpoint is NULL this was always a pointless no-op but now it's
> more obvious, so lets delete that.
Thank you for pointing it.
I will wait other feedback, and post v2 patch in next week.
Best regards
---
Renesas Electronics
Ph.D. Kuninori Morimoto
next prev parent reply other threads:[~2024-03-25 23:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 3:04 [PATCH 0/8] use for_each_endpoint_of_node() Kuninori Morimoto
2024-03-25 3:05 ` [PATCH 1/8] gpu: drm: " Kuninori Morimoto
2024-03-25 3:05 ` [PATCH 2/8] hwtracing: " Kuninori Morimoto
2024-03-25 3:05 ` [PATCH 3/8] media: platform: microchip: " Kuninori Morimoto
2024-03-25 3:05 ` [PATCH 4/8] media: platform: ti: " Kuninori Morimoto
2024-03-25 12:35 ` Dan Carpenter
2024-03-25 23:25 ` Kuninori Morimoto [this message]
2024-03-25 3:05 ` [PATCH 5/8] media: platform: xilinx: " Kuninori Morimoto
2024-03-25 3:05 ` [PATCH 6/8] staging: media: atmel: " Kuninori Morimoto
2024-03-25 3:05 ` [PATCH 7/8] video: fbdev: " Kuninori Morimoto
2024-03-25 3:05 ` [PATCH 8/8] fbdev: omapfb: use of_graph_get_remote_port() Kuninori Morimoto
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=87v8593nd3.wl-kuninori.morimoto.gx@renesas.com \
--to=kuninori.morimoto.gx@renesas.com \
--cc=airlied@gmail.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=coresight@lists.linaro.org \
--cc=dan.carpenter@linaro.org \
--cc=daniel@ffwll.ch \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=eugen.hristev@collabora.com \
--cc=gregkh@linuxfoundation.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mchehab@kernel.org \
--cc=michal.simek@amd.com \
--cc=mripard@kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=prabhakar.csengg@gmail.com \
--cc=robh+dt@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=tzimmermann@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).