kbuild: fix adjust_autoksyms.sh for modules that need only one symbol
diff mbox

Message ID alpine.LFD.2.20.1604281729590.5091@knanqh.ubzr
State New
Headers show

Commit Message

Nicolas Pitre April 28, 2016, 9:33 p.m. UTC
When only one symbol was listed and therefore the line didn't contain
any space to separate multiple symbols, that symbol got ignored.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Nicolas Pitre <nico@linaro.org>

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Arnd Bergmann April 28, 2016, 9:49 p.m. UTC | #1
On Thursday 28 April 2016 17:33:38 Nicolas Pitre wrote:
> When only one symbol was listed and therefore the line didn't contain
> any space to separate multiple symbols, that symbol got ignored.
> 
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Nicolas Pitre <nico@linaro.org>
> 
> 

Tested-by: Arnd Bergmann <arnd@arndb.de>
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Michal Marek May 10, 2016, 3:25 p.m. UTC | #2
On Thu, Apr 28, 2016 at 05:33:38PM -0400, Nicolas Pitre wrote:
> When only one symbol was listed and therefore the line didn't contain
> any space to separate multiple symbols, that symbol got ignored.
> 
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Nicolas Pitre <nico@linaro.org>

Applied to kbuild.git#kbuild.

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/scripts/adjust_autoksyms.sh b/scripts/adjust_autoksyms.sh
index 5bf538f1ed..8dc1918b67 100755
--- a/scripts/adjust_autoksyms.sh
+++ b/scripts/adjust_autoksyms.sh
@@ -59,7 +59,7 @@  cat > "$new_ksyms_file" << EOT
  */
 
 EOT
-sed -ns -e '3s/ /\n/gp' "$MODVERDIR"/*.mod | sort -u |
+sed -ns -e '3{s/ /\n/g;/^$/!p;}' "$MODVERDIR"/*.mod | sort -u |
 while read sym; do
 	if [ -n "$CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX" ]; then
 		sym="${sym#_}"