devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Michael Walle <michael@walle.cc>,
	devicetree@vger.kernel.org, Frank Rowand <frowand.list@gmail.com>,
	Robert Marko <robert.marko@sartura.hr>,
	Luka Perkov <luka.perkov@sartura.hr>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	rafal@milecki.pl
Subject: Re: [PATCH 2/8] of: Change of_device_get_modalias() main argument
Date: Thu, 2 Mar 2023 13:37:55 -0600	[thread overview]
Message-ID: <CAL_JsqJE43qfYzHUuCJsbaPPBTbYX05Q7FFmPTjPFZ3Dmz_mXg@mail.gmail.com> (raw)
In-Reply-To: <20230301152239.531194-3-miquel.raynal@bootlin.com>

On Wed, Mar 1, 2023 at 9:22 AM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>
> This function needs "struct device_node" to work, but for convenience
> the author and only user of this helper did use a "struct device". As
> this helper is a static helper, let's keep the "struct device" for
> exported methods and use the OF structure internally.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  drivers/of/device.c | 27 ++++++++++++++++-----------
>  1 file changed, 16 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/of/device.c b/drivers/of/device.c
> index 877f50379fab..3efc17de1d57 100644
> --- a/drivers/of/device.c
> +++ b/drivers/of/device.c
> @@ -248,7 +248,7 @@ const void *of_device_get_match_data(const struct device *dev)
>  }
>  EXPORT_SYMBOL(of_device_get_match_data);
>
> -static ssize_t of_device_get_modalias(struct device *dev, char *str, ssize_t len)
> +static ssize_t of_device_get_modalias(struct device_node *np, char *str, ssize_t len)

Humm, this is static so fine here, but based on my comments on patch
3, it would need to move too as base.c having a dependency on device.c
is backwards.

How about moving everything module related to drivers/of/module.c. Put
the new functions in of.h (rather than an of_module.h). Then maybe the
rest of device.c could move to inline wrappers or elsewhere.

Rob

  reply	other threads:[~2023-03-02 19:38 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01 15:22 [PATCH 0/8] nvmem: Let layout drivers be modules Miquel Raynal
2023-03-01 15:22 ` [PATCH 1/8] of: Fix modalias string generation Miquel Raynal
2023-03-02 19:21   ` Rob Herring
2023-03-01 15:22 ` [PATCH 2/8] of: Change of_device_get_modalias() main argument Miquel Raynal
2023-03-02 19:37   ` Rob Herring [this message]
2023-03-01 15:22 ` [PATCH 3/8] of: Create an of_device_request_module() receiving an OF node Miquel Raynal
2023-03-02 19:13   ` Rob Herring
2023-03-01 15:22 ` [PATCH 4/8] nvmem: core: Fix error path ordering Miquel Raynal
2023-03-01 15:22 ` [PATCH 5/8] nvmem: core: Handle the absence of expected layouts Miquel Raynal
2023-03-01 15:22 ` [PATCH 6/8] nvmem: core: Request layout modules loading Miquel Raynal
2023-03-01 15:22 ` [PATCH 7/8] nvmem: layouts: sl28vpd: Convert layout driver into a module Miquel Raynal
2023-03-01 15:22 ` [PATCH 8/8] nvmem: layouts: onie-tlv: " Miquel Raynal
2023-03-01 15:34 ` [PATCH 0/8] nvmem: Let layout drivers be modules Greg Kroah-Hartman
2023-03-06 13:01 ` Michael Walle
2023-03-06 13:35   ` Miquel Raynal
2023-03-06 13:39     ` Michael Walle
2023-03-06 13:57     ` Rafał Miłecki
2023-03-06 14:03       ` Michael Walle
2023-03-06 14:06         ` Rafał Miłecki
2023-03-06 14:11           ` Michael Walle
2023-03-06 14:18       ` Miquel Raynal
2023-03-06 14:23         ` Rafał Miłecki
2023-03-06 14:29           ` Miquel Raynal
2023-03-06 14:34             ` Rafał Miłecki
2023-03-06 14:44               ` Miquel Raynal
2023-03-06 13:54 ` Rafał Miłecki
2023-03-06 13:55   ` Greg Kroah-Hartman
2023-03-06 15:00     ` 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=CAL_JsqJE43qfYzHUuCJsbaPPBTbYX05Q7FFmPTjPFZ3Dmz_mXg@mail.gmail.com \
    --to=robh+dt@kernel.org \
    --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=miquel.raynal@bootlin.com \
    --cc=rafal@milecki.pl \
    --cc=robert.marko@sartura.hr \
    --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 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).