All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Rob Herring <robh@kernel.org>
Cc: "Srinivas Kandagatla" <srinivas.kandagatla@linaro.org>,
	linux-kernel@vger.kernel.org,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Michael Walle" <michael@walle.cc>,
	"Rafał Miłecki" <rafal@milecki.pl>,
	"Robert Marko" <robert.marko@sartura.hr>,
	"Luka Perkov" <luka.perkov@sartura.hr>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Frank Rowand" <frowand.list@gmail.com>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v2 04/21] of: Move of_modalias() to module.c
Date: Wed, 8 Mar 2023 15:51:58 +0100	[thread overview]
Message-ID: <20230308155158.4ceecc05@xps-13> (raw)
In-Reply-To: <20230308002306.GB513330-robh@kernel.org>

Hi Rob,

robh@kernel.org wrote on Tue, 7 Mar 2023 18:23:06 -0600:

> On Tue, Mar 07, 2023 at 05:53:42PM +0100, Miquel Raynal wrote:
> > Create a specific .c file for of related module handling.
> > Move of_modalias() inside as a first step.  
> 
> Perhaps a comment as to why it needs to be public? Or is it just shared 
> within the DT core? If so, we have of_private.h for that.

Good point. This helper is actually only used internally (was static
before). At first I wanted to convert all users to use the "new" OF
module-related helpers, but unfortunately, the "dev->of_node_reused"
check makes this impossible. I thus need to keep a few users of
of_modalias() in of_device.h in the coming patches. I could move
of_modalias() to of_private.h but that would mean exposing all the
internals and private definitions to the drivers including of_device.h,
which seemed extremely unsatisfying to me.

I've updated the commit log with:

    The helper is exposed through of.h even though it is only used by core
    files because the users from device.c will soon be split into an OF-only
    helper in module.c as well as a device-oriented inline helper in
    of_device.h. Putting this helper in of_private.h would require to
    include of_private.h from of_device.h, which is not acceptable.

> 
> > 
> > Suggested-by: Rob Herring <robh+dt@kernel.org>
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > ---
> >  drivers/of/Makefile |  2 +-
> >  drivers/of/device.c | 37 -------------------------------------
> >  drivers/of/module.c | 43 +++++++++++++++++++++++++++++++++++++++++++
> >  include/linux/of.h  |  8 ++++++++
> >  4 files changed, 52 insertions(+), 38 deletions(-)
> >  create mode 100644 drivers/of/module.c
> > 
> > diff --git a/drivers/of/Makefile b/drivers/of/Makefile
> > index e0360a44306e..ae9923fd2940 100644
> > --- a/drivers/of/Makefile
> > +++ b/drivers/of/Makefile
> > @@ -1,5 +1,5 @@
> >  # SPDX-License-Identifier: GPL-2.0
> > -obj-y = base.o device.o platform.o property.o
> > +obj-y = base.o device.o module.o platform.o property.o
> >  obj-$(CONFIG_OF_KOBJ) += kobj.o
> >  obj-$(CONFIG_OF_DYNAMIC) += dynamic.o
> >  obj-$(CONFIG_OF_FLATTREE) += fdt.o
> > diff --git a/drivers/of/device.c b/drivers/of/device.c
> > index 2bbb67798916..44f1f2ef12b7 100644
> > --- a/drivers/of/device.c
> > +++ b/drivers/of/device.c

[...]

> > diff --git a/drivers/of/module.c b/drivers/of/module.c
> > new file mode 100644
> > index 000000000000..9c6a53f32c0f
> > --- /dev/null
> > +++ b/drivers/of/module.c
> > @@ -0,0 +1,43 @@
> > +// SPDX-License-Identifier: GPL-2.0+  
> 
> Existing license was GPL-2.0 (-only).

Oh right, I took the license from base.c, you're right I should have
taken the one from device.c.

Thanks,
Miquèl

  reply	other threads:[~2023-03-08 14:52 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 16:53 [PATCH v2 00/21] nvmem: Layouts support Miquel Raynal
2023-03-07 16:53 ` [PATCH v2 01/21] of: Fix modalias string generation Miquel Raynal
2023-03-07 16:53 ` [PATCH v2 02/21] of: Update of_device_get_modalias() Miquel Raynal
2023-03-08  0:28   ` Rob Herring
2023-03-07 16:53 ` [PATCH v2 03/21] of: Rename of_modalias_node() Miquel Raynal
2023-03-08  0:19   ` Rob Herring
2023-03-08 14:17     ` Miquel Raynal
2023-03-08 22:06     ` Sebastian Reichel
2023-03-09 13:28       ` Rob Herring
2023-03-07 16:53 ` [PATCH v2 04/21] of: Move of_modalias() to module.c Miquel Raynal
2023-03-08  0:23   ` Rob Herring
2023-03-08 14:51     ` Miquel Raynal [this message]
2023-03-07 16:53 ` [PATCH v2 05/21] of: Move the request module helper logic " Miquel Raynal
2023-03-08  0:25   ` Rob Herring
2023-03-07 16:53 ` [PATCH v2 06/21] usb: ulpi: Use of_request_module() Miquel Raynal
2023-03-08  0:25   ` Rob Herring
2023-03-07 16:53 ` [PATCH v2 07/21] of: device: Kill of_device_request_module() Miquel Raynal
2023-03-08  0:26   ` Rob Herring
2023-03-07 16:53 ` [PATCH v2 08/21] dt-bindings: nvmem: Fix spelling mistake "platforn" -> "platform" Miquel Raynal
2023-03-08  0:08   ` Rob Herring
2023-03-08 14:07     ` Miquel Raynal
2023-03-10  9:55   ` Srinivas Kandagatla
2023-03-07 16:53 ` [PATCH v2 09/21] nvmem: core: return -ENOENT if nvmem cell is not found Miquel Raynal
2023-03-07 17:04   ` Michael Walle
2023-03-10  9:57   ` Srinivas Kandagatla
2023-03-10 10:00     ` Miquel Raynal
2023-03-07 16:53 ` [PATCH v2 10/21] nvmem: core: introduce NVMEM layouts Miquel Raynal
2023-03-07 16:53 ` [PATCH v2 11/21] nvmem: core: handle the absence of expected layouts Miquel Raynal
2023-03-10 10:30   ` Srinivas Kandagatla
2023-03-10 10:45     ` Miquel Raynal
2023-03-10 10:49       ` Srinivas Kandagatla
2023-03-07 16:53 ` [PATCH v2 12/21] nvmem: core: request layout modules loading Miquel Raynal
2023-03-07 16:53 ` [PATCH v2 13/21] nvmem: core: add per-cell post processing Miquel Raynal
2023-03-07 16:53 ` [PATCH v2 14/21] nvmem: core: allow to modify a cell before adding it Miquel Raynal
2023-03-07 16:53 ` [PATCH v2 15/21] nvmem: imx-ocotp: replace global post processing with layouts Miquel Raynal
2023-03-07 16:53 ` [PATCH v2 16/21] nvmem: cell: drop global cell_post_process Miquel Raynal
2023-03-07 16:53 ` [PATCH v2 17/21] nvmem: core: provide own priv pointer in post process callback Miquel Raynal
2023-03-07 16:53 ` [PATCH v2 18/21] nvmem: layouts: sl28vpd: Add new layout driver Miquel Raynal
2023-03-07 16:53 ` [PATCH v2 19/21] MAINTAINERS: add myself as sl28vpd nvmem " Miquel Raynal
2023-03-07 16:53 ` [PATCH v2 20/21] nvmem: layouts: onie-tlv: Add new " Miquel Raynal
2023-03-07 16:53 ` [PATCH v2 21/21] MAINTAINERS: Add myself as ONIE tlv NVMEM layout maintainer Miquel Raynal
2023-03-07 17:09 ` [PATCH v2 00/21] nvmem: Layouts support Miquel Raynal

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=20230308155158.4ceecc05@xps-13 \
    --to=miquel.raynal@bootlin.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luka.perkov@sartura.hr \
    --cc=michael@walle.cc \
    --cc=rafal@milecki.pl \
    --cc=robert.marko@sartura.hr \
    --cc=robh@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=thomas.petazzoni@bootlin.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.