ANSIfication to subr_prof.c, vfs_bio.c, vfs_cluster.c

Tim Wickberg me at k9mach3.org
Tue Jun 1 13:46:16 PDT 2004


ANSIfication of sys/kern/ subr_prof.c vfs_bio.c vfs_cluster.c

--
Tim Wickberg
me at xxxxxxxxxxx
--- kern/vfs_bio.c	2004-05-20 18:42:24.000000000 -0400
+++ /home/tim/vfs_bio.c	2004-06-01 16:36:15.000000000 -0400
@@ -757,8 +757,7 @@
  * Complete a background write started from bwrite.
  */
 static void
-vfs_backgroundwritedone(bp)
-	struct buf *bp;
+vfs_backgroundwritedone(struct buf *bp)
 {
 	struct buf *origbp;
 
@@ -816,7 +815,7 @@
  * out synchronously.
  */
 void
-bdwrite(struct buf * bp)
+bdwrite(struct buf *bp)
 {
 	if (BUF_REFCNT(bp) == 0)
 		panic("bdwrite: buffer is not busy");
@@ -894,8 +893,7 @@
  *	The buffer must be on QUEUE_NONE.
  */
 void
-bdirty(bp)
-	struct buf *bp;
+bdirty(struct buf *bp)
 {
 	KASSERT(bp->b_qindex == QUEUE_NONE, ("bdirty: buffer %p still on queue %d", bp, bp->b_qindex));
 	bp->b_flags &= ~(B_READ|B_RELBUF);
@@ -921,8 +919,7 @@
  */
 
 void
-bundirty(bp)
-	struct buf *bp;
+bundirty(struct buf *bp)
 {
 	KASSERT(bp->b_qindex == QUEUE_NONE, ("bundirty: buffer %p still on queue %d", bp, bp->b_qindex));
 
@@ -1372,8 +1369,7 @@
 }
 
 static void
-vfs_vmio_release(bp)
-	struct buf *bp;
+vfs_vmio_release(struct buf *bp)
 {
 	int i, s;
 	vm_page_t m;
@@ -2759,7 +2755,7 @@
  *	b_dev to NODEV.
  */
 void
-biodone(struct buf * bp)
+biodone(struct buf *bp)
 {
 	int s, error;
 
@@ -2937,7 +2933,7 @@
  * consistant.
  */
 void
-vfs_unbusy_pages(struct buf * bp)
+vfs_unbusy_pages(struct buf *bp)
 {
 	int i;
 
@@ -3023,7 +3019,7 @@
  * and should be ignored.
  */
 void
-vfs_busy_pages(struct buf * bp, int clear_modify)
+vfs_busy_pages(struct buf *bp, int clear_modify)
 {
 	int i, bogus;
 
@@ -3110,7 +3106,7 @@
  * just go ahead and clean through to b_bufsize.
  */
 static void
-vfs_clean_pages(struct buf * bp)
+vfs_clean_pages(struct buf *bp)
 {
 	int i;
 
@@ -3240,7 +3236,7 @@
  * not associated with a file object.
  */
 void
-vm_hold_load_pages(struct buf * bp, vm_offset_t from, vm_offset_t to)
+vm_hold_load_pages(struct buf *bp, vm_offset_t from, vm_offset_t to)
 {
 	vm_offset_t pg;
 	vm_page_t p;
@@ -3278,7 +3274,7 @@
 }
 
 void
-vm_hold_free_pages(struct buf * bp, vm_offset_t from, vm_offset_t to)
+vm_hold_free_pages(struct buf *bp, vm_offset_t from, vm_offset_t to)
 {
 	vm_offset_t pg;
 	vm_page_t p;
@@ -3378,8 +3374,7 @@
  * We also invalidate the TLB entries and restore the original b_addr.
  */
 void
-vunmapbuf(bp)
-	struct buf *bp;
+vunmapbuf(struct buf *bp)
 {
 	int pidx;
 	int npages;
--- kern/vfs_cluster.c	2004-05-10 06:51:32.000000000 -0400
+++ /home/tim/vfs_cluster.c	2004-06-01 16:30:42.000000000 -0400
@@ -86,14 +86,8 @@
  * This replaces bread.
  */
 int
-cluster_read(vp, filesize, lblkno, size, totread, seqcount, bpp)
-	struct vnode *vp;
-	u_quad_t filesize;
-	daddr_t lblkno;
-	long size;
-	long totread;
-	int seqcount;
-	struct buf **bpp;
+cluster_read(struct vnode *vp, u_quad_t filesize, daddr_t lblkno, 
+	long size, long totread, int seqcount, struct buf **bpp)
 {
 	struct buf *bp, *rbp, *reqbp;
 	daddr_t blkno, origblkno;
@@ -302,14 +296,8 @@
  * and then parcel them up into logical blocks in the buffer hash table.
  */
 static struct buf *
-cluster_rbuild(vp, filesize, lbn, blkno, size, run, fbp)
-	struct vnode *vp;
-	u_quad_t filesize;
-	daddr_t lbn;
-	daddr_t blkno;
-	long size;
-	int run;
-	struct buf *fbp;
+cluster_rbuild(struct vnode *vp, u_quad_t filesize, daddr_t lbn, 
+	daddr_t blkno, long size, int run, struct buf *fbp)
 {
 	struct buf *bp, *tbp;
 	daddr_t bn;
@@ -510,8 +498,7 @@
  * that we will need to shift around.
  */
 void
-cluster_callback(bp)
-	struct buf *bp;
+cluster_callback(struct buf *bp)
 {
 	struct buf *nbp, *tbp;
 	int error = 0;
@@ -593,10 +580,7 @@
  *	4.	end of a cluster - asynchronously write cluster
  */
 void
-cluster_write(bp, filesize, seqcount)
-	struct buf *bp;
-	u_quad_t filesize;
-	int seqcount;
+cluster_write(struct buf *bp, u_quad_t filesize, int seqcount)
 {
 	struct vnode *vp;
 	daddr_t lbn;
@@ -744,11 +728,7 @@
  * the current block (if last_bp == NULL).
  */
 int
-cluster_wbuild(vp, size, start_lbn, len)
-	struct vnode *vp;
-	long size;
-	daddr_t start_lbn;
-	int len;
+cluster_wbuild(struct vnode *vp, long size, daddr_t start_lbn, int len)
 {
 	struct buf *bp, *tbp;
 	int i, j, s;
@@ -948,9 +928,7 @@
  * Plus add one additional buffer.
  */
 static struct cluster_save *
-cluster_collectbufs(vp, last_bp)
-	struct vnode *vp;
-	struct buf *last_bp;
+cluster_collectbufs(struct vnode *vp, struct buf *last_bp)
 {
 	struct cluster_save *buflist;
 	struct buf *bp;
--- kern/subr_prof.c	2003-10-12 19:38:53.000000000 -0400
+++ /home/tim/subr_prof.c	2004-06-01 16:20:39.000000000 -0400
@@ -79,8 +79,7 @@
 #endif /* GUPROF */
 
 static void
-kmstartup(dummy)
-	void *dummy;
+kmstartup(void *dummy)
 {
 	char *cp;
 	struct gmonparam *p = &_gmonparam;
@@ -394,10 +393,7 @@
  * inaccurate.
  */
 void
-addupc_intr(p, pc, ticks)
-	struct proc *p;
-	u_long pc;
-	u_int ticks;
+addupc_intr(struct proc *p, u_long pc, u_int ticks)
 {
 	struct uprof *prof;
 	caddr_t addr;
@@ -424,10 +420,7 @@
  * update fails, we simply turn off profiling.
  */
 void
-addupc_task(p, pc, ticks)
-	struct proc *p;
-	u_long pc;
-	u_int ticks;
+addupc_task(struct proc *p, u_long pc, u_int ticks)
 {
 	struct uprof *prof;
 	caddr_t addr;




More information about the Commits mailing list