mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Al Stone <ahs3@redhat.com>
To: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: ahs3@redhat.com, Tony Luck <tony.luck@intel.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	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	[thread overview]
Message-ID: <1471649330-32415-3-git-send-email-ahs3@redhat.com> (raw)
In-Reply-To: <1471649330-32415-1-git-send-email-ahs3@redhat.com>

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 <ahs3@redhat.com>
---
 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 <asm/sn/rw_mmr.h>
 #include <asm/sn/sn_feature_sets.h>
 
-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

      parent reply	other threads:[~2016-08-19 23:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-19 23:28 [PATCH 0/2] minor ia64 source code changes Al Stone
2016-08-19 23:28 ` [PATCH 1/2] ia64: remove extraneous white space Al Stone
2016-08-19 23:28 ` Al Stone [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1471649330-32415-3-git-send-email-ahs3@redhat.com \
    --to=ahs3@redhat.com \
    --cc=fenghua.yu@intel.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome