Dash:
[t2.git] / package / arm / linux24-psionw / hotfix-gcc4x.patch
blobff64f255182a89d58a4578cc3a50c8f437307855
1 --- linux24-psionw/fs/proc/proc_misc.c.vanilla 2006-04-11 19:56:36.000000000 +0200
2 +++ linux24-psionw/fs/proc/proc_misc.c 2006-04-11 19:56:43.000000000 +0200
3 @@ -562,7 +562,7 @@
4 /*
5 * writing 'C' to /proc/sysrq-trigger is like sysrq-C
6 */
7 -static ssize_t write_sysrq_trigger(struct file *file, const char *buf,
8 +static ssize_t write_sysrq_trigger(struct file *file, char *buf,
9 size_t count, loff_t *ppos)
11 if (count) {
12 --- linux24-psionw/fs/readdir.c.vanilla 2006-04-11 20:06:42.000000000 +0200
13 +++ linux24-psionw/fs/readdir.c 2006-04-11 20:13:32.000000000 +0200
14 @@ -264,7 +264,7 @@
15 put_user(reclen, &dirent->d_reclen);
16 copy_to_user(dirent->d_name, name, namlen);
17 put_user(0, dirent->d_name + namlen);
18 - ((char *) dirent) += reclen;
19 + dirent = (char*) dirent + reclen;
20 buf->current_dir = dirent;
21 buf->count -= reclen;
22 return 0;
23 @@ -347,7 +347,7 @@
24 copy_to_user(dirent, &d, NAME_OFFSET(&d));
25 copy_to_user(dirent->d_name, name, namlen);
26 put_user(0, dirent->d_name + namlen);
27 - ((char *) dirent) += reclen;
28 + dirent = (char*) dirent + reclen;
29 buf->current_dir = dirent;
30 buf->count -= reclen;
31 return 0;
32 --- linux24-psionw/net/irda/irlan/irlan_event.c.vanilla 2006-04-11 20:20:28.000000000 +0200
33 +++ linux24-psionw/net/irda/irlan/irlan_event.c 2006-04-11 20:20:35.000000000 +0200
34 @@ -24,7 +24,7 @@
36 #include <net/irda/irlan_event.h>
38 -char *irlan_state[] = {
39 +static char *irlan_state[] = {
40 "IRLAN_IDLE",
41 "IRLAN_QUERY",
42 "IRLAN_CONN",
43 --- linux24-psionw/arch/arm/lib/longlong.h.vanilla 2006-04-11 21:01:31.000000000 +0200
44 +++ linux24-psionw/arch/arm/lib/longlong.h 2006-04-11 21:01:38.000000000 +0200
45 @@ -161,7 +161,7 @@
46 #define UDIV_NEEDS_NORMALIZATION 1
47 #define udiv_qrnnd __udiv_qrnnd_c
49 -extern const UQItype __clz_tab[];
50 +static const UQItype __clz_tab[];
51 #define count_leading_zeros(count, x) \
52 do { \
53 USItype __xr = (x); \
54 --- linux24-psionw/arch/arm/nwfpe/fpa11_cpdt.c.vanilla 2006-04-11 21:02:16.000000000 +0200
55 +++ linux24-psionw/arch/arm/nwfpe/fpa11_cpdt.c 2006-04-11 21:03:33.000000000 +0200
56 @@ -28,14 +28,14 @@
58 #include <asm/uaccess.h>
60 -static inline void loadSingle(const unsigned int Fn, const unsigned int *pMem)
61 +static inline void loadSingle(unsigned int Fn, unsigned int *pMem)
63 FPA11 *fpa11 = GET_FPA11();
64 fpa11->fType[Fn] = typeSingle;
65 get_user(fpa11->fpreg[Fn].fSingle, pMem);
68 -static inline void loadDouble(const unsigned int Fn, const unsigned int *pMem)
69 +static inline void loadDouble(const unsigned int Fn, unsigned int *pMem)
71 FPA11 *fpa11 = GET_FPA11();
72 unsigned int *p;
73 @@ -46,7 +46,7 @@
76 #ifdef CONFIG_FPE_NWFPE_XP
77 -static inline void loadExtended(const unsigned int Fn, const unsigned int *pMem)
78 +static inline void loadExtended(const unsigned int Fn, unsigned int *pMem)
80 FPA11 *fpa11 = GET_FPA11();
81 unsigned int *p;
82 @@ -58,7 +58,7 @@
84 #endif
86 -static inline void loadMultiple(const unsigned int Fn, const unsigned int *pMem)
87 +static inline void loadMultiple(unsigned int Fn, unsigned int *pMem)
89 FPA11 *fpa11 = GET_FPA11();
90 register unsigned int *p;
91 --- linux24-psionw/arch/arm/kernel/io.c.vanilla 2006-04-11 20:58:56.000000000 +0200
92 +++ linux24-psionw/arch/arm/kernel/io.c 2006-04-11 21:00:10.000000000 +0200
93 @@ -12,7 +12,7 @@
94 while (count) {
95 count--;
96 *(char *) to = readb(from);
97 - ((char *) to)++;
98 + to = (char *) to + 1;
99 from++;
102 @@ -26,7 +26,7 @@
103 while (count) {
104 count--;
105 writeb(*(char *) from, to);
106 - ((char *) from)++;
107 + from = (char *) from + 1;
108 to++;
111 --- linux24-psionw/init/do_mounts.c.vanilla 2006-04-11 18:05:05.000000000 +0200
112 +++ linux24-psionw/init/do_mounts.c 2006-04-11 18:05:30.000000000 +0200
113 @@ -52,7 +52,7 @@
114 int __initdata rd_doload; /* 1 = load RAM disk, 0 = don't load */
116 int root_mountflags = MS_RDONLY | MS_VERBOSE;
117 -static char root_device_name[64];
118 +char root_device_name[64];
120 /* this is initialized in init/main.c */
121 kdev_t ROOT_DEV;
122 --- linux24-psionw/drivers/char/vc_screen.c.vanilla 2006-04-11 19:51:32.000000000 +0200
123 +++ linux24-psionw/drivers/char/vc_screen.c 2006-04-11 19:51:54.000000000 +0200
124 @@ -421,7 +421,7 @@
125 while (this_round > 1) {
126 unsigned short w;
128 - w = get_unaligned(((const unsigned short *)con_buf0));
129 + w = get_unaligned(((unsigned short *)con_buf0));
130 vcs_scr_writew(currcons, w, org++);
131 con_buf0 += 2;
132 this_round -= 2;
133 --- linux24-psionw/drivers/char/n_tty.c.vanilla 2006-04-11 19:50:37.000000000 +0200
134 +++ linux24-psionw/drivers/char/n_tty.c 2006-04-11 19:51:07.000000000 +0200
135 @@ -1147,9 +1147,9 @@
138 static ssize_t write_chan(struct tty_struct * tty, struct file * file,
139 - const unsigned char * buf, size_t nr)
140 + unsigned char * buf, size_t nr)
142 - const unsigned char *b = buf;
143 + unsigned char *b = buf;
144 DECLARE_WAITQUEUE(wait, current);
145 int c;
146 ssize_t retval = 0;
147 --- linux24-psionw/drivers/sound/sound_firmware.c.vanilla 2006-04-11 19:52:28.000000000 +0200
148 +++ linux24-psionw/drivers/sound/sound_firmware.c 2006-04-11 19:52:56.000000000 +0200
149 @@ -7,7 +7,7 @@
150 #include <linux/unistd.h>
151 #include <asm/uaccess.h>
153 -static int errno;
154 +//int errno;
155 static int do_mod_firmware_load(const char *fn, char **fp)
157 int fd;
158 --- linux24-psionw/drivers/video/fbcon.c.vanilla 2006-04-11 19:53:32.000000000 +0200
159 +++ linux24-psionw/drivers/video/fbcon.c 2006-04-11 19:55:44.000000000 +0200
160 @@ -1877,7 +1877,7 @@
161 font length must be multiple of 256, at least. And 256 is multiple
162 of 4 */
163 k = 0;
164 - while (p > new_data) k += *--(u32 *)p;
165 + for (; p > new_data; p-=4) k += *p;
166 FNTSUM(new_data) = k;
167 /* Check if the same font is on some other console already */
168 for (i = 0; i < MAX_NR_CONSOLES; i++) {
169 --- linux24-psionw/kernel/sysctl.c.vanilla 2006-04-11 19:38:32.000000000 +0200
170 +++ linux24-psionw/kernel/sysctl.c 2006-04-11 19:50:06.000000000 +0200
171 @@ -879,7 +879,7 @@
172 if (!isspace(c))
173 break;
174 left--;
175 - ((char *) buffer)++;
176 + buffer++;
178 if (!left)
179 break;
180 @@ -1032,7 +1032,7 @@
181 if (!isspace(c))
182 break;
183 left--;
184 - ((char *) buffer)++;
185 + buffer++;
187 if (!left)
188 break;
189 @@ -1133,7 +1133,7 @@
190 if (!isspace(c))
191 break;
192 left--;
193 - ((char *) buffer)++;
194 + buffer++;
196 if (!left)
197 break;
198 --- linux24-psionw/include/net/irda/irttp.h.vanilla 2006-04-11 20:56:55.000000000 +0200
199 +++ linux24-psionw/include/net/irda/irttp.h 2006-04-11 20:57:05.000000000 +0200
200 @@ -209,6 +209,6 @@
201 return(irlap_is_primary(self->lsap->lap->irlap));
204 -extern struct irttp_cb *irttp;
205 +static struct irttp_cb *irttp;
207 #endif /* IRTTP_H */
208 --- linux24-psionw/include/net/irda/irlan_event.h.vanilla 2006-04-11 20:19:39.000000000 +0200
209 +++ linux24-psionw/include/net/irda/irlan_event.h 2006-04-11 20:57:23.000000000 +0200
210 @@ -67,7 +67,7 @@
211 IRLAN_WATCHDOG_TIMEOUT,
212 } IRLAN_EVENT;
214 -extern char *irlan_state[];
215 +static char *irlan_state[];
217 void irlan_do_client_event(struct irlan_cb *self, IRLAN_EVENT event,
218 struct sk_buff *skb);
219 --- linux24-psionw/include/net/ipv6.h.vanilla 2006-04-11 20:15:01.000000000 +0200
220 +++ linux24-psionw/include/net/ipv6.h 2006-04-11 20:15:34.000000000 +0200
221 @@ -20,6 +20,8 @@
222 #include <net/ndisc.h>
223 #include <net/flow.h>
225 +#include <net/snmp.h>
227 #define SIN6_LEN_RFC2133 24
230 --- linux24-psionw/include/net/icmp.h.vanilla 2006-04-11 20:16:38.000000000 +0200
231 +++ linux24-psionw/include/net/icmp.h 2006-04-11 20:17:49.000000000 +0200
232 @@ -24,6 +24,8 @@
233 #include <net/sock.h>
234 #include <net/protocol.h>
236 +#include <net/snmp.h>
238 struct icmp_err {
239 int errno;
240 unsigned fatal:1;
241 --- linux24-psionw/include/linux/irq_cpustat.h.vanilla 2006-04-11 19:37:23.000000000 +0200
242 +++ linux24-psionw/include/linux/irq_cpustat.h 2006-04-11 19:37:27.000000000 +0200
243 @@ -22,7 +22,7 @@
244 #ifdef CONFIG_SMP
245 #define __IRQ_STAT(cpu, member) (irq_stat[cpu].member)
246 #else
247 -#define __IRQ_STAT(cpu, member) ((void)(cpu), irq_stat[0].member)
248 +#define __IRQ_STAT(cpu, member) (irq_stat[((void)(cpu), 0)].member)
249 #endif
251 /* arch independent irq_stat fields */
252 --- linux24-psionw/include/asm-arm/setup.h.vanilla 2006-04-11 21:06:30.000000000 +0200
253 +++ linux24-psionw/include/asm-arm/setup.h 2006-04-11 21:07:16.000000000 +0200
254 @@ -265,6 +265,6 @@
255 } bank[NR_BANKS];
258 -extern struct meminfo meminfo;
259 +// extern struct meminfo meminfo;
261 #endif
262 --- linux24-psionw/arch/arm/Makefile.vanilla 2006-04-11 23:07:45.000000000 +0200
263 +++ linux24-psionw/arch/arm/Makefile 2006-04-11 23:07:50.000000000 +0200
264 @@ -27,7 +27,7 @@
266 # Note! For APCS-26 YOU MUST HAVE AN APCS-26 LIBGCC.A
268 -apcs-y :=-mapcs-32
269 +apcs-y :=
270 apcs-$(CONFIG_CPU_26) :=-mapcs-26 -mcpu=arm3 -Os
272 # This selects which instruction set is used.
273 --- linux24-psionw/lib/crc32.c.vanilla 2006-07-29 20:12:35.000000000 +0200
274 +++ linux24-psionw/lib/crc32.c 2006-07-29 20:13:40.000000000 +0200
275 @@ -99,7 +99,7 @@
276 /* Align it */
277 if(unlikely(((long)b)&3 && len)){
278 do {
279 - DO_CRC(*((u8 *)b)++);
280 + DO_CRC(*(b)++);
281 } while ((--len) && ((long)b)&3 );
283 if(likely(len >= 4)){
284 @@ -120,7 +120,7 @@
285 /* And the last few bytes */
286 if(len){
287 do {
288 - DO_CRC(*((u8 *)b)++);
289 + DO_CRC(*(b)++);
290 } while (--len);
293 @@ -200,7 +200,7 @@
294 /* Align it */
295 if(unlikely(((long)b)&3 && len)){
296 do {
297 - DO_CRC(*((u8 *)b)++);
298 + DO_CRC(*(b)++);
299 } while ((--len) && ((long)b)&3 );
301 if(likely(len >= 4)){
302 @@ -221,7 +221,7 @@
303 /* And the last few bytes */
304 if(len){
305 do {
306 - DO_CRC(*((u8 *)b)++);
307 + DO_CRC(*(b)++);
308 } while (--len);
310 return __be32_to_cpu(crc);
311 --- linux24-psionw/drivers/pcmcia/bulkmem.c.vanilla 2006-07-29 20:09:16.000000000 +0200
312 +++ linux24-psionw/drivers/pcmcia/bulkmem.c 2006-07-29 20:10:40.000000000 +0200
313 @@ -301,7 +301,7 @@
315 window_handle_t w;
316 int ret = pcmcia_request_window(a1, a2, &w);
317 - (window_handle_t *)a1 = w;
318 + a1 = w;
319 return ret;
321 break;