devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>
To: Philipp Zabel <p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Mauro Carvalho Chehab
	<m.chehab-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Russell King - ARM Linux
	<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Sylwester Nawrocki
	<s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Laurent Pinchart
	<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
	Guennadi Liakhovetski
	<g.liakhovetski-Mmb7MZpHnFY@public.gmane.org>,
	Kyungmin Park
	<kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v5 5/7] [media] of: move common endpoint parsing to drivers/of
Date: Wed, 5 Mar 2014 12:05:33 +0200	[thread overview]
Message-ID: <5316F6ED.8040204@ti.com> (raw)
In-Reply-To: <1393948056.3917.120.camel-+qGW7pzALmz7o/J7KWpOmN53zsg1cpMQ@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1119 bytes --]

On 04/03/14 17:47, Philipp Zabel wrote:
> Am Dienstag, den 04.03.2014, 14:21 +0200 schrieb Tomi Valkeinen:
>> On 04/03/14 13:36, Philipp Zabel wrote:
> [...]
>>>> Can port_node be NULL? Probably only if something is quite wrong, but
>>>> maybe it's safer to return error in that case.
>>>
>>> both of_property_read_u32 and of_node_put can handle port_node == NULL.
>>> I'll add a WARN_ONCE here as for of_graph_get_next_endpoint and continue
>>> on.
>>
>> Isn't it better to return an error?
> 
> I am not sure. We can still correctly parse the endpoint properties of a
> parentless node. All current users ignore the return value anyway. So as
> long as we still do the memset and and set local_node and id, returning
> an error effectively won't change the current behaviour.

Is the parentless node case an error or not? If it's not, we can handle
it silently and return 0, no WARN needed. If it is an error, we should
return an error, even if nobody is currently handling that (which is a
bug in itself, as the function does return an error value, and callers
should handle it).

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

  parent reply	other threads:[~2014-03-05 10:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-27 17:35 [PATCH v5 0/7] Move device tree graph parsing helpers to drivers/of Philipp Zabel
2014-02-27 17:35 ` [PATCH v5 1/7] [media] of: move graph helpers from drivers/media/v4l2-core " Philipp Zabel
     [not found] ` <1393522540-22887-1-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-02-27 17:35   ` [PATCH v5 2/7] Documentation: of: Document graph bindings Philipp Zabel
2014-02-28 21:08     ` Sylwester Nawrocki
2014-03-04 10:16       ` Philipp Zabel
2014-02-27 17:35 ` [PATCH v5 3/7] of: Warn if of_graph_get_next_endpoint is called with the root node Philipp Zabel
2014-02-28 21:09   ` Sylwester Nawrocki
2014-03-04 10:12     ` Philipp Zabel
2014-02-27 17:35 ` [PATCH v5 4/7] of: Reduce indentation in of_graph_get_next_endpoint Philipp Zabel
2014-02-27 17:35 ` [PATCH v5 5/7] [media] of: move common endpoint parsing to drivers/of Philipp Zabel
2014-02-28 21:09   ` Sylwester Nawrocki
2014-03-04 10:09     ` Philipp Zabel
     [not found]   ` <1393522540-22887-6-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-03-04  8:58     ` Tomi Valkeinen
2014-03-04 11:36       ` Philipp Zabel
2014-03-04 12:21         ` Tomi Valkeinen
2014-03-04 15:47           ` Philipp Zabel
     [not found]             ` <1393948056.3917.120.camel-+qGW7pzALmz7o/J7KWpOmN53zsg1cpMQ@public.gmane.org>
2014-03-05 10:05               ` Tomi Valkeinen [this message]
     [not found]           ` <5315C535.2070303-l0cyMroinI0@public.gmane.org>
2014-03-06 23:59             ` Laurent Pinchart
2014-03-07  0:06               ` Eric Boxer
2014-02-27 17:35 ` [PATCH v5 6/7] of: Implement simplified graph binding for single port devices Philipp Zabel
2014-03-04  9:06   ` Tomi Valkeinen
2014-03-04 10:04     ` Philipp Zabel
2014-02-27 17:35 ` [PATCH v5 7/7] of: Document " Philipp Zabel

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=5316F6ED.8040204@ti.com \
    --to=tomi.valkeinen-l0cymroini0@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=g.liakhovetski-Mmb7MZpHnFY@public.gmane.org \
    --cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
    --cc=linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=m.chehab-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    /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 NNTP newsgroup(s).