Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a07b503 authored by Mathieu Desnoyers's avatar Mathieu Desnoyers Committed by Linus Torvalds
Browse files

membarrier: clean up selftest



We don't need to specify an explicit rule in the Makefile, the implicit
one will do the same.  The "__EXPORTED_HEADERS__" define is not needed,
because we build the test against the installed kernel headers, not the
in-tree kernel headers.  Re-use "$(TEST_PROGS)" in the clean target
rather than spelling the executable name twice.  Include <unistd.h>
rather than the rather specific <asm-generic/unistd.h>.  Include
<syscall.h> rather than <sys/syscall.h>.  In both cases, the former
header is located in a standard location and includes the latter.

Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Cc: Pranith Kumar <bobby.prani@gmail.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d5028f9f
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
CFLAGS += -g -I../../../../usr/include/

all:
	$(CC) $(CFLAGS) membarrier_test.c -o membarrier_test

TEST_PROGS := membarrier_test

all: $(TEST_PROGS)

include ../lib.mk

clean:
	$(RM) membarrier_test
	$(RM) $(TEST_PROGS)
+1 −4
Original line number Diff line number Diff line
#define _GNU_SOURCE
#define __EXPORTED_HEADERS__

#include <linux/membarrier.h>
#include <asm-generic/unistd.h>
#include <sys/syscall.h>
#include <syscall.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>