From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755695AbcHSX3B (ORCPT ); Fri, 19 Aug 2016 19:29:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35854 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753576AbcHSX26 (ORCPT ); Fri, 19 Aug 2016 19:28:58 -0400 From: Al Stone To: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org Cc: ahs3@redhat.com, Tony Luck , Fenghua Yu , trivial@kernel.org Subject: [PATCH 2/2] ia64: fix compilation error when using struct before defining it Date: Fri, 19 Aug 2016 17:28:50 -0600 Message-Id: <1471649330-32415-3-git-send-email-ahs3@redhat.com> In-Reply-To: <1471649330-32415-1-git-send-email-ahs3@redhat.com> References: <1471649330-32415-1-git-send-email-ahs3@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 19 Aug 2016 23:28:58 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In sn2_smp.c, the struct ptc_stats was being used before it was defined. Move the usage of the struct to after the definition. Found during cross-compilation using ia64 defconfig. Signed-off-by: Al Stone --- arch/ia64/sn/kernel/sn2/sn2_smp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c index 8701b2f..7316e9f 100644 --- a/arch/ia64/sn/kernel/sn2/sn2_smp.c +++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c @@ -41,9 +41,6 @@ #include #include -DEFINE_PER_CPU(struct ptc_stats, ptcstats); -DECLARE_PER_CPU(struct ptc_stats, ptcstats); - static __cacheline_aligned DEFINE_SPINLOCK(sn2_global_ptc_lock); /* 0 = old algorithm (no IPI flushes), 1 = ipi deadlock flush, 2 = ipi instead of SHUB ptc, >2 = always ipi */ @@ -83,6 +80,9 @@ struct ptc_stats { unsigned long shub_ipi_flushes_itc_clocks; }; +DEFINE_PER_CPU(struct ptc_stats, ptcstats); +DECLARE_PER_CPU(struct ptc_stats, ptcstats); + #define sn2_ptctest 0 static inline unsigned long wait_piowc(void) -- 2.7.4