Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751589AbdCBTqH (ORCPT ); Thu, 2 Mar 2017 14:46:07 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:17280 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752175AbdCBTqD (ORCPT ); Thu, 2 Mar 2017 14:46:03 -0500 From: Victor Erminpour To: peterz@infradead.org Cc: mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org Subject: [PATCH] Add braces for union initializer in struct static_key, fix perf Makefile dependency. Date: Thu, 2 Mar 2017 11:44:25 -0800 Message-Id: <1488483865-11857-1-git-send-email-victor.erminpour@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1567 Lines: 46 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 --- 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