From: Leif Lindholm <leif.lindholm@linaro.org>
To: Grant Likely <grant.likely@linaro.org>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Rob Herring <robh+dt@kernel.org>,
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>,
Ian Campbell <ijc@debian.org>, Andrew Lunn <andrew@lunn.ch>,
"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>
Subject: Re: [PATCH v2 1/2] of: add optional options parameter to of_find_node_by_path()
Date: Wed, 26 Nov 2014 22:19:03 +0000 [thread overview]
Message-ID: <20141126221903.GI2361@bivouac.eciton.net> (raw)
In-Reply-To: <CACxGe6tQ5rWzCUcS+_fFY+rjEyua2khApAoCVKpTuJAghU=N_w@mail.gmail.com>
On Wed, Nov 26, 2014 at 09:06:33PM +0000, Grant Likely wrote:
> On Wed, Nov 26, 2014 at 5:40 PM, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> > Update of_find_node_by_path():
> > 1) Ignore any part of the path beyond and including the ':' separator.
> > 2) Set the new provided pointer argument to the beginning of the string
> > following the ':' separator.
> >
> > Coccinelle fixup using:
> >
> > @@
> > expression E1;
> > @@
> >
> > - of_find_node_by_path(E1)
> > + of_find_node_by_path(E1, NULL)
> >
> > drivers/of/resolver.c manually updated, since spatch fails to parse
> > it correctly.
> >
> > Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
>
> Okay, so you're probably going to kill me for the next comment...
> After actually looking at this I can see that it's going to be a hard
> patch to merge because of conflicts. It will need to be merged at the
> end of a merge window to catch all the users, but that will mean that
> the important part of the patch won't be able to be queued up in
> linux-next.
Not to worry - I'll simply keep this to guilt trip you with at some
point in the future.
Seeing get_maintainer take 1m42s on a quad-i7 with the entire kernel
tree in disk cache was nearly reward enough :)
> So you were right the first time around. Create a new function name
> that adds the extra argument and make of_find_node_by_path() a static
> inline wrapper. That way I can queue it up into linux-next immediately
> and the cleanup across the tree can be generated and submitted at the
> very end of the merge window.
That will also make it a lot less invasive to potentially get it
backported to debian-kernel, so we can have this support for the
Jessie installer.
I'll whip that up tomorrow morning.
/
Leif
> > @@ -380,7 +380,8 @@ static inline struct device_node *of_find_matching_node_and_match(
> > return NULL;
> > }
> >
> > -static inline struct device_node *of_find_node_by_path(const char *path)
> > +static inline struct device_node *of_find_node_by_path(const char *path,
> > + char **opts)
>
> const char **opts
>
> > {
> > return NULL;
> > }
> > diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
> > index e695517..0056963 100644
> > --- a/sound/soc/fsl/fsl_ssi.c
> > +++ b/sound/soc/fsl/fsl_ssi.c
> > @@ -1427,7 +1427,7 @@ static int fsl_ssi_probe(struct platform_device *pdev)
> > * device tree. We also pass the address of the CPU DAI driver
> > * structure.
> > */
> > - sprop = of_get_property(of_find_node_by_path("/"), "compatible", NULL);
> > + sprop = of_get_property(of_find_node_by_path("/", NULL), "compatible", NULL);
> > /* Sometimes the compatible name has a "fsl," prefix, so we strip it. */
> > p = strrchr(sprop, ',');
> > if (p)
> > --
> > 1.7.10.4
> >
next prev parent reply other threads:[~2014-11-26 22:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-26 17:40 [PATCH v2 0/2] of: support passing console options with stdout-path Leif Lindholm
2014-11-26 17:40 ` [PATCH v2 1/2] of: add optional options parameter to of_find_node_by_path() Leif Lindholm
2014-11-26 21:06 ` Grant Likely
2014-11-26 22:19 ` Leif Lindholm [this message]
2014-11-26 17:40 ` [PATCH v2 2/2] of: support passing console options with stdout-path Leif Lindholm
2014-11-26 18:30 ` Andrew Lunn
2014-11-26 21:07 ` Grant Likely
2014-11-26 21:48 ` Andrew Lunn
2014-11-27 12:15 ` Mark Rutland
2014-11-27 13:16 ` Leif Lindholm
2014-11-27 13:41 ` Mark Rutland
2014-11-27 13:45 ` Grant Likely
2014-11-27 13:39 ` Grant Likely
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=20141126221903.GI2361@bivouac.eciton.net \
--to=leif.lindholm@linaro.org \
--cc=andrew@lunn.ch \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=ijc@debian.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=plagnioj@jcrosoft.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.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
all inboxes | Powered by JetHome®