diff options
author | Arnd Bergmann <arnd@arndb.de> | 2023-07-25 10:25:36 +0200 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2023-07-26 01:34:47 +0200 |
commit | b9080468caeddc58a91edd1c3a7d212ea82b0d1d (patch) | |
tree | 3f43b872a2acf035f4e4552fee8b6382934f4008 /samples/watchdog | |
parent | samples/hw_breakpoint: Fix kernel BUG 'invalid opcode: 0000' (diff) | |
download | linux-b9080468caeddc58a91edd1c3a7d212ea82b0d1d.tar.xz linux-b9080468caeddc58a91edd1c3a7d212ea82b0d1d.zip |
samples/hw_breakpoint: fix building without module unloading
__symbol_put() is really meant as an internal helper and is not available
when module unloading is disabled, unlike the previously used symbol_put():
samples/hw_breakpoint/data_breakpoint.c: In function 'hw_break_module_exit':
samples/hw_breakpoint/data_breakpoint.c:73:9: error: implicit declaration of function '__symbol_put'; did you mean '__symbol_get'? [-Werror=implicit-function-declaration]
The hw_break_module_exit() function is not actually used when module
unloading is disabled, but it still causes the build failure for an
undefined identifier. Enclose this one call in an appropriate #ifdef to
clarify what the requirement is. Leaving out the entire exit function
would also work but feels less clar in this case.
Fixes: 910e230d5f1bb ("samples/hw_breakpoint: Fix kernel BUG 'invalid opcode: 0000'")
Fixes: d8a84d33a4954 ("samples/hw_breakpoint: drop use of kallsyms_lookup_name()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'samples/watchdog')
0 files changed, 0 insertions, 0 deletions