OSDN Git Service

modpost: delegate updating namespaces to separate function
authorMatthias Maennich <maennich@google.com>
Fri, 18 Oct 2019 09:31:40 +0000 (10:31 +0100)
committerJessica Yu <jeyu@kernel.org>
Fri, 18 Oct 2019 13:32:42 +0000 (15:32 +0200)
commita2b11184389489dcca4fa899b290fc2751ea55ac
tree4fb2bc0a84fb64b0e9d32b2e4a28aa442539565d
parent4f5cafb5cb8471e54afdc9054d973535614f7675
modpost: delegate updating namespaces to separate function

Let the function 'sym_update_namespace' take care of updating the
namespace for a symbol. While this currently only replaces one single
location where namespaces are updated, in a following patch, this
function will get more call sites.

The function signature is intentionally close to sym_update_crc and
taking the name by char* seems like unnecessary work as the symbol has
to be looked up again. In a later patch of this series, this concern
will be addressed.

This function ensures that symbol::namespace is either NULL or has a
valid non-empty value. Previously, the empty string was considered 'no
namespace' as well and this lead to confusion.

Acked-by: Will Deacon <will@kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
scripts/mod/modpost.c