Skip to content

Commit 88a7108

Browse files
rnavmpe
authored andcommitted
tools/bpf: Rename 'struct event' to avoid naming conflict
On ppc64le, trying to build bpf seltests throws the below warning: In file included from runqslower.bpf.c:5: ./runqslower.h:7:8: error: redefinition of 'event' struct event { ^ /home/naveen/linux/tools/testing/selftests/bpf/tools/build/runqslower/vmlinux.h:156602:8: note: previous definition is here struct event { ^ This happens since 'struct event' is defined in drivers/net/ethernet/alteon/acenic.h . Rename the one in runqslower to a more appropriate 'runq_event' to avoid the naming conflict. Signed-off-by: Naveen N. Rao <[email protected]> Acked-by: Daniel Borkmann <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/c13cb3767d26257ca4387b8296b632b433a58db6.1641468127.git.naveen.n.rao@linux.vnet.ibm.com
1 parent f9320c4 commit 88a7108

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tools/bpf/runqslower/runqslower.bpf.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ int handle__sched_switch(u64 *ctx)
6868
*/
6969
struct task_struct *prev = (struct task_struct *)ctx[1];
7070
struct task_struct *next = (struct task_struct *)ctx[2];
71-
struct event event = {};
71+
struct runq_event event = {};
7272
u64 *tsp, delta_us;
7373
long state;
7474
u32 pid;

tools/bpf/runqslower/runqslower.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ static int bump_memlock_rlimit(void)
100100

101101
void handle_event(void *ctx, int cpu, void *data, __u32 data_sz)
102102
{
103-
const struct event *e = data;
103+
const struct runq_event *e = data;
104104
struct tm *tm;
105105
char ts[32];
106106
time_t t;

tools/bpf/runqslower/runqslower.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#define TASK_COMM_LEN 16
66

7-
struct event {
7+
struct runq_event {
88
char task[TASK_COMM_LEN];
99
__u64 delta_us;
1010
pid_t pid;

0 commit comments

Comments
 (0)