[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1488483865-11857-1-git-send-email-victor.erminpour@oracle.com>
Date: Thu, 2 Mar 2017 11:44:25 -0800
From: Victor Erminpour <victor.erminpour@...cle.com>
To: peterz@...radead.org
Cc: mingo@...hat.com, acme@...nel.org,
alexander.shishkin@...ux.intel.com, linux-kernel@...r.kernel.org
Subject: [PATCH] Add braces for union initializer in struct static_key, fix perf Makefile dependency.
Adding explicit braces for nested initialization of struct static_key
when defining STATIC_KEY_INIT_TRUE and STATIC_KEY_INIT_FALSE in
include/linux/jump_label.h. Without the braces, older version of gcc
fail to compile the code.
Also, adding fixdep dependency to JEVENTS_IN make-target in
tools/perf/Makefile.perf.
Signed-off-by: Victor Erminpour <victor.erminpour@...cle.com>
---
include/linux/jump_label.h | 4 ++--
tools/perf/Makefile.perf | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
index 8e06d75..d536b72 100644
--- a/include/linux/jump_label.h
+++ b/include/linux/jump_label.h
@@ -166,10 +166,10 @@ extern void arch_jump_label_transform_static(struct jump_entry *entry,
*/
#define STATIC_KEY_INIT_TRUE \
{ .enabled = { 1 }, \
- .entries = (void *)JUMP_TYPE_TRUE }
+ { .entries = (void *)JUMP_TYPE_TRUE } }
#define STATIC_KEY_INIT_FALSE \
{ .enabled = { 0 }, \
- .entries = (void *)JUMP_TYPE_FALSE }
+ { .entries = (void *)JUMP_TYPE_FALSE } }
#else /* !HAVE_JUMP_LABEL */
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 79fe31f..7e014df 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -407,7 +407,7 @@ build := -f $(srctree)/tools/build/Makefile.build dir=. obj
$(PERF_IN): prepare FORCE
$(Q)$(MAKE) $(build)=perf
-$(JEVENTS_IN): FORCE
+$(JEVENTS_IN): fixdep FORCE
$(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=pmu-events obj=jevents
$(JEVENTS): $(JEVENTS_IN)
--
1.8.3.1
Powered by blists - more mailing lists