Skip to content

Commit 2f6b884

Browse files
committed
function_graph: Rename BYTE_NUMBER to CHAR_NUMBER in selftests
The function_graph selftests checks various size variables to pass from the entry of the function to the exit. It tests 1, 2, 4 and 8 byte words. The 1 byte macro was called BYTE_NUMBER but that is used in the sh architecture: arch/sh/include/asm/bitops-op32.h Just rename the macro to CHAR_NUMBER. Link: https://lore.kernel.org/linux-trace-kernel/[email protected] Cc: Masami Hiramatsu <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Fixes: 47c3c70 ("function_graph: Add selftest for passing local variables") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 9a2a3aa commit 2f6b884

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel/trace/trace_selftest.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ trace_selftest_startup_function(struct tracer *trace, struct trace_array *tr)
758758

759759
#ifdef CONFIG_DYNAMIC_FTRACE
760760

761-
#define BYTE_NUMBER 123
761+
#define CHAR_NUMBER 123
762762
#define SHORT_NUMBER 12345
763763
#define WORD_NUMBER 1234567890
764764
#define LONG_NUMBER 1234567890123456789LL
@@ -789,7 +789,7 @@ static __init int store_entry(struct ftrace_graph_ent *trace,
789789

790790
switch (size) {
791791
case 1:
792-
*(char *)p = BYTE_NUMBER;
792+
*(char *)p = CHAR_NUMBER;
793793
break;
794794
case 2:
795795
*(short *)p = SHORT_NUMBER;
@@ -830,7 +830,7 @@ static __init void store_return(struct ftrace_graph_ret *trace,
830830

831831
switch (fixture->store_size) {
832832
case 1:
833-
expect = BYTE_NUMBER;
833+
expect = CHAR_NUMBER;
834834
found = *(char *)p;
835835
break;
836836
case 2:

0 commit comments

Comments
 (0)