Skip to contentSkip to conversation

Move static keyword at beginning of declaration

PATCH Applied Mathieu Malaterre 3 participants 3 messages Feb 2, 2019 – Feb 8, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Move static keyword at beginning of declaration

Move the static keyword around to remove the following warnings (W=1):

arch/powerpc/platforms/ps3/os-area.c:212:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration] arch/powerpc/platforms/ps3/system-bus.c:45:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration]

---
 arch/powerpc/platforms/ps3/os-area.c    | 4 ++--
 arch/powerpc/platforms/ps3/system-bus.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
arch/powerpc/platforms/ps3/os-area.c +2 -2
index f5387ad82279..4d65c5380020 100644
@@ -205,11 +205,11 @@ static const struct os_area_db_id os_area_db_id_rtc_diff = {
  *  3) The number of seconds from 1970 to 2000.
  */
 
-struct saved_params {
+static struct saved_params {
 	unsigned int valid;
 	s64 rtc_diff;
 	unsigned int av_multi_out;
-} static saved_params;
+} saved_params;
 
 static struct property property_rtc_diff = {
 	.name = "linux,rtc_diff",
arch/powerpc/platforms/ps3/system-bus.c +2 -2
index 5cc35d6b94b6..7c227e784247 100644
@@ -37,12 +37,12 @@ static struct device ps3_system_bus = {
 };
 
 /* FIXME: need device usage counters! */
-struct {
+static struct {
 	struct mutex mutex;
 	int sb_11; /* usb 0 */
 	int sb_12; /* usb 0 */
 	int gpu;
-} static usage_hack;
+} usage_hack;
 
 static int ps3_is_device(struct ps3_system_bus_device *dev, u64 bus_id,
 			 u64 dev_id)
Signature · 1 line
2.19.2
maintainer Acked-by on v1 1/1
#1 lore raw

arch/powerpc/platforms/ps3/os-area.c static const struct os_area_db_id os_area_db_id_rtc_diff = { · line 212

Quoted 12 lines · Mathieu Malaterre

Move the static keyword around to remove the following warnings (W=1):

arch/powerpc/platforms/ps3/os-area.c:212:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration] arch/powerpc/platforms/ps3/system-bus.c:45:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration]

arch/powerpc/platforms/ps3/os-area.c +2 -2
-struct saved_params {
+static struct saved_params {
 	unsigned int valid;
 	s64 rtc_diff;
 	unsigned int av_multi_out;
-} static saved_params;
+} saved_params;

Seems fine.

#2 lore raw
In reply to Mathieu Malaterre
Quoted 7 lines · Mathieu Malaterre

Move the static keyword around to remove the following warnings (W=1):

arch/powerpc/platforms/ps3/os-area.c:212:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration] arch/powerpc/platforms/ps3/system-bus.c:45:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration]

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/8e0f97357533aa5b57b333de47eb008c

cheers