lkml.org 
[lkml]   [2015]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] perf tests: Add arch tests
On Sat, Sep 05, 2015 at 08:02:21PM +0100, Matt Fleming wrote:

SNIP

> diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
> index 8cf0601d1662..a1b2265eaf55 100644
> --- a/tools/perf/tests/builtin-test.c
> +++ b/tools/perf/tests/builtin-test.c
> @@ -14,10 +14,17 @@
> #include "parse-options.h"
> #include "symbol.h"
>
> -static struct test {
> - const char *desc;
> - int (*func)(void);
> -} tests[] = {
> +#if defined(__x86_64__) || defined(__i386__)
> +#include "arch-tests.h"
> +#else
> +static struct test arch_tests[] = {
> + {
> + .func = NULL,
> + },
> +};
> +#endif

this could be defined as __weak array so we dont need to have #if above

jirka


\
 
 \ /
  Last update: 2015-09-07 14:41    [W:0.193 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site