diff options
author | Gideon Israel Dsouza <gidisrael@gmail.com> | 2017-02-24 18:00:35 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-24 20:46:56 -0500 |
commit | 849de0cd2c873c878fc2605156f10a8ade9bde28 (patch) | |
tree | a9aedf5ef9a4a7c03ae781f61805e2e3260dd953 | |
parent | a3f0825e7e37d99a02a8a1b1599687667ee50d04 (diff) |
m68k: replace gcc specific macros with ones from compiler.h
There is <linux/compiler.h> which provides macros for various gcc
specific constructs. Eg: __weak for __attribute__((weak)). I've
cleaned all instances of gcc specific attributes with the right macros
for all files under /arch/m68k
Link: http://lkml.kernel.org/r/1485540901-1988-3-git-send-email-gidisrael@gmail.com
Signed-off-by: Gideon Israel Dsouza <gidisrael@gmail.com>
Cc: Greg Ungerer <gerg@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/m68k/68000/bootlogo-vz.h | 4 | ||||
-rw-r--r-- | arch/m68k/68000/bootlogo.h | 4 | ||||
-rw-r--r-- | arch/m68k/include/asm/MC68328.h | 3 | ||||
-rw-r--r-- | arch/m68k/include/asm/MC68EZ328.h | 3 | ||||
-rw-r--r-- | arch/m68k/include/asm/MC68VZ328.h | 2 | ||||
-rw-r--r-- | arch/m68k/include/asm/natfeat.h | 3 | ||||
-rw-r--r-- | arch/m68k/lib/ashldi3.c | 8 | ||||
-rw-r--r-- | arch/m68k/lib/ashrdi3.c | 8 | ||||
-rw-r--r-- | arch/m68k/lib/lshrdi3.c | 8 | ||||
-rw-r--r-- | arch/m68k/lib/muldi3.c | 8 |
10 files changed, 29 insertions, 22 deletions
diff --git a/arch/m68k/68000/bootlogo-vz.h b/arch/m68k/68000/bootlogo-vz.h index b38e2b255142..6ff09beba1ba 100644 --- a/arch/m68k/68000/bootlogo-vz.h +++ b/arch/m68k/68000/bootlogo-vz.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #include <linux/compiler.h> | ||
2 | |||
1 | #define splash_width 640 | 3 | #define splash_width 640 |
2 | #define splash_height 480 | 4 | #define splash_height 480 |
3 | unsigned char __attribute__ ((aligned(16))) bootlogo_bits[] = { | 5 | unsigned char __aligned(16) bootlogo_bits[] = { |
4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 6 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 7 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
6 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 8 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
diff --git a/arch/m68k/68000/bootlogo.h b/arch/m68k/68000/bootlogo.h index b896c933fafc..c466db3ca3a8 100644 --- a/arch/m68k/68000/bootlogo.h +++ b/arch/m68k/68000/bootlogo.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #include <linux/compiler.h> | ||
2 | |||
1 | #define bootlogo_width 160 | 3 | #define bootlogo_width 160 |
2 | #define bootlogo_height 160 | 4 | #define bootlogo_height 160 |
3 | unsigned char __attribute__ ((aligned(16))) bootlogo_bits[] = { | 5 | unsigned char __aligned(16) bootlogo_bits[] = { |
4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x01, 0x00, 0x00, 0x00, | 6 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x01, 0x00, 0x00, 0x00, |
5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 7 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
6 | 0x00, 0x00, 0x40, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 8 | 0x00, 0x00, 0x40, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
diff --git a/arch/m68k/include/asm/MC68328.h b/arch/m68k/include/asm/MC68328.h index 1a8080c4cc40..b61230e74e63 100644 --- a/arch/m68k/include/asm/MC68328.h +++ b/arch/m68k/include/asm/MC68328.h | |||
@@ -8,6 +8,7 @@ | |||
8 | * Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com>, | 8 | * Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com>, |
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | #include <linux/compiler.h> | ||
11 | 12 | ||
12 | #ifndef _MC68328_H_ | 13 | #ifndef _MC68328_H_ |
13 | #define _MC68328_H_ | 14 | #define _MC68328_H_ |
@@ -993,7 +994,7 @@ typedef volatile struct { | |||
993 | volatile unsigned short int pad1; | 994 | volatile unsigned short int pad1; |
994 | volatile unsigned short int pad2; | 995 | volatile unsigned short int pad2; |
995 | volatile unsigned short int pad3; | 996 | volatile unsigned short int pad3; |
996 | } __attribute__((packed)) m68328_uart; | 997 | } __packed m68328_uart; |
997 | 998 | ||
998 | 999 | ||
999 | /********** | 1000 | /********** |
diff --git a/arch/m68k/include/asm/MC68EZ328.h b/arch/m68k/include/asm/MC68EZ328.h index fedac87c5d13..703331ece328 100644 --- a/arch/m68k/include/asm/MC68EZ328.h +++ b/arch/m68k/include/asm/MC68EZ328.h | |||
@@ -9,6 +9,7 @@ | |||
9 | * The Silver Hammer Group, Ltd. | 9 | * The Silver Hammer Group, Ltd. |
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | #include <linux/compiler.h> | ||
12 | 13 | ||
13 | #ifndef _MC68EZ328_H_ | 14 | #ifndef _MC68EZ328_H_ |
14 | #define _MC68EZ328_H_ | 15 | #define _MC68EZ328_H_ |
@@ -815,7 +816,7 @@ typedef volatile struct { | |||
815 | volatile unsigned short int nipr; | 816 | volatile unsigned short int nipr; |
816 | volatile unsigned short int pad1; | 817 | volatile unsigned short int pad1; |
817 | volatile unsigned short int pad2; | 818 | volatile unsigned short int pad2; |
818 | } __attribute__((packed)) m68328_uart; | 819 | } __packed m68328_uart; |
819 | 820 | ||
820 | 821 | ||
821 | /********** | 822 | /********** |
diff --git a/arch/m68k/include/asm/MC68VZ328.h b/arch/m68k/include/asm/MC68VZ328.h index 34a51b2c784f..fbaed7ddfb41 100644 --- a/arch/m68k/include/asm/MC68VZ328.h +++ b/arch/m68k/include/asm/MC68VZ328.h | |||
@@ -909,7 +909,7 @@ typedef struct { | |||
909 | volatile unsigned short int nipr; | 909 | volatile unsigned short int nipr; |
910 | volatile unsigned short int hmark; | 910 | volatile unsigned short int hmark; |
911 | volatile unsigned short int unused; | 911 | volatile unsigned short int unused; |
912 | } __attribute__((packed)) m68328_uart; | 912 | } __packed m68328_uart; |
913 | 913 | ||
914 | 914 | ||
915 | 915 | ||
diff --git a/arch/m68k/include/asm/natfeat.h b/arch/m68k/include/asm/natfeat.h index a3521b80c3b9..2d2424de1d65 100644 --- a/arch/m68k/include/asm/natfeat.h +++ b/arch/m68k/include/asm/natfeat.h | |||
@@ -6,6 +6,7 @@ | |||
6 | * This software may be used and distributed according to the terms of | 6 | * This software may be used and distributed according to the terms of |
7 | * the GNU General Public License (GPL), incorporated herein by reference. | 7 | * the GNU General Public License (GPL), incorporated herein by reference. |
8 | */ | 8 | */ |
9 | #include <linux/compiler.h> | ||
9 | 10 | ||
10 | #ifndef _NATFEAT_H | 11 | #ifndef _NATFEAT_H |
11 | #define _NATFEAT_H | 12 | #define _NATFEAT_H |
@@ -17,6 +18,6 @@ void nf_init(void); | |||
17 | void nf_shutdown(void); | 18 | void nf_shutdown(void); |
18 | 19 | ||
19 | void nfprint(const char *fmt, ...) | 20 | void nfprint(const char *fmt, ...) |
20 | __attribute__ ((format (printf, 1, 2))); | 21 | __printf(1, 2); |
21 | 22 | ||
22 | # endif /* _NATFEAT_H */ | 23 | # endif /* _NATFEAT_H */ |
diff --git a/arch/m68k/lib/ashldi3.c b/arch/m68k/lib/ashldi3.c index 8dffd36ec4f2..ac08f8141390 100644 --- a/arch/m68k/lib/ashldi3.c +++ b/arch/m68k/lib/ashldi3.c | |||
@@ -18,10 +18,10 @@ GNU General Public License for more details. */ | |||
18 | 18 | ||
19 | #define BITS_PER_UNIT 8 | 19 | #define BITS_PER_UNIT 8 |
20 | 20 | ||
21 | typedef int SItype __attribute__ ((mode (SI))); | 21 | typedef int SItype __mode(SI); |
22 | typedef unsigned int USItype __attribute__ ((mode (SI))); | 22 | typedef unsigned int USItype __mode(SI); |
23 | typedef int DItype __attribute__ ((mode (DI))); | 23 | typedef int DItype __mode(DI); |
24 | typedef int word_type __attribute__ ((mode (__word__))); | 24 | typedef int word_type __mode(__word__); |
25 | 25 | ||
26 | struct DIstruct {SItype high, low;}; | 26 | struct DIstruct {SItype high, low;}; |
27 | 27 | ||
diff --git a/arch/m68k/lib/ashrdi3.c b/arch/m68k/lib/ashrdi3.c index e6565a3ee2c3..5837b1dd3334 100644 --- a/arch/m68k/lib/ashrdi3.c +++ b/arch/m68k/lib/ashrdi3.c | |||
@@ -18,10 +18,10 @@ GNU General Public License for more details. */ | |||
18 | 18 | ||
19 | #define BITS_PER_UNIT 8 | 19 | #define BITS_PER_UNIT 8 |
20 | 20 | ||
21 | typedef int SItype __attribute__ ((mode (SI))); | 21 | typedef int SItype __mode(SI); |
22 | typedef unsigned int USItype __attribute__ ((mode (SI))); | 22 | typedef unsigned int USItype __mode(SI); |
23 | typedef int DItype __attribute__ ((mode (DI))); | 23 | typedef int DItype __mode(DI); |
24 | typedef int word_type __attribute__ ((mode (__word__))); | 24 | typedef int word_type __mode(__word__); |
25 | 25 | ||
26 | struct DIstruct {SItype high, low;}; | 26 | struct DIstruct {SItype high, low;}; |
27 | 27 | ||
diff --git a/arch/m68k/lib/lshrdi3.c b/arch/m68k/lib/lshrdi3.c index 039779737c7d..7f40566be6c8 100644 --- a/arch/m68k/lib/lshrdi3.c +++ b/arch/m68k/lib/lshrdi3.c | |||
@@ -18,10 +18,10 @@ GNU General Public License for more details. */ | |||
18 | 18 | ||
19 | #define BITS_PER_UNIT 8 | 19 | #define BITS_PER_UNIT 8 |
20 | 20 | ||
21 | typedef int SItype __attribute__ ((mode (SI))); | 21 | typedef int SItype __mode(SI); |
22 | typedef unsigned int USItype __attribute__ ((mode (SI))); | 22 | typedef unsigned int USItype __mode(SI); |
23 | typedef int DItype __attribute__ ((mode (DI))); | 23 | typedef int DItype __mode(DI); |
24 | typedef int word_type __attribute__ ((mode (__word__))); | 24 | typedef int word_type __mode(__word__); |
25 | 25 | ||
26 | struct DIstruct {SItype high, low;}; | 26 | struct DIstruct {SItype high, low;}; |
27 | 27 | ||
diff --git a/arch/m68k/lib/muldi3.c b/arch/m68k/lib/muldi3.c index 6459af5b2af0..3fb05c698c41 100644 --- a/arch/m68k/lib/muldi3.c +++ b/arch/m68k/lib/muldi3.c | |||
@@ -65,10 +65,10 @@ GNU General Public License for more details. */ | |||
65 | umul_ppmm (__w.s.high, __w.s.low, u, v); \ | 65 | umul_ppmm (__w.s.high, __w.s.low, u, v); \ |
66 | __w.ll; }) | 66 | __w.ll; }) |
67 | 67 | ||
68 | typedef int SItype __attribute__ ((mode (SI))); | 68 | typedef int SItype __mode(SI); |
69 | typedef unsigned int USItype __attribute__ ((mode (SI))); | 69 | typedef unsigned int USItype __mode(SI); |
70 | typedef int DItype __attribute__ ((mode (DI))); | 70 | typedef int DItype __mode(DI); |
71 | typedef int word_type __attribute__ ((mode (__word__))); | 71 | typedef int word_type __mode(__word__); |
72 | 72 | ||
73 | struct DIstruct {SItype high, low;}; | 73 | struct DIstruct {SItype high, low;}; |
74 | 74 | ||