From: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
Rob Herring <robh+dt@kernel.org>,
Frank Rowand <frowand.list@gmail.com>
Cc: <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] of: Introduce of_node_get_match_data() helper
Date: Fri, 9 Jun 2017 10:30:00 +0300 [thread overview]
Message-ID: <7ff6bd21-19f0-7e0c-18bf-e835e7d4319e@mentor.com> (raw)
In-Reply-To: <1493142007-29347-1-git-send-email-geert+renesas@glider.be>
Hello Geert,
On 04/25/2017 08:40 PM, Geert Uytterhoeven wrote:
> If CONFIG_OF=n, code using
>
> info = of_match_node(matchs, np)->data;
>
> fails to compile:
>
> warning: dereferencing ‘void *’ pointer
> error: request for member ‘data’ in something not a structure or union
IMHO firstly all the cases like one above must be fixed in place, in
parallel do an overall conversion of subcases:
- of_id = of_match_node(some_dt_ids, dev->of_node);
+ of_id = of_match_device(some_dt_ids, dev);
> Follow the example set by of_device_get_match_data(), and introduce a
> new helper of_node_get_match_data(). This will allow to increase
> compile-testing coverage later.
Unfortunately the proposed of_node_get_match_data() is not so similar
to the of_device_get_match_data(), the latter one has only one input
argument in opposite to of_match_device(), which is truly convenient.
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
The change itself is good.
Reviewed-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
--
With best wishes,
Vladimir
next prev parent reply other threads:[~2017-06-09 7:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-25 17:40 Geert Uytterhoeven
2017-06-09 7:30 ` Vladimir Zapolskiy [this message]
2017-06-09 7:56 ` Geert Uytterhoeven
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=7ff6bd21-19f0-7e0c-18bf-e835e7d4319e@mentor.com \
--to=vladimir_zapolskiy@mentor.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=geert+renesas@glider.be \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.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
all inboxes | Powered by JetHome®