Skip to contentSkip to conversation

string: Export strnchrnul()

PATCH In review Andy Shevchenko 5 participants 8 messages Nov 10

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 string: Export strnchrnul()

Export strnchrnul() for users that may be compiled as modules.

Fixes 0bee0cece2a6 ("lib/string: add strnchrnul()")

---

Assumed to go via PDx86 where the first (wow!) module user wants to use it.

 lib/string.c | 1 +
 1 file changed, 1 insertion(+)
lib/string.c +1 -0
index a3778d5aab4a..cc8982a93afc 100644
@@ -352,6 +352,7 @@ char *strnchrnul(const char *s, size_t count, int c)
 		s++;
 	return (char *)s;
 }
+EXPORT_SYMBOL(strnchrnul);
 
 #ifndef __HAVE_ARCH_STRRCHR
 /**
Signature · 1 line
2.50.1
#1 lore raw
Quoted 9 lines · Andy Shevchenko

Export strnchrnul() for users that may be compiled as modules.

Fixes 0bee0cece2a6 ("lib/string: add strnchrnul()")

---

Assumed to go via PDx86 where the first (wow!) module user wants to use it.

Actually with the given Fixes tag it may go usual way to next -rcX. So, whatever appropriate the respective maintainers think...

Signature · 2 lines
With Best Regards,
Andy Shevchenko
Reviewed-by on v1 1/1
#2 lore raw
In reply to Andy Shevchenko

Am 10.11.26 um 17:41 schrieb Andy Shevchenko:

Quoted 1 line

Export strnchrnul() for users that may be compiled as modules.

Quoted 23 lines
Fixes 0bee0cece2a6 ("lib/string: add strnchrnul()")

---

Assumed to go via PDx86 where the first (wow!) module user wants to use it.

  lib/string.c | 1 +
  1 file changed, 1 insertion(+)
lib/string.c +1 -0
index a3778d5aab4a..cc8982a93afc 100644
@@ -352,6 +352,7 @@ char *strnchrnul(const char *s, size_t count, int c)
  		s++;
  	return (char *)s;
  }
+EXPORT_SYMBOL(strnchrnul);
 
  #ifndef __HAVE_ARCH_STRRCHR
  /**
#3 lore raw
In reply to Andy Shevchenko
Quoted 5 lines · Andy Shevchenko

Export strnchrnul() for users that may be compiled as modules.

Fixes 0bee0cece2a6 ("lib/string: add strnchrnul()")

Not sure that exporting a symbol is actually a fix. It rather looks like a normal development. Also, I'd like to have this patch attached to the PDx86 or whatever series that uses it.

Their implementation may change, so this would become the exported symbols space bloat.

Thanks,
Yury

Quoted 23 lines

---

Assumed to go via PDx86 where the first (wow!) module user wants to use it.

 lib/string.c | 1 +
 1 file changed, 1 insertion(+)
lib/string.c +1 -0
index a3778d5aab4a..cc8982a93afc 100644
@@ -352,6 +352,7 @@ char *strnchrnul(const char *s, size_t count, int c)
 		s++;
 	return (char *)s;
 }
+EXPORT_SYMBOL(strnchrnul);
 
 #ifndef __HAVE_ARCH_STRRCHR
 /**
Signature · 1 line
2.50.1
maintainer
#4 lore raw
Quoted 10 lines · Yury Norov
Quoted 5 lines · Andy Shevchenko

Export strnchrnul() for users that may be compiled as modules.

Fixes 0bee0cece2a6 ("lib/string: add strnchrnul()")

Not sure that exporting a symbol is actually a fix. It rather looks like a normal development. Also, I'd like to have this patch attached to the PDx86 or whatever series that uses it.

I did put it now before the change that broke because of the missing export.

I dropped Closes and Fixes tags as the issue should be non-problem after the history rewrite.

Signature · 1 line
 i.
Quoted 30 lines

Their implementation may change, so this would become the exported symbols space bloat.

Thanks,
Yury

Quoted 23 lines

---

Assumed to go via PDx86 where the first (wow!) module user wants to use it.

 lib/string.c | 1 +
 1 file changed, 1 insertion(+)
lib/string.c +1 -0
index a3778d5aab4a..cc8982a93afc 100644
@@ -352,6 +352,7 @@ char *strnchrnul(const char *s, size_t count, int c)
 		s++;
 	return (char *)s;
 }
+EXPORT_SYMBOL(strnchrnul);
 
 #ifndef __HAVE_ARCH_STRRCHR
 /**
Signature · 1 line
2.50.1
Signature · 1 line
 i.
Reviewed-by
#5 lore raw
Quoted 14 lines · Ilpo Järvinen
Quoted 10 lines · Yury Norov
Quoted 5 lines · Andy Shevchenko

Export strnchrnul() for users that may be compiled as modules.

Fixes 0bee0cece2a6 ("lib/string: add strnchrnul()")

Not sure that exporting a symbol is actually a fix. It rather looks like a normal development. Also, I'd like to have this patch attached to the PDx86 or whatever series that uses it.

Quoted 5 lines

I did put it now before the change that broke because of the missing export.

I dropped Closes and Fixes tags as the issue should be non-problem after the history rewrite.

OK, then

maintainer
#6 lore raw
In reply to Andy Shevchenko
Quoted 9 lines · Andy Shevchenko

Export strnchrnul() for users that may be compiled as modules.

Fixes 0bee0cece2a6 ("lib/string: add strnchrnul()")

---

Assumed to go via PDx86 where the first (wow!) module user wants to use it.

Thanks guys,

I'm so surprised by this, sashiko did warn about this so I even checked myself and saw an export after the closing brace so thought sashiko was just wrong... Maybe I was looking that the strrchr's export, can't think of anything else to explain it.

Quoted 16 lines
 lib/string.c | 1 +
 1 file changed, 1 insertion(+)
lib/string.c +1 -0
index a3778d5aab4a..cc8982a93afc 100644
@@ -352,6 +352,7 @@ char *strnchrnul(const char *s, size_t count, int c)
 		s++;
 	return (char *)s;
 }
+EXPORT_SYMBOL(strnchrnul);
 
 #ifndef __HAVE_ARCH_STRRCHR
 /**
Signature · 1 line
 i.
#7 lore raw
Quoted 10 lines · Ilpo Järvinen
Quoted 8 lines · Andy Shevchenko

Export strnchrnul() for users that may be compiled as modules.

Fixes 0bee0cece2a6 ("lib/string: add strnchrnul()")

---

Quoted 8 lines
Quoted 1 line

Assumed to go via PDx86 where the first (wow!) module user wants to use it.

Thanks guys,

I'm so surprised by this, sashiko did warn about this so I even checked myself and saw an export after the closing brace so thought sashiko was just wrong... Maybe I was looking that the strrchr's export, can't think of anything else to explain it.

The strchrnul is exported, I believe you missed 'n' which may explain the course of what happened. Compare:

EXPORT_SYMBOL(strchrnul);
EXPORT_SYMBOL(strnchrnul);

If you don't stare on this, you won't notice the difference at a glance. (I caught myself on the same, but it was after this report, so I spend
a few more seconds to get it.)

Signature · 2 lines
With Best Regards,
Andy Shevchenko