Skip to contentSkip to conversation

powerpc: Fix inconsistent of_node_to_nid EXPORT_SYMBOL handling

PATCH Applied Shailendra Singh 3 participants 4 messages Feb 1, 2017 – Feb 14, 2017 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Fix inconsistent of_node_to_nid EXPORT_SYMBOL handling

The generic implementation of of_node_to_nid is EXPORT_SYMBOL.

The powerpc implementation added by following commit is EXPORT_SYMBOL_GPL. commit 953039c8df7b ("[PATCH] powerpc: Allow devices to register with numa topology")

This creates an inconsistency for of_node_to_nid callers across architectures.

Update the powerpc implementation to be exported consistently with the generic implementation.

---
 arch/powerpc/mm/numa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/mm/numa.c +1 -1
index b1099cb2f393..8aa4ca3c84c9 100644
@@ -290,7 +290,7 @@ int of_node_to_nid(struct device_node *device)
 
 	return nid;
 }
-EXPORT_SYMBOL_GPL(of_node_to_nid);
+EXPORT_SYMBOL(of_node_to_nid);
 
 static int __init find_min_common_depth(void)
 {
Signature · 1 line
2.4.11
#1 lore raw
Quoted 1 line · Shailendra Singh

The generic implementation of of_node_to_nid is EXPORT_SYMBOL.

True. Added in 298535c00a2c, in April 2016.

Quoted 3 lines

The powerpc implementation added by following commit is EXPORT_SYMBOL_GPL. commit 953039c8df7b ("[PATCH] powerpc: Allow devices to register with numa topology")

Which was merged in May 2006.

So the powerpc version has almost 10 years precedence.

Quoted 5 lines

This creates an inconsistency for of_node_to_nid callers across architectures.

Update the powerpc implementation to be exported consistently with the generic implementation.

But I guess it's a pretty boring API. So I'll merge this unless anyone else objects.

cheers

Quoted 21 lines
---
 arch/powerpc/mm/numa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/mm/numa.c +1 -1
index b1099cb2f393..8aa4ca3c84c9 100644
@@ -290,7 +290,7 @@ int of_node_to_nid(struct device_node *device)
 
 	return nid;
 }
-EXPORT_SYMBOL_GPL(of_node_to_nid);
+EXPORT_SYMBOL(of_node_to_nid);
 
 static int __init find_min_common_depth(void)
 {
Signature · 1 line
2.4.11
#2 lore raw

Hi Michael,

Quoted 1 line
Quoted 1 line
Quoted 1 line

Which was merged in May 2006. So the powerpc version has almost 10 yea=

rs precedence.

=20Agreed but keeping the licensing consistent will help drivers making s= eamless use of it on all architectures.

Quoted 1 line
Quoted 1 line
Quoted 1 line

But I guess it's a pretty boring API. So I'll merge this unless anyon=

e else objects.
Thanks. Appreciate your quick response and help.

Thanks,
Shailendra

-----Original Message-----
From: Michael Ellerman [mailto:[email protected]]=20
Sent: Thursday, February 09, 2017 4:19 AM
To: Shailendra Singh <[email protected]>; [email protected].= org
Cc: [email protected]; [email protected]; [email protected]; Andy Ritger = <[email protected]>; John Hubbard <[email protected]>; Sherry Cheung <= [email protected]>; Aruna Manjunatha <[email protected]>; John McKe= nna <[email protected]>; [email protected]; [email protected]; will.= [email protected]; Arnd Bergmann <[email protected]>
Subject: Re: [PATCH] powerpc: Fix inconsistent of_node_to_nid EXPORT_SYMB= OL handling

Quoted 1 line · Shailendra Singh

The generic implementation of of_node_to_nid is EXPORT_SYMBOL.

True. Added in 298535c00a2c, in April 2016.

Quoted 1 line

The powerpc implementation added by following commit is EXPORT_SYMBOL_G=

PL.

Quoted 3 lines

commit 953039c8df7b ("[PATCH] powerpc: Allow devices to register with=20 numa
topology")

Which was merged in May 2006.

So the powerpc version has almost 10 years precedence. [Shailendra] - Agreed. Keeping the licensing consistent will help drivers= =20making use of it on all architectures.

Quoted 6 lines

This creates an inconsistency for of_node_to_nid callers across=20 architectures.

Update the powerpc implementation to be exported consistently with the =

generic implementation.

But I guess it's a pretty boring API. So I'll merge this unless anyone el= se objects.
[Shailendra] - Thanks. Appreciate your quick response.

cheers

Quoted 16 lines
---
 arch/powerpc/mm/numa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/mm/numa.c index=20 renamed from arch/powerpc/mm/numa.c +0 -0

b1099cb2f393..8aa4ca3c84c9 100644

arch/powerpc/mm/numa.c +0 -0
@@ -290,7 +290,7 @@ int of_node_to_nid(struct device_node *device)

=20

arch/powerpc/mm/numa.c +1 -1
 	return nid;
 }
-EXPORT_SYMBOL_GPL(of_node_to_nid);
+EXPORT_SYMBOL(of_node_to_nid);
Quoted 4 lines

=20
static int __init find_min_common_depth(void) {
--
2.4.11

-------------------------------------------------------------------------=
----------
This email message is for the sole use of the intended recipient(s) and m= ay contain
confidential information. Any unauthorized review, use, disclosure or di= stribution
is prohibited. If you are not the intended recipient, please contact the= =20sender by
reply email and destroy all copies of the original message.
-------------------------------------------------------------------------=
----------

#3 lore raw
In reply to Shailendra Singh
Quoted 6 lines · Shailendra Singh

The generic implementation of of_node_to_nid is EXPORT_SYMBOL.

The powerpc implementation added by following commit is EXPORT_SYMBOL_GPL. commit 953039c8df7b ("[PATCH] powerpc: Allow devices to register with numa topology")

Quoted 7 lines

This creates an inconsistency for of_node_to_nid callers across architectures.

Update the powerpc implementation to be exported consistently with the generic implementation.

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/be9ba9ff93cc3e44dc46da9ed25655

cheers