Re: [PATCH] samples/hw_breakpoint: Fix kernel BUG 'invalid opcode: 0000'

From: Rong Tao
Date: Tue Jul 25 2023 - 09:38:58 EST


Hi Luis

The 'kernel test robot' report an error [0]:

>> samples/hw_breakpoint/data_breakpoint.c:73:2: error: call to undeclared function '__symbol_put';
ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
__symbol_put(ksym_name);
^
samples/hw_breakpoint/data_breakpoint.c:73:2: note: did you mean '__symbol_get'?
include/linux/module.h:301:7: note: '__symbol_get' declared here
void *__symbol_get(const char *symbol);
^
1 error generated.

Do I need to do something? It seems that no changes need to be made from the
mainline code.

[0] https://lore.kernel.org/oe-kbuild-all/202307250926.06DQZjVe-lkp@xxxxxxxxx/

Rong