From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965816AbdDSQRy (ORCPT ); Wed, 19 Apr 2017 12:17:54 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:34487 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965558AbdDSQRp (ORCPT ); Wed, 19 Apr 2017 12:17:45 -0400 From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Adrian Hunter , David Ahern , Jiri Olsa , Namhyung Kim , Wang Nan Subject: [PATCH 02/28] perf tools: Remove FLEX_ARRAY definition Date: Wed, 19 Apr 2017 13:16:57 -0300 Message-Id: <20170419161723.21011-3-acme@kernel.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170419161723.21011-1-acme@kernel.org> References: <20170419161723.21011-1-acme@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnaldo Carvalho de Melo We rely on symbol->name[0] since the beginning of tools/perf/, never having received any complaint about it, also all the containers build perf just fine, so remove this git codebase remnant. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-jsjpgojut8e22o2gtz83augk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-help.c | 4 ++-- tools/perf/util/util.h | 22 ---------------------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c index 1eec96a0fa67..9730fd409f3b 100644 --- a/tools/perf/builtin-help.c +++ b/tools/perf/builtin-help.c @@ -15,13 +15,13 @@ static struct man_viewer_list { struct man_viewer_list *next; - char name[FLEX_ARRAY]; + char name[0]; } *man_viewer_list; static struct man_viewer_info_list { struct man_viewer_info_list *next; const char *info; - char name[FLEX_ARRAY]; + char name[0]; } *man_viewer_info_list; enum help_format { diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index 7cf5752b38fd..df13658377e4 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h @@ -1,28 +1,6 @@ #ifndef GIT_COMPAT_UTIL_H #define GIT_COMPAT_UTIL_H -#ifndef FLEX_ARRAY -/* - * See if our compiler is known to support flexible array members. - */ -#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) -# define FLEX_ARRAY /* empty */ -#elif defined(__GNUC__) -# if (__GNUC__ >= 3) -# define FLEX_ARRAY /* empty */ -# else -# define FLEX_ARRAY 0 /* older GNU extension */ -# endif -#endif - -/* - * Otherwise, default to safer but a bit wasteful traditional style - */ -#ifndef FLEX_ARRAY -# define FLEX_ARRAY 1 -#endif -#endif - #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) #ifdef __GNUC__ -- 2.9.3