public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/9] ARM: pxa: move extern declarations to pm.h
Date: Fri, 29 Jan 2016 15:06:30 +0100	[thread overview]
Message-ID: <1454076396-3563101-7-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1454076396-3563101-1-git-send-email-arnd@arndb.de>

When CONFIG_IWMMXT is disabled, we get a warning in pxa3xx.c:

arch/arm/mach-pxa/pxa3xx.c: In function 'pxa3xx_cpu_pm_suspend':
arch/arm/mach-pxa/pxa3xx.c:109:2: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

It turns out that there is an 'extern' declaration in the
middle of a function.

For consistency, this moves the declaration and two others from
the same file into pm.h.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-pxa/pm.h     | 3 +++
 arch/arm/mach-pxa/pxa3xx.c | 3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-pxa/pm.h b/arch/arm/mach-pxa/pm.h
index 51558bcee999..3aab90d8d2b7 100644
--- a/arch/arm/mach-pxa/pm.h
+++ b/arch/arm/mach-pxa/pm.h
@@ -29,6 +29,9 @@ extern int pxa_pm_enter(suspend_state_t state);
 extern int pxa_pm_prepare(void);
 extern void pxa_pm_finish(void);
 
+extern const char pm_enter_standby_start[], pm_enter_standby_end[];
+extern int pxa3xx_finish_suspend(unsigned long);
+
 /* NOTE: this is for PM debugging on Lubbock,  it's really a big
  * ugly, but let's keep the crap minimum here, instead of direct
  * accessing the LUBBOCK CPLD registers in arch/arm/mach-pxa/pm.c
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index a1c4c888f246..1ba62be65f7c 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -68,7 +68,6 @@ static unsigned long wakeup_src;
  */
 static void pxa3xx_cpu_standby(unsigned int pwrmode)
 {
-	extern const char pm_enter_standby_start[], pm_enter_standby_end[];
 	void (*fn)(unsigned int) = (void __force *)(sram + 0x8000);
 
 	memcpy_toio(sram + 0x8000, pm_enter_standby_start,
@@ -106,8 +105,6 @@ static void pxa3xx_cpu_pm_suspend(void)
 	asm volatile("mra %Q0, %R0, acc0" : "=r" (acc0));
 #endif
 
-	extern int pxa3xx_finish_suspend(unsigned long);
-
 	/* resuming from D2 requires the HSIO2/BOOT/TPM clocks enabled */
 	CKENA |= (1 << CKEN_BOOT) | (1 << CKEN_TPM);
 	CKENB |= 1 << (CKEN_HSIO2 & 0x1f);
-- 
2.7.0

  parent reply	other threads:[~2016-01-29 14:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 14:06 [PATCH 0/9] ARM: pxa/mmp cleanups and warning fixes Arnd Bergmann
2016-01-29 14:06 ` [PATCH 1/9] ARM: pxa: define clock registers as __iomem Arnd Bergmann
2016-01-29 18:31   ` Stephen Boyd
2016-01-29 14:06 ` [PATCH 2/9] ARM: pxa: mark spitz_card_pwr_ctrl as __maybe_unused Arnd Bergmann
2016-01-29 14:06 ` [PATCH 3/9] ARM: pxa: mark unused eseries code " Arnd Bergmann
2016-01-29 14:06 ` [PATCH 4/9] ARM: pxa: don't select GPIO_SYSFS for MIOA701 Arnd Bergmann
2016-01-29 14:06 ` [PATCH 5/9] ARM: pxa: always select one of the two CPU types Arnd Bergmann
2016-01-29 14:06 ` Arnd Bergmann [this message]
2016-01-29 14:06 ` [PATCH 7/9] ARM: pxa: fix building without IWMMXT Arnd Bergmann
2016-01-29 14:06 ` [PATCH 8/9] ARM: pxa: don't select RFKILL if CONFIG_NET is disabled Arnd Bergmann
2016-01-29 14:06 ` [PATCH 9/9] ARM: mmp: mark usb_dma_mask as __maybe_unused Arnd Bergmann
2016-02-22 22:38   ` Robert Jarzmik
2016-01-29 15:25 ` [PATCH 0/9] ARM: pxa/mmp cleanups and warning fixes Robert Jarzmik
2016-01-29 15:48   ` Arnd Bergmann
2016-01-30 10:08     ` Robert Jarzmik

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=1454076396-3563101-7-git-send-email-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.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