View difference between Paste ID: 1BrT4X7K and Uahh82sQ
SHOW: | | - or go back to the newest paste.
1
diff --git a/arch/sh/boards/mach-hp6xx/pm.c b/arch/sh/boards/mach-hp6xx/pm.c
2
index 8b50cf763c0..eba497b5f04 100644
3
--- a/arch/sh/boards/mach-hp6xx/pm.c
4
+++ b/arch/sh/boards/mach-hp6xx/pm.c
5
@@ -105,15 +105,15 @@ static int hp6x0_pm_enter(suspend_state_t state)
6
 #endif
7
 
8
 #ifdef CONFIG_HD64461_ENABLER
9
-	outb(0, HD64461_PCC1CSCIER);
10
+	__raw_writeb(0, HD64461_PCC1CSCIER);
11
 
12
-	scr = inb(HD64461_PCC1SCR);
13
+	scr = __raw_readb(HD64461_PCC1SCR);
14
 	scr |= HD64461_PCCSCR_VCC1;
15
-	outb(scr, HD64461_PCC1SCR);
16
+	__raw_writeb(scr, HD64461_PCC1SCR);
17
 
18
-	hd64461_stbcr = inw(HD64461_STBCR);
19
+	hd64461_stbcr = __raw_readw(HD64461_STBCR);
20
 	hd64461_stbcr |= HD64461_STBCR_SPC1ST;
21
-	outw(hd64461_stbcr, HD64461_STBCR);
22
+	__raw_writew(hd64461_stbcr, HD64461_STBCR);
23
 #endif
24
 
25
 	__raw_writeb(0x1f, DACR);
26
@@ -124,21 +124,21 @@ static int hp6x0_pm_enter(suspend_state_t state)
27
 	stbcr2 = __raw_readb(STBCR2);
28
 	__raw_writeb(0x7f , STBCR2);
29
 
30
-	outw(0xf07f, HD64461_SCPUCR);
31
+	__raw_writew(0xf07f, HD64461_SCPUCR);
32
 
33
 	pm_enter();
34
 
35
-	outw(0, HD64461_SCPUCR);
36
+	__raw_writew(0, HD64461_SCPUCR);
37
 	__raw_writeb(stbcr, STBCR);
38
 	__raw_writeb(stbcr2, STBCR2);
39
 
40
 #ifdef CONFIG_HD64461_ENABLER
41
-	hd64461_stbcr = inw(HD64461_STBCR);
42
+	hd64461_stbcr = __raw_readw(HD64461_STBCR);
43
 	hd64461_stbcr &= ~HD64461_STBCR_SPC1ST;
44
-	outw(hd64461_stbcr, HD64461_STBCR);
45
+	__raw_writew(hd64461_stbcr, HD64461_STBCR);
46
 
47
-	outb(0x4c, HD64461_PCC1CSCIER);
48
-	outb(0x00, HD64461_PCC1CSCR);
49
+	__raw_writeb(0x4c, HD64461_PCC1CSCIER);
50
+	__raw_writeb(0x00, HD64461_PCC1CSCR);
51
 #endif
52
 
53
 	return 0;
54
diff --git a/arch/sh/boards/mach-hp6xx/setup.c b/arch/sh/boards/mach-hp6xx/setup.c
55
index 8c9add5f4cf..d480b5d446e 100644
56
--- a/arch/sh/boards/mach-hp6xx/setup.c
57
+++ b/arch/sh/boards/mach-hp6xx/setup.c
58
@@ -58,14 +58,14 @@ static void dac_audio_start(struct dac_audio_pdata *pdata)
59
 	u8 v8;
60
 
61
 	/* HP Jornada 680/690 speaker on */
62
-	v = inw(HD64461_GPADR);
63
+	v = __raw_readw(HD64461_GPADR);
64
 	v &= ~HD64461_GPADR_SPEAKER;
65
-	outw(v, HD64461_GPADR);
66
+	__raw_writew(v, HD64461_GPADR);
67
 
68
 	/* HP Palmtop 620lx/660lx speaker on */
69
-	v8 = inb(PKDR);
70
+	v8 = __raw_readb(PKDR);
71
 	v8 &= ~PKDR_SPEAKER;
72
-	outb(v8, PKDR);
73
+	__raw_writeb(v8, PKDR);
74
 
75
 	sh_dac_enable(pdata->channel);
76
 }
77
@@ -76,14 +76,14 @@ static void dac_audio_stop(struct dac_audio_pdata *pdata)
78
 	u8 v8;
79
 
80
 	/* HP Jornada 680/690 speaker off */
81
-	v = inw(HD64461_GPADR);
82
+	v = __raw_readw(HD64461_GPADR);
83
 	v |= HD64461_GPADR_SPEAKER;
84
-	outw(v, HD64461_GPADR);
85
+	__raw_writew(v, HD64461_GPADR);
86
 
87
 	/* HP Palmtop 620lx/660lx speaker off */
88
-	v8 = inb(PKDR);
89
+	v8 = __raw_readb(PKDR);
90
 	v8 |= PKDR_SPEAKER;
91
-	outb(v8, PKDR);
92
+	__raw_writeb(v8, PKDR);
93
 
94
 	sh_dac_output(0, pdata->channel);
95
 	sh_dac_disable(pdata->channel);
96
@@ -127,7 +127,7 @@ static void __init hp6xx_setup(char **cmdline_p)
97
 	u8 v8;
98
 	u16 v;
99
 
100
-	v = inw(HD64461_STBCR);
101
+	v = __raw_readw(HD64461_STBCR);
102
 	v |=	HD64461_STBCR_SURTST | HD64461_STBCR_SIRST	|
103
 		HD64461_STBCR_STM1ST | HD64461_STBCR_STM0ST	|
104
 		HD64461_STBCR_SAFEST | HD64461_STBCR_SPC0ST	|
105
@@ -136,15 +136,15 @@ static void __init hp6xx_setup(char **cmdline_p)
106
 #ifndef CONFIG_HD64461_ENABLER
107
 	v |= HD64461_STBCR_SPC1ST;
108
 #endif
109
-	outw(v, HD64461_STBCR);
110
-	v = inw(HD64461_GPADR);
111
+	__raw_writew(v, HD64461_STBCR);
112
+	v = __raw_readw(HD64461_GPADR);
113
 	v |= HD64461_GPADR_SPEAKER | HD64461_GPADR_PCMCIA0;
114
-	outw(v, HD64461_GPADR);
115
+	__raw_writew(v, HD64461_GPADR);
116
 
117
-	outw(HD64461_PCCGCR_VCC0 | HD64461_PCCSCR_VCC1, HD64461_PCC0GCR);
118
+	__raw_writew(HD64461_PCCGCR_VCC0 | HD64461_PCCSCR_VCC1, HD64461_PCC0GCR);
119
 
120
 #ifndef CONFIG_HD64461_ENABLER
121
-	outw(HD64461_PCCGCR_VCC0 | HD64461_PCCSCR_VCC1, HD64461_PCC1GCR);
122
+	__raw_writew(HD64461_PCCGCR_VCC0 | HD64461_PCCSCR_VCC1, HD64461_PCC1GCR);
123
 #endif
124
 
125
 	sh_dac_output(0, DAC_SPEAKER_VOLUME);
126
diff --git a/drivers/video/backlight/hp680_bl.c b/drivers/video/backlight/hp680_bl.c
127
index 38aa0027214..bb82384ba66 100644
128
--- a/drivers/video/backlight/hp680_bl.c
129
+++ b/drivers/video/backlight/hp680_bl.c
130
@@ -45,16 +45,16 @@ static void hp680bl_send_intensity(struct backlight_device *bd)
131
 	spin_lock_irqsave(&bl_lock, flags);
132
 	if (intensity && current_intensity == 0) {
133
 		sh_dac_enable(DAC_LCD_BRIGHTNESS);
134
-		v = inw(HD64461_GPBDR);
135
+		v = __raw_readw(HD64461_GPBDR);
136
 		v &= ~HD64461_GPBDR_LCDOFF;
137
-		outw(v, HD64461_GPBDR);
138
+		__raw_writew(v, HD64461_GPBDR);
139
 		sh_dac_output(255-(u8)intensity, DAC_LCD_BRIGHTNESS);
140
 	} else if (intensity == 0 && current_intensity != 0) {
141
 		sh_dac_output(255-(u8)intensity, DAC_LCD_BRIGHTNESS);
142
 		sh_dac_disable(DAC_LCD_BRIGHTNESS);
143
-		v = inw(HD64461_GPBDR);
144
+		v = __raw_readw(HD64461_GPBDR);
145
 		v |= HD64461_GPBDR_LCDOFF;
146
-		outw(v, HD64461_GPBDR);
147
+		__raw_writew(v, HD64461_GPBDR);
148
 	} else if (intensity) {
149
 		sh_dac_output(255-(u8)intensity, DAC_LCD_BRIGHTNESS);
150
 	}
151
diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h
152
index e69de29bb2d..2f4079175af 100644
153
--- a/include/linux/compiler-gcc5.h
154
+++ b/include/linux/compiler-gcc5.h
155
@@ -0,0 +1,58 @@
156
+#ifndef __LINUX_COMPILER_H
157
+#error "Please don't include <linux/compiler-gcc4.h> directly, include <linux/compiler.h> instead."
158
+#endif
159
+
160
+/* GCC 4.1.[01] miscompiles __weak */
161
+#ifdef __KERNEL__
162
+# if __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ <= 1
163
+#  error Your version of gcc miscompiles the __weak directive
164
+# endif
165
+#endif
166
+
167
+#define __used			__attribute__((__used__))
168
+#define __must_check 		__attribute__((warn_unused_result))
169
+#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
170
+
171
+#if __GNUC_MINOR__ >= 3
172
+/* Mark functions as cold. gcc will assume any path leading to a call
173
+   to them will be unlikely.  This means a lot of manual unlikely()s
174
+   are unnecessary now for any paths leading to the usual suspects
175
+   like BUG(), printk(), panic() etc. [but let's keep them for now for
176
+   older compilers]
177
+
178
+   Early snapshots of gcc 4.3 don't support this and we can't detect this
179
+   in the preprocessor, but we can live with this because they're unreleased.
180
+   Maketime probing would be overkill here.
181
+
182
+   gcc also has a __attribute__((__hot__)) to move hot functions into
183
+   a special section, but I don't see any sense in this right now in
184
+   the kernel context */
185
+#define __cold			__attribute__((__cold__))
186
+
187
+#define __linktime_error(message) __attribute__((__error__(message)))
188
+
189
+#if __GNUC_MINOR__ >= 5
190
+/*
191
+ * Mark a position in code as unreachable.  This can be used to
192
+ * suppress control flow warnings after asm blocks that transfer
193
+ * control elsewhere.
194
+ *
195
+ * Early snapshots of gcc 4.5 don't support this and we can't detect
196
+ * this in the preprocessor, but we can live with this because they're
197
+ * unreleased.  Really, we need to have autoconf for the kernel.
198
+ */
199
+#define unreachable() __builtin_unreachable()
200
+
201
+/* Mark a function definition as prohibited from being cloned. */
202
+#define __noclone	__attribute__((__noclone__))
203
+
204
+#endif
205
+#endif
206
+
207
+#if __GNUC_MINOR__ > 0
208
+#define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
209
+#endif
210
+#if __GNUC_MINOR__ >= 4 && !defined(__CHECKER__)
211
+#define __compiletime_warning(message) __attribute__((warning(message)))
212
+#define __compiletime_error(message) __attribute__((error(message)))
213
+#endif
214
diff --git a/kernel/timeconst.pl b/kernel/timeconst.pl
215
index eb51d76e058..04612394c53 100644
216
--- a/kernel/timeconst.pl
217
+++ b/kernel/timeconst.pl
218
@@ -370,7 +370,7 @@ if ($hz eq '--can') {
219
 	}
220
 
221
 	@val = @{$canned_values{$hz}};
222
-	if (!defined(@val)) {
223
+	if (!@val) {
224
 		@val = compute_values($hz);
225
 	}
226
 	output($hz, @val);