All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney@caviumnetworks.com>
To: Michael Bohan <mbohan@codeaurora.org>,
	David Gibson <david@gibson.dropbear.id.au>
Cc: linux-kernel@vger.kernel.org, grant.likely@secretlab.ca,
	rob.herring@calxeda.com, ralf@linux-mips.org,
	devicetree-discuss@lists.ozlabs.org, david.daney@cavium.com,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] of/lib: Export fdt routines to modules
Date: Wed, 16 Oct 2013 16:39:03 -0700	[thread overview]
Message-ID: <525F2397.40203@caviumnetworks.com> (raw)
In-Reply-To: <1381966065-16854-1-git-send-email-mbohan@codeaurora.org>

On 10/16/2013 04:27 PM, Michael Bohan wrote:
> Ever since the following commit, libfdt has been available for
> usage in the kernel:
>
>       commit ab25383983fb8d7786696f5371e75e79c3e9a405
>       Author: David Daney <david.daney@cavium.com>
>       Date:   Thu Jul 5 18:12:38 2012 +0200
>
>       of/lib: Allow scripts/dtc/libfdt to be used from kernel code
>
> Export these functions to modules so that they may be used
> from device drivers.
>
> Change-Id: I7f540b7cf860c4be414e32ce183be5268b2ae6af
> Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
> ---
>   lib/fdt.c     |    6 ++++++
>   lib/fdt_ro.c  |   28 ++++++++++++++++++++++++++++
>   lib/fdt_rw.c  |   13 +++++++++++++
>   lib/fdt_sw.c  |    9 +++++++++
>   lib/fdt_wip.c |    6 ++++++
>   5 files changed, 62 insertions(+), 0 deletions(-)
>
> diff --git a/lib/fdt.c b/lib/fdt.c
> index 97f2006..a3fe87b 100644
> --- a/lib/fdt.c
> +++ b/lib/fdt.c
> @@ -1,2 +1,8 @@
>   #include <linux/libfdt_env.h>
> +#include <linux/module.h>
>   #include "../scripts/dtc/libfdt/fdt.c"
> +
> +EXPORT_SYMBOL_GPL(fdt_next_tag);

The code was all written by David Gibson, and is dual GPL/BSD licensed. 
  So I am not sure you should be using the GPL flavor of the export 
directive.


But more than this.  I don't understand why a driver would be parsing 
the FDT in the first place.  If there is a device tree, why hasn't it 
been unflattened, and thus used via the normal device tree functions.

David Daney

WARNING: multiple messages have this Message-ID (diff)
From: David Daney <ddaney@caviumnetworks.com>
To: Michael Bohan <mbohan@codeaurora.org>,
	David Gibson <david@gibson.dropbear.id.au>
Cc: <linux-kernel@vger.kernel.org>, <grant.likely@secretlab.ca>,
	<rob.herring@calxeda.com>, <ralf@linux-mips.org>,
	<devicetree-discuss@lists.ozlabs.org>, <david.daney@cavium.com>,
	<linux-arm-msm@vger.kernel.org>
Subject: Re: [PATCH] of/lib: Export fdt routines to modules
Date: Wed, 16 Oct 2013 16:39:03 -0700	[thread overview]
Message-ID: <525F2397.40203@caviumnetworks.com> (raw)
In-Reply-To: <1381966065-16854-1-git-send-email-mbohan@codeaurora.org>

On 10/16/2013 04:27 PM, Michael Bohan wrote:
> Ever since the following commit, libfdt has been available for
> usage in the kernel:
>
>       commit ab25383983fb8d7786696f5371e75e79c3e9a405
>       Author: David Daney <david.daney@cavium.com>
>       Date:   Thu Jul 5 18:12:38 2012 +0200
>
>       of/lib: Allow scripts/dtc/libfdt to be used from kernel code
>
> Export these functions to modules so that they may be used
> from device drivers.
>
> Change-Id: I7f540b7cf860c4be414e32ce183be5268b2ae6af
> Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
> ---
>   lib/fdt.c     |    6 ++++++
>   lib/fdt_ro.c  |   28 ++++++++++++++++++++++++++++
>   lib/fdt_rw.c  |   13 +++++++++++++
>   lib/fdt_sw.c  |    9 +++++++++
>   lib/fdt_wip.c |    6 ++++++
>   5 files changed, 62 insertions(+), 0 deletions(-)
>
> diff --git a/lib/fdt.c b/lib/fdt.c
> index 97f2006..a3fe87b 100644
> --- a/lib/fdt.c
> +++ b/lib/fdt.c
> @@ -1,2 +1,8 @@
>   #include <linux/libfdt_env.h>
> +#include <linux/module.h>
>   #include "../scripts/dtc/libfdt/fdt.c"
> +
> +EXPORT_SYMBOL_GPL(fdt_next_tag);

The code was all written by David Gibson, and is dual GPL/BSD licensed. 
  So I am not sure you should be using the GPL flavor of the export 
directive.


But more than this.  I don't understand why a driver would be parsing 
the FDT in the first place.  If there is a device tree, why hasn't it 
been unflattened, and thus used via the normal device tree functions.

David Daney

  reply	other threads:[~2013-10-16 23:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16 23:27 [PATCH] of/lib: Export fdt routines to modules Michael Bohan
2013-10-16 23:39 ` David Daney [this message]
2013-10-16 23:39   ` David Daney
2013-10-17  0:27   ` Michael Bohan
2013-10-17  4:54     ` Guenter Roeck
2013-10-17 23:51       ` Michael Bohan
2013-10-18  0:44         ` Guenter Roeck
2013-10-18  2:54           ` Michael Bohan
2013-10-18 13:28             ` Pantelis Antoniou
2013-10-18 15:57               ` Rob Herring
2013-10-18 16:16                 ` Guenter Roeck
2013-10-18 16:30                 ` David Daney
2013-10-18 16:30                   ` David Daney
     [not found]                   ` <52616228.80002-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2013-10-18 19:32                     ` Michael Bohan
2013-10-18 19:32                       ` Michael Bohan
     [not found]                       ` <20131018193229.GA30141-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2013-10-18 21:20                         ` Rob Herring
2013-10-18 21:20                           ` Rob Herring
2013-10-19  1:49                           ` Michael Bohan
2013-10-19  3:41                             ` Guenter Roeck
2013-10-18 18:38           ` Mark Rutland
     [not found]             ` <20131018183804.GA8546-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2013-10-19  1:41               ` Michael Bohan
2013-10-19  1:41                 ` Michael Bohan

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=525F2397.40203@caviumnetworks.com \
    --to=ddaney@caviumnetworks.com \
    --cc=david.daney@cavium.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbohan@codeaurora.org \
    --cc=ralf@linux-mips.org \
    --cc=rob.herring@calxeda.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.