Tue Jan 31 04:28:50 2012 UTC ()
Convert stragglers to use real C89 prototypes.


(matt)
diff -r1.11 -r1.12 src/sys/arch/shark/isa/isa_io.c
diff -r1.15 -r1.16 src/sys/arch/shark/isa/isadma_machdep.c
diff -r1.26 -r1.27 src/sys/arch/shark/shark/scr.c

cvs diff -r1.11 -r1.12 src/sys/arch/shark/isa/isa_io.c (expand / switch to unified diff)

--- src/sys/arch/shark/isa/isa_io.c 2011/07/19 15:07:43 1.11
+++ src/sys/arch/shark/isa/isa_io.c 2012/01/31 04:28:50 1.12
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: isa_io.c,v 1.11 2011/07/19 15:07:43 dyoung Exp $ */ 1/* $NetBSD: isa_io.c,v 1.12 2012/01/31 04:28:50 matt Exp $ */
2 2
3/* 3/*
4 * Copyright 1997 4 * Copyright 1997
5 * Digital Equipment Corporation. All rights reserved. 5 * Digital Equipment Corporation. All rights reserved.
6 * 6 *
7 * This software is furnished under license and may be used and 7 * This software is furnished under license and may be used and
8 * copied only in accordance with the following terms and conditions. 8 * copied only in accordance with the following terms and conditions.
9 * Subject to these conditions, you may download, copy, install, 9 * Subject to these conditions, you may download, copy, install,
10 * use, modify and distribute this software in source and/or binary 10 * use, modify and distribute this software in source and/or binary
11 * form. No title or ownership is transferred hereby. 11 * form. No title or ownership is transferred hereby.
12 * 12 *
13 * 1) Any source code used, modified or distributed must reproduce 13 * 1) Any source code used, modified or distributed must reproduce
14 * and retain this copyright notice and list of conditions as 14 * and retain this copyright notice and list of conditions as
@@ -28,27 +28,27 @@ @@ -28,27 +28,27 @@
28 * liable for any damages whatsoever, and in particular, DIGITAL 28 * liable for any damages whatsoever, and in particular, DIGITAL
29 * shall not be liable for special, indirect, consequential, or 29 * shall not be liable for special, indirect, consequential, or
30 * incidental damages or damages for lost profits, loss of 30 * incidental damages or damages for lost profits, loss of
31 * revenue or loss of use, whether such damages arise in contract, 31 * revenue or loss of use, whether such damages arise in contract,
32 * negligence, tort, under statute, in equity, at law or otherwise, 32 * negligence, tort, under statute, in equity, at law or otherwise,
33 * even if advised of the possibility of such damage. 33 * even if advised of the possibility of such damage.
34 */ 34 */
35 35
36/* 36/*
37 * bus_space I/O functions for isa 37 * bus_space I/O functions for isa
38 */ 38 */
39 39
40#include <sys/cdefs.h> 40#include <sys/cdefs.h>
41__KERNEL_RCSID(0, "$NetBSD: isa_io.c,v 1.11 2011/07/19 15:07:43 dyoung Exp $"); 41__KERNEL_RCSID(0, "$NetBSD: isa_io.c,v 1.12 2012/01/31 04:28:50 matt Exp $");
42 42
43#include <sys/param.h> 43#include <sys/param.h>
44#include <sys/systm.h> 44#include <sys/systm.h>
45#include <sys/bus.h> 45#include <sys/bus.h>
46#include <machine/pio.h> 46#include <machine/pio.h>
47#include <machine/isa_machdep.h> 47#include <machine/isa_machdep.h>
48#include <machine/ofw.h> 48#include <machine/ofw.h>
49#include "igsfb_ofbus.h" 49#include "igsfb_ofbus.h"
50 50
51#if NIGSFB_OFBUS > 0 51#if NIGSFB_OFBUS > 0
52extern vaddr_t igsfb_mem_vaddr, igsfb_mmio_vaddr; 52extern vaddr_t igsfb_mem_vaddr, igsfb_mmio_vaddr;
53extern paddr_t igsfb_mem_paddr; 53extern paddr_t igsfb_mem_paddr;
54#endif 54#endif
@@ -369,34 +369,29 @@ isa_bs_mmap(void *cookie, bus_addr_t add @@ -369,34 +369,29 @@ isa_bs_mmap(void *cookie, bus_addr_t add
369 return arm_btop(ret); 369 return arm_btop(ret);
370} 370}
371 371
372int 372int
373isa_bs_subregion(void *t, bus_space_handle_t bsh, bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp) 373isa_bs_subregion(void *t, bus_space_handle_t bsh, bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp)
374{ 374{
375/* printf("isa_subregion(tag=%p, bsh=%lx, off=%lx, sz=%lx)\n", 375/* printf("isa_subregion(tag=%p, bsh=%lx, off=%lx, sz=%lx)\n",
376 t, bsh, offset, size);*/ 376 t, bsh, offset, size);*/
377 *nbshp = bsh + offset; 377 *nbshp = bsh + offset;
378 return(0); 378 return(0);
379} 379}
380 380
381int 381int
382isa_bs_alloc(t, rstart, rend, size, alignment, boundary, cacheable, 382isa_bs_alloc(void *t, bus_addr_t rstart, bus_addr_t rend, bus_size_t size,
383 bpap, bshp) 383 bus_size_t alignment, bus_size_t boundary, int cacheable,
384 void *t; 384 bus_addr_t *bpap, bus_space_handle_t *bshp)
385 bus_addr_t rstart, rend; 
386 bus_size_t size, alignment, boundary; 
387 int cacheable; 
388 bus_addr_t *bpap; 
389 bus_space_handle_t *bshp; 
390{ 385{
391 panic("isa_alloc(): Help!"); 386 panic("isa_alloc(): Help!");
392} 387}
393 388
394void  389void
395isa_bs_free(void *t, bus_space_handle_t bsh, bus_size_t size) 390isa_bs_free(void *t, bus_space_handle_t bsh, bus_size_t size)
396{ 391{
397 panic("isa_free(): Help!"); 392 panic("isa_free(): Help!");
398} 393}
399 394
400void * 395void *
401isa_bs_vaddr(void *t, bus_space_handle_t bsh) 396isa_bs_vaddr(void *t, bus_space_handle_t bsh)
402{ 397{

cvs diff -r1.15 -r1.16 src/sys/arch/shark/isa/isadma_machdep.c (expand / switch to unified diff)

--- src/sys/arch/shark/isa/isadma_machdep.c 2011/07/19 15:07:43 1.15
+++ src/sys/arch/shark/isa/isadma_machdep.c 2012/01/31 04:28:50 1.16
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: isadma_machdep.c,v 1.15 2011/07/19 15:07:43 dyoung Exp $ */ 1/* $NetBSD: isadma_machdep.c,v 1.16 2012/01/31 04:28:50 matt Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. 4 * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, 8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
9 * NASA Ames Research Center. 9 * NASA Ames Research Center.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -21,27 +21,27 @@ @@ -21,27 +21,27 @@
21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE. 30 * POSSIBILITY OF SUCH DAMAGE.
31 */ 31 */
32 32
33#include <sys/cdefs.h> 33#include <sys/cdefs.h>
34__KERNEL_RCSID(0, "$NetBSD: isadma_machdep.c,v 1.15 2011/07/19 15:07:43 dyoung Exp $"); 34__KERNEL_RCSID(0, "$NetBSD: isadma_machdep.c,v 1.16 2012/01/31 04:28:50 matt Exp $");
35 35
36#define ISA_DMA_STATS 36#define ISA_DMA_STATS
37 37
38#include <sys/param.h> 38#include <sys/param.h>
39#include <sys/systm.h> 39#include <sys/systm.h>
40#include <sys/syslog.h> 40#include <sys/syslog.h>
41#include <sys/device.h> 41#include <sys/device.h>
42#include <sys/malloc.h> 42#include <sys/malloc.h>
43#include <sys/proc.h> 43#include <sys/proc.h>
44#include <sys/mbuf.h> 44#include <sys/mbuf.h>
45 45
46#define _ARM32_BUS_DMA_PRIVATE 46#define _ARM32_BUS_DMA_PRIVATE
47#include <sys/bus.h> 47#include <sys/bus.h>
@@ -238,33 +238,28 @@ _isa_bus_dmamap_destroy(bus_dma_tag_t t, @@ -238,33 +238,28 @@ _isa_bus_dmamap_destroy(bus_dma_tag_t t,
238 * Free any bounce pages this map might hold. 238 * Free any bounce pages this map might hold.
239 */ 239 */
240 if (cookie->id_flags & ID_HAS_BOUNCE) 240 if (cookie->id_flags & ID_HAS_BOUNCE)
241 _isa_dma_free_bouncebuf(t, map); 241 _isa_dma_free_bouncebuf(t, map);
242 242
243 free(cookie, M_DMAMAP); 243 free(cookie, M_DMAMAP);
244 _bus_dmamap_destroy(t, map); 244 _bus_dmamap_destroy(t, map);
245} 245}
246 246
247/* 247/*
248 * Load an ISA DMA map with a linear buffer. 248 * Load an ISA DMA map with a linear buffer.
249 */ 249 */
250int 250int
251_isa_bus_dmamap_load(t, map, buf, buflen, p, flags) 251_isa_bus_dmamap_load(bus_dma_tag_t t, bus_dmamap_t map, void *buf,
252 bus_dma_tag_t t; 252 bus_size_t buflen, struct proc *p, int flags)
253 bus_dmamap_t map;  
254 void *buf; 
255 bus_size_t buflen; 
256 struct proc *p; 
257 int flags; 
258{ 253{
259 struct arm32_isa_dma_cookie *cookie = map->_dm_cookie; 254 struct arm32_isa_dma_cookie *cookie = map->_dm_cookie;
260 int error; 255 int error;
261 256
262 STAT_INCR(isa_dma_stats_loads); 257 STAT_INCR(isa_dma_stats_loads);
263 258
264 /* 259 /*
265 * Make sure that on error condition we return "no valid mappings." 260 * Make sure that on error condition we return "no valid mappings."
266 */ 261 */
267 map->dm_mapsize = 0; 262 map->dm_mapsize = 0;
268 map->dm_nsegs = 0; 263 map->dm_nsegs = 0;
269 264
270 /* 265 /*
@@ -309,31 +304,28 @@ _isa_bus_dmamap_load(t, map, buf, buflen @@ -309,31 +304,28 @@ _isa_bus_dmamap_load(t, map, buf, buflen
309 _isa_dma_free_bouncebuf(t, map); 304 _isa_dma_free_bouncebuf(t, map);
310 return (error); 305 return (error);
311 } 306 }
312 307
313 /* ...so _isa_bus_dmamap_sync() knows we're bouncing */ 308 /* ...so _isa_bus_dmamap_sync() knows we're bouncing */
314 cookie->id_flags |= ID_IS_BOUNCING; 309 cookie->id_flags |= ID_IS_BOUNCING;
315 return (0); 310 return (0);
316} 311}
317 312
318/* 313/*
319 * Like _isa_bus_dmamap_load(), but for mbufs. 314 * Like _isa_bus_dmamap_load(), but for mbufs.
320 */ 315 */
321int 316int
322_isa_bus_dmamap_load_mbuf(t, map, m0, flags)  317_isa_bus_dmamap_load_mbuf( bus_dma_tag_t t, bus_dmamap_t map, struct mbuf *m0,
323 bus_dma_tag_t t; 318 int flags)
324 bus_dmamap_t map; 
325 struct mbuf *m0; 
326 int flags; 
327{ 319{
328 struct arm32_isa_dma_cookie *cookie = map->_dm_cookie; 320 struct arm32_isa_dma_cookie *cookie = map->_dm_cookie;
329 int error; 321 int error;
330 322
331 /* 323 /*
332 * Make sure that on error condition we return "no valid mappings." 324 * Make sure that on error condition we return "no valid mappings."
333 */ 325 */
334 map->dm_mapsize = 0; 326 map->dm_mapsize = 0;
335 map->dm_nsegs = 0; 327 map->dm_nsegs = 0;
336 328
337#ifdef DIAGNOSTIC 329#ifdef DIAGNOSTIC
338 if ((m0->m_flags & M_PKTHDR) == 0) 330 if ((m0->m_flags & M_PKTHDR) == 0)
339 panic("_isa_bus_dmamap_load_mbuf: no packet header"); 331 panic("_isa_bus_dmamap_load_mbuf: no packet header");

cvs diff -r1.26 -r1.27 src/sys/arch/shark/shark/scr.c (expand / switch to unified diff)

--- src/sys/arch/shark/shark/scr.c 2011/07/26 08:56:26 1.26
+++ src/sys/arch/shark/shark/scr.c 2012/01/31 04:28:50 1.27
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: scr.c,v 1.26 2011/07/26 08:56:26 mrg Exp $ */ 1/* $NetBSD: scr.c,v 1.27 2012/01/31 04:28:50 matt Exp $ */
2 2
3/* 3/*
4 * Copyright 1997 4 * Copyright 1997
5 * Digital Equipment Corporation. All rights reserved. 5 * Digital Equipment Corporation. All rights reserved.
6 * 6 *
7 * This software is furnished under license and may be used and 7 * This software is furnished under license and may be used and
8 * copied only in accordance with the following terms and conditions. 8 * copied only in accordance with the following terms and conditions.
9 * Subject to these conditions, you may download, copy, install, 9 * Subject to these conditions, you may download, copy, install,
10 * use, modify and distribute this software in source and/or binary 10 * use, modify and distribute this software in source and/or binary
11 * form. No title or ownership is transferred hereby. 11 * form. No title or ownership is transferred hereby.
12 * 12 *
13 * 1) Any source code used, modified or distributed must reproduce 13 * 1) Any source code used, modified or distributed must reproduce
14 * and retain this copyright notice and list of conditions as 14 * and retain this copyright notice and list of conditions as
@@ -92,27 +92,27 @@ @@ -92,27 +92,27 @@
92** 92**
93** 27-July-97 93** 27-July-97
94** 94**
95**-- 95**--
96*/ 96*/
97 97
98/* 98/*
99** 99**
100** INCLUDE FILES 100** INCLUDE FILES
101** 101**
102*/ 102*/
103 103
104#include <sys/cdefs.h> 104#include <sys/cdefs.h>
105__KERNEL_RCSID(0, "$NetBSD: scr.c,v 1.26 2011/07/26 08:56:26 mrg Exp $"); 105__KERNEL_RCSID(0, "$NetBSD: scr.c,v 1.27 2012/01/31 04:28:50 matt Exp $");
106 106
107#include "opt_ddb.h" 107#include "opt_ddb.h"
108 108
109#include <sys/param.h> 109#include <sys/param.h>
110#include <sys/systm.h> 110#include <sys/systm.h>
111#include <sys/ioctl.h> 111#include <sys/ioctl.h>
112/* #include <sys/select.h> */ 112/* #include <sys/select.h> */
113/* #include <sys/tty.h> */ 113/* #include <sys/tty.h> */
114#include <sys/proc.h> 114#include <sys/proc.h>
115#include <sys/conf.h> 115#include <sys/conf.h>
116/* #include <sys/file.h> */ 116/* #include <sys/file.h> */
117/* #include <sys/uio.h> */ 117/* #include <sys/uio.h> */
118#include <sys/kernel.h> 118#include <sys/kernel.h>
@@ -3680,31 +3680,32 @@ static void myHatWedge(int nFIQs) @@ -3680,31 +3680,32 @@ static void myHatWedge(int nFIQs)
3680** 3680**
3681** nill 3681** nill
3682** 3682**
3683** FUNCTION VALUE: 3683** FUNCTION VALUE:
3684** 3684**
3685** nill 3685** nill
3686** 3686**
3687** SIDE EFFECTS: 3687** SIDE EFFECTS:
3688** 3688**
3689** nill 3689** nill
3690**-- 3690**--
3691*/ 3691*/
3692 3692
3693static void scrTimeout(ftn, sc, arg, count) 3693static void
3694 void (*ftn)(struct scr_softc*,int); 3694scrTimeout(
3695 struct scr_softc* sc; 3695 void (*ftn)(struct scr_softc*,int),
3696 int arg; 3696 struct scr_softc* sc,
3697 register int count; 3697 int arg,
 3698 int count)
3698{ 3699{
3699 3700
3700 register Callout *new, *p, *t; 3701 register Callout *new, *p, *t;
3701 ASSERT(scrClkEnable); 3702 ASSERT(scrClkEnable);
3702 3703
3703 3704
3704 if (count <= 0) 3705 if (count <= 0)
3705 { 3706 {
3706 count = 1; 3707 count = 1;
3707 } 3708 }
3708 3709
3709 3710
3710 /* Fill in the next free fcallout structure. */ 3711 /* Fill in the next free fcallout structure. */
@@ -3768,30 +3769,31 @@ static void scrTimeout(ftn, sc, arg, cou @@ -3768,30 +3769,31 @@ static void scrTimeout(ftn, sc, arg, cou
3768** IMPLICIT OUTPUTS: 3769** IMPLICIT OUTPUTS:
3769** 3770**
3770** nill 3771** nill
3771** 3772**
3772** FUNCTION VALUE: 3773** FUNCTION VALUE:
3773** 3774**
3774** nill 3775** nill
3775** 3776**
3776** SIDE EFFECTS: 3777** SIDE EFFECTS:
3777** 3778**
3778** nill 3779** nill
3779**-- 3780**--
3780*/ 3781*/
3781static void scrUntimeout(ftn, sc, arg) 3782static void
3782void (*ftn)(struct scr_softc*,int); 3783scrUntimeout(
3783struct scr_softc* sc; 3784 void (*ftn)(struct scr_softc*, int),
3784int arg; 3785 struct scr_softc* sc,
 3786 int arg)
3785{ 3787{
3786 register Callout *p, *t; 3788 register Callout *p, *t;
3787 ASSERT(scrClkEnable); 3789 ASSERT(scrClkEnable);
3788 3790
3789 for (p = &scrClkCallTodo; (t = p->c_next) != NULL; p = t) 3791 for (p = &scrClkCallTodo; (t = p->c_next) != NULL; p = t)
3790 { 3792 {
3791 if (t->c_func == ftn && t->c_sc == sc && t->c_arg == arg) 3793 if (t->c_func == ftn && t->c_sc == sc && t->c_arg == arg)
3792 { 3794 {
3793 /* Increment next entry's count. */ 3795 /* Increment next entry's count. */
3794 if (t->c_next && t->c_time > 0) 3796 if (t->c_next && t->c_time > 0)
3795 { 3797 {
3796 t->c_next->c_time += t->c_time; 3798 t->c_next->c_time += t->c_time;
3797 } 3799 }