2020-11-27 08:42:36

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH v2 5/5] memory: renesas-rpc-if: Export symbols as GPL

Renesas RPC-IF driver is licensed under GPL2.0, to be in sync export the
symbols as GPL.

Suggested-by: Pavel Machek <[email protected]>
Signed-off-by: Lad Prabhakar <[email protected]>
Reviewed-by: Sergei Shtylyov <[email protected]>
---
drivers/memory/renesas-rpc-if.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c
index 8d36e221def1..99633986ffda 100644
--- a/drivers/memory/renesas-rpc-if.c
+++ b/drivers/memory/renesas-rpc-if.c
@@ -201,7 +201,7 @@ int rpcif_sw_init(struct rpcif *rpc, struct device *dev)

return PTR_ERR_OR_ZERO(rpc->rstc);
}
-EXPORT_SYMBOL(rpcif_sw_init);
+EXPORT_SYMBOL_GPL(rpcif_sw_init);

void rpcif_hw_init(struct rpcif *rpc, bool hyperflash)
{
@@ -249,7 +249,7 @@ void rpcif_hw_init(struct rpcif *rpc, bool hyperflash)

rpc->bus_size = hyperflash ? 2 : 1;
}
-EXPORT_SYMBOL(rpcif_hw_init);
+EXPORT_SYMBOL_GPL(rpcif_hw_init);

static int wait_msg_xfer_end(struct rpcif *rpc)
{
@@ -358,7 +358,7 @@ void rpcif_prepare(struct rpcif *rpc, const struct rpcif_op *op, u64 *offs,
RPCIF_SMENR_SPIDB(rpcif_bit_size(op->data.buswidth));
}
}
-EXPORT_SYMBOL(rpcif_prepare);
+EXPORT_SYMBOL_GPL(rpcif_prepare);

int rpcif_manual_xfer(struct rpcif *rpc)
{
@@ -500,7 +500,7 @@ int rpcif_manual_xfer(struct rpcif *rpc)
rpcif_hw_init(rpc, rpc->bus_size == 2);
goto exit;
}
-EXPORT_SYMBOL(rpcif_manual_xfer);
+EXPORT_SYMBOL_GPL(rpcif_manual_xfer);

ssize_t rpcif_dirmap_read(struct rpcif *rpc, u64 offs, size_t len, void *buf)
{
@@ -529,7 +529,7 @@ ssize_t rpcif_dirmap_read(struct rpcif *rpc, u64 offs, size_t len, void *buf)

return len;
}
-EXPORT_SYMBOL(rpcif_dirmap_read);
+EXPORT_SYMBOL_GPL(rpcif_dirmap_read);

static int rpcif_probe(struct platform_device *pdev)
{
--
2.25.1


2020-11-28 21:57:37

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 5/5] memory: renesas-rpc-if: Export symbols as GPL

On Thu, Nov 26, 2020 at 07:11:46PM +0000, Lad Prabhakar wrote:
> Renesas RPC-IF driver is licensed under GPL2.0, to be in sync export the
> symbols as GPL.

It's not a valid reason to export them as GPL. Entire Linux source code
is licensed as GPL-2.0, so are you going to change all EXPORT_SYMBOL to
GPL?

Please describe it better. Usually the symbols are exported as GPL if
they are considered tightly coupled with the kernel code. So tightly
that basically it is not a interface anymore but part of kernel
internals and therefore any usage of it is a derivative work of Linux
kernel. If this is the case here, please describe in commit msg why
these match this criteria.

Best regards,
Krzysztof

2020-11-28 22:17:48

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: RE: [PATCH v2 5/5] memory: renesas-rpc-if: Export symbols as GPL

Hi Krzysztof,

Thank you for the review.

> -----Original Message-----
> From: Krzysztof Kozlowski <[email protected]>
> Sent: 28 November 2020 11:42
> To: Prabhakar Mahadev Lad <[email protected]>
> Cc: Sergei Shtylyov <[email protected]>; Philipp Zabel <[email protected]>; Jiri Kosina
> <[email protected]>; Mark Brown <[email protected]>; [email protected]; Pavel Machek
> <[email protected]>; Geert Uytterhoeven <[email protected]>; [email protected]; Prabhakar
> <[email protected]>
> Subject: Re: [PATCH v2 5/5] memory: renesas-rpc-if: Export symbols as GPL
>
> On Thu, Nov 26, 2020 at 07:11:46PM +0000, Lad Prabhakar wrote:
> > Renesas RPC-IF driver is licensed under GPL2.0, to be in sync export the
> > symbols as GPL.
>
> It's not a valid reason to export them as GPL. Entire Linux source code
> is licensed as GPL-2.0, so are you going to change all EXPORT_SYMBOL to
> GPL?
>
Agreed not a valid case. That clears my understanding wrt GPL exports ????

> Please describe it better. Usually the symbols are exported as GPL if
> they are considered tightly coupled with the kernel code. So tightly
> that basically it is not a interface anymore but part of kernel
> internals and therefore any usage of it is a derivative work of Linux
> kernel. If this is the case here, please describe in commit msg why
> these match this criteria.
>
Thank you for the clarification. The symbols can remain exported without GPL as this is not tightly coupled to the kernel.

Cheers,
Prabhakar

2021-07-03 15:23:31

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH v2 5/5] memory: renesas-rpc-if: Export symbols as GPL

Hi!

> > On Thu, Nov 26, 2020 at 07:11:46PM +0000, Lad Prabhakar wrote:
> > > Renesas RPC-IF driver is licensed under GPL2.0, to be in sync export the
> > > symbols as GPL.
> >
> > It's not a valid reason to export them as GPL. Entire Linux source code
> > is licensed as GPL-2.0, so are you going to change all EXPORT_SYMBOL to
> > GPL?
> >
> Agreed not a valid case. That clears my understanding wrt GPL exports ????

Actually, you have just acquired wrong understanding of GPL
exports. We normally export everything as _GPL unless there is very
very very good reason not to do so.

(The reason EXPORT_SYMBOL even exists are very obscure usecases of
modules ported from non-free operating systems).

Best regards,
Pavel
--
http://www.livejournal.com/~pavelmachek


Attachments:
(No filename) (801.00 B)
signature.asc (188.00 B)
Digital signature
Download all attachments