From b1ce5639d84f2028f6db4801817eb6a82037be7d Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 13 Jan 2006 21:09:27 +0000 Subject: [PATCH] * Remove (void) casts for discarded return values. * Put function types on separate lines. * Ansify function definitions. In-collaboration-with: Alexey Slynko --- sys/vfs/coda/coda.h | 5 +-- sys/vfs/coda/coda_fbsd.c | 4 +-- sys/vfs/coda/coda_psdev.c | 8 ++--- sys/vfs/coda/coda_subr.c | 11 +++--- sys/vfs/coda/coda_vnops.c | 6 ++-- sys/vfs/fdesc/fdesc_vfsops.c | 4 +-- sys/vfs/fdesc/fdesc_vnops.c | 4 +-- sys/vfs/fifofs/fifo_vnops.c | 8 ++--- sys/vfs/gnu/ext2fs/alpha-bitops.h | 29 ++++++++++------ sys/vfs/gnu/ext2fs/ext2_alloc.c | 4 +-- sys/vfs/gnu/ext2fs/ext2_inode.c | 4 +-- sys/vfs/gnu/ext2fs/ext2_linux_balloc.c | 46 +++++++++++++++----------- sys/vfs/gnu/ext2fs/ext2_linux_ialloc.c | 38 +++++++++++---------- sys/vfs/gnu/ext2fs/ext2_readwrite.c | 6 ++-- sys/vfs/gnu/ext2fs/ext2_subr.c | 4 +-- sys/vfs/gnu/ext2fs/ext2_vfsops.c | 13 +++++--- sys/vfs/gnu/ext2fs/ext2_vnops.c | 10 +++--- sys/vfs/gnu/ext2fs/i386-bitops.h | 26 ++++++++++----- sys/vfs/hpfs/hpfs_alsubr.c | 16 +++++---- sys/vfs/hpfs/hpfs_vfsops.c | 4 +-- sys/vfs/isofs/cd9660/cd9660_vfsops.c | 12 +++---- sys/vfs/isofs/cd9660/cd9660_vnops.c | 11 ++---- sys/vfs/isofs/cd9660/iso.h | 26 +++++---------- sys/vfs/mfs/mfs_vfsops.c | 4 +-- sys/vfs/msdosfs/msdosfs_denode.c | 4 +-- sys/vfs/msdosfs/msdosfs_lookup.c | 4 +-- sys/vfs/msdosfs/msdosfs_vfsops.c | 9 +++-- sys/vfs/msdosfs/msdosfs_vnops.c | 4 +-- 28 files changed, 173 insertions(+), 151 deletions(-) diff --git a/sys/vfs/coda/coda.h b/sys/vfs/coda/coda.h index 2c80b8fcc8..d1edc931da 100644 --- a/sys/vfs/coda/coda.h +++ b/sys/vfs/coda/coda.h @@ -28,7 +28,7 @@ * * @(#) src/sys/coda/coda.h,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $ * $FreeBSD: src/sys/coda/coda.h,v 1.9 1999/12/29 04:54:30 peter Exp $ - * $DragonFly: src/sys/vfs/coda/Attic/coda.h,v 1.3 2005/08/02 13:03:55 joerg Exp $ + * $DragonFly: src/sys/vfs/coda/Attic/coda.h,v 1.4 2006/01/13 21:09:26 swildner Exp $ * */ @@ -182,7 +182,8 @@ typedef struct ViceFid { #ifdef __linux__ -static __inline__ ino_t coda_f2i(struct ViceFid *fid) +static __inline__ ino_t +coda_f2i(struct ViceFid *fid) { if ( ! fid ) return 0; diff --git a/sys/vfs/coda/coda_fbsd.c b/sys/vfs/coda/coda_fbsd.c index abcb2b5231..555e03eab3 100644 --- a/sys/vfs/coda/coda_fbsd.c +++ b/sys/vfs/coda/coda_fbsd.c @@ -28,7 +28,7 @@ * * @(#) src/sys/coda/coda_fbsd.cr,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $ * $FreeBSD: src/sys/coda/coda_fbsd.c,v 1.18 1999/09/25 18:23:43 phk Exp $ - * $DragonFly: src/sys/vfs/coda/Attic/coda_fbsd.c,v 1.8 2004/11/12 00:09:28 dillon Exp $ + * $DragonFly: src/sys/vfs/coda/Attic/coda_fbsd.c,v 1.9 2006/01/13 21:09:26 swildner Exp $ * */ @@ -172,7 +172,7 @@ printf("error = %d\n", error); /* Do an internal close if necessary. */ if (opened_internally) { - (void)VOP_CLOSE(vp, FREAD, cred, p); + VOP_CLOSE(vp, FREAD, cred, p); } return(error); diff --git a/sys/vfs/coda/coda_psdev.c b/sys/vfs/coda/coda_psdev.c index 1a16d077ca..7874adda24 100644 --- a/sys/vfs/coda/coda_psdev.c +++ b/sys/vfs/coda/coda_psdev.c @@ -28,7 +28,7 @@ * * @(#) src/sys/coda/coda_psdev.c,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $ * $FreeBSD: src/sys/coda/coda_psdev.c,v 1.13 1999/09/29 15:03:46 marcel Exp $ - * $DragonFly: src/sys/vfs/coda/Attic/coda_psdev.c,v 1.9 2005/02/17 14:00:10 joerg Exp $ + * $DragonFly: src/sys/vfs/coda/Attic/coda_psdev.c,v 1.10 2006/01/13 21:09:27 swildner Exp $ * */ @@ -207,10 +207,10 @@ vc_nb_close (dev_t dev, int flag, int mode, d_thread_t *td) if (outstanding_upcalls) { #ifdef CODA_VERBOSE printf("presleep: outstanding_upcalls = %d\n", outstanding_upcalls); - (void) tsleep(&outstanding_upcalls, 0, "coda_umount", 0); + tsleep(&outstanding_upcalls, 0, "coda_umount", 0); printf("postsleep: outstanding_upcalls = %d\n", outstanding_upcalls); #else - (void) tsleep(&outstanding_upcalls, 0, "coda_umount", 0); + tsleep(&outstanding_upcalls, 0, "coda_umount", 0); #endif } @@ -574,7 +574,7 @@ coda_call(struct coda_mntinfo *mntinfo, int inSize, int *outSize, } while (error && i++ < 128 && VC_OPEN(vcp)); p->p_sigmask = psig_omask; #else - (void) tsleep(&vmp->vm_sleep, 0, "coda_call", 0); + tsleep(&vmp->vm_sleep, 0, "coda_call", 0); #endif if (VC_OPEN(vcp)) { /* Venus is still alive */ /* Op went through, interrupt or not... */ diff --git a/sys/vfs/coda/coda_subr.c b/sys/vfs/coda/coda_subr.c index 82bae8f7a2..f5a199beae 100644 --- a/sys/vfs/coda/coda_subr.c +++ b/sys/vfs/coda/coda_subr.c @@ -28,7 +28,7 @@ * * @(#) src/sys/coda/coda_subr.c,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $ * $FreeBSD: src/sys/coda/coda_subr.c,v 1.11.2.1 2001/10/25 19:18:51 dillon Exp $ - * $DragonFly: src/sys/vfs/coda/Attic/coda_subr.c,v 1.9 2005/04/20 17:01:52 dillon Exp $ + * $DragonFly: src/sys/vfs/coda/Attic/coda_subr.c,v 1.10 2006/01/13 21:09:27 swildner Exp $ * */ @@ -370,7 +370,8 @@ coda_cacheprint(struct mount *whoIam) * CODA_REPLACE -- replace one ViceFid with another throughout the name cache */ -int handleDownCall(int opcode, union outputArgs *out) +int +handleDownCall(int opcode, union outputArgs *out) { int error; @@ -525,7 +526,8 @@ coda_vmflush(struct cnode *cp) /* * kernel-internal debugging switches */ -void coda_debugon(void) +void +coda_debugon(void) { codadebug = -1; coda_nc_debug = -1; @@ -534,7 +536,8 @@ void coda_debugon(void) coda_vfsop_print_entry = 1; } -void coda_debugoff(void) +void +coda_debugoff(void) { codadebug = 0; coda_nc_debug = 0; diff --git a/sys/vfs/coda/coda_vnops.c b/sys/vfs/coda/coda_vnops.c index 46e7bad078..68a74b4c40 100644 --- a/sys/vfs/coda/coda_vnops.c +++ b/sys/vfs/coda/coda_vnops.c @@ -28,7 +28,7 @@ * * @(#) src/sys/coda/coda_vnops.c,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $ * $FreeBSD: src/sys/coda/coda_vnops.c,v 1.22.2.1 2001/06/29 16:26:22 shafeeq Exp $ - * $DragonFly: src/sys/vfs/coda/Attic/coda_vnops.c,v 1.27 2005/09/14 01:13:23 dillon Exp $ + * $DragonFly: src/sys/vfs/coda/Attic/coda_vnops.c,v 1.28 2006/01/13 21:09:27 swildner Exp $ * */ @@ -492,7 +492,7 @@ printf("coda_rdwr: Internally Opening %p\n", vp); /* Do an internal close if necessary. */ if (opened_internally) { MARK_INT_GEN(CODA_CLOSE_STATS); - (void)VOP_CLOSE(vp, (rw == UIO_READ ? FREAD : FWRITE), td); + VOP_CLOSE(vp, (rw == UIO_READ ? FREAD : FWRITE), td); } /* Invalidate cached attributes if writing. */ @@ -1601,7 +1601,7 @@ printf("coda_readdir: Internally Opening %p\n", vp); /* Do an "internal close" if necessary. */ if (opened_internally) { MARK_INT_GEN(CODA_CLOSE_STATS); - (void)VOP_CLOSE(vp, FREAD, td); + VOP_CLOSE(vp, FREAD, td); } } diff --git a/sys/vfs/fdesc/fdesc_vfsops.c b/sys/vfs/fdesc/fdesc_vfsops.c index 6f9ae60d75..f2298c2999 100644 --- a/sys/vfs/fdesc/fdesc_vfsops.c +++ b/sys/vfs/fdesc/fdesc_vfsops.c @@ -36,7 +36,7 @@ * @(#)fdesc_vfsops.c 8.4 (Berkeley) 1/21/94 * * $FreeBSD: src/sys/miscfs/fdesc/fdesc_vfsops.c,v 1.22.2.3 2002/08/23 17:42:39 njl Exp $ - * $DragonFly: src/sys/vfs/fdesc/fdesc_vfsops.c,v 1.16 2005/09/17 07:43:03 dillon Exp $ + * $DragonFly: src/sys/vfs/fdesc/fdesc_vfsops.c,v 1.17 2006/01/13 21:09:27 swildner Exp $ */ /* @@ -106,7 +106,7 @@ fdesc_mount(struct mount *mp, char *path, caddr_t data, struct thread *td) bzero(mp->mnt_stat.f_mntfromname, MNAMELEN); bcopy("fdesc", mp->mnt_stat.f_mntfromname, sizeof("fdesc")); - (void)fdesc_statfs(mp, &mp->mnt_stat, td); + fdesc_statfs(mp, &mp->mnt_stat, td); return (0); } diff --git a/sys/vfs/fdesc/fdesc_vnops.c b/sys/vfs/fdesc/fdesc_vnops.c index a3ad666b45..b07d34b417 100644 --- a/sys/vfs/fdesc/fdesc_vnops.c +++ b/sys/vfs/fdesc/fdesc_vnops.c @@ -36,7 +36,7 @@ * @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94 * * $FreeBSD: src/sys/miscfs/fdesc/fdesc_vnops.c,v 1.47.2.1 2001/10/22 22:49:26 chris Exp $ - * $DragonFly: src/sys/vfs/fdesc/fdesc_vnops.c,v 1.23 2006/01/09 15:13:44 corecode Exp $ + * $DragonFly: src/sys/vfs/fdesc/fdesc_vnops.c,v 1.24 2006/01/13 21:09:27 swildner Exp $ */ /* @@ -127,7 +127,7 @@ loop: */ if (fdcache_lock & FDL_LOCKED) { fdcache_lock |= FDL_WANT; - (void) tsleep((caddr_t) &fdcache_lock, 0, "fdalvp", 0); + tsleep((caddr_t) &fdcache_lock, 0, "fdalvp", 0); goto loop; } fdcache_lock |= FDL_LOCKED; diff --git a/sys/vfs/fifofs/fifo_vnops.c b/sys/vfs/fifofs/fifo_vnops.c index e1f4dd4b1f..ba09cce488 100644 --- a/sys/vfs/fifofs/fifo_vnops.c +++ b/sys/vfs/fifofs/fifo_vnops.c @@ -32,7 +32,7 @@ * * @(#)fifo_vnops.c 8.10 (Berkeley) 5/27/95 * $FreeBSD: src/sys/miscfs/fifofs/fifo_vnops.c,v 1.45.2.4 2003/04/22 10:11:24 bde Exp $ - * $DragonFly: src/sys/vfs/fifofs/fifo_vnops.c,v 1.21 2005/09/17 07:43:04 dillon Exp $ + * $DragonFly: src/sys/vfs/fifofs/fifo_vnops.c,v 1.22 2006/01/13 21:09:27 swildner Exp $ */ #include @@ -180,7 +180,7 @@ fifo_open(struct vop_open_args *ap) fip->fi_readsock = rso; error = socreate(AF_LOCAL, &wso, SOCK_STREAM, 0, ap->a_td); if (error) { - (void)soclose(rso); + soclose(rso); free(fip, M_FIFOINFO); vp->v_fifoinfo = NULL; return (error); @@ -188,8 +188,8 @@ fifo_open(struct vop_open_args *ap) fip->fi_writesock = wso; error = unp_connect2(wso, rso); if (error) { - (void)soclose(wso); - (void)soclose(rso); + soclose(wso); + soclose(rso); free(fip, M_FIFOINFO); vp->v_fifoinfo = NULL; return (error); diff --git a/sys/vfs/gnu/ext2fs/alpha-bitops.h b/sys/vfs/gnu/ext2fs/alpha-bitops.h index 8a9c44f02a..a518ac0cd2 100644 --- a/sys/vfs/gnu/ext2fs/alpha-bitops.h +++ b/sys/vfs/gnu/ext2fs/alpha-bitops.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/gnu/ext2fs/alpha-bitops.h,v 1.1.2.1 2001/08/14 18:03:19 gallatin Exp $ */ -/* $DragonFly: src/sys/vfs/gnu/ext2fs/Attic/alpha-bitops.h,v 1.2 2003/06/17 04:28:33 dillon Exp $ */ +/* $DragonFly: src/sys/vfs/gnu/ext2fs/Attic/alpha-bitops.h,v 1.3 2006/01/13 21:09:27 swildner Exp $ */ #ifndef _ALPHA_BITOPS_H #define _ALPHA_BITOPS_H @@ -32,7 +32,8 @@ static __inline unsigned long hweight64(unsigned long); static __inline unsigned long find_next_zero_bit(void *, unsigned long, unsigned long); -static __inline unsigned int set_bit(unsigned long nr, volatile void * addr) +static __inline unsigned int +set_bit(unsigned long nr, volatile void * addr) { unsigned long oldbit; unsigned long temp; @@ -54,7 +55,8 @@ static __inline unsigned int set_bit(unsigned long nr, volatile void * addr) return oldbit; } -static __inline unsigned int clear_bit(unsigned long nr, volatile void * addr) +static __inline unsigned int +clear_bit(unsigned long nr, volatile void * addr) { unsigned long oldbit; unsigned long temp; @@ -76,7 +78,8 @@ static __inline unsigned int clear_bit(unsigned long nr, volatile void * addr) return oldbit; } -static __inline unsigned int change_bit(unsigned long nr, volatile void * addr) +static __inline unsigned int +change_bit(unsigned long nr, volatile void * addr) { unsigned long oldbit; unsigned long temp; @@ -107,7 +110,8 @@ static __inline unsigned int test_bit(int nr, volatile void * addr) * Do a binary search on the bits. Due to the nature of large * constants on the alpha, it is worthwhile to split the search. */ -static __inline unsigned long ffz_b(unsigned long x) +static __inline unsigned long +ffz_b(unsigned long x) { unsigned long sum = 0; @@ -119,7 +123,8 @@ static __inline unsigned long ffz_b(unsigned long x) return sum; } -static __inline unsigned long ffz(unsigned long word) +static __inline unsigned long +ffz(unsigned long word) { #ifdef __alpha_cix__ /* Whee. EV6 can calculate it directly. */ @@ -146,7 +151,8 @@ static __inline unsigned long ffz(unsigned long word) * differs in spirit from the above ffz (man ffs). */ -static __inline int ffs(int word) +static __inline int +ffs(int word) { int result = ffz(~word); return word ? result+1 : 0; @@ -160,7 +166,8 @@ static __inline int ffs(int word) #ifdef __alpha_cix__ /* Whee. EV6 can calculate it directly. */ -static __inline unsigned long hweight64(unsigned long w) +static __inline unsigned long +hweight64(unsigned long w) { unsigned long result; __asm__("ctpop %1,%0" : "=r"(result) : "r"(w)); @@ -179,7 +186,8 @@ static __inline unsigned long hweight64(unsigned long w) #endif /* __alpha_cix__ */ /* from lib/string.c */ -static __inline void * memscan(void * addr, int c, size_t size) +static __inline void * +memscan(void * addr, int c, size_t size) { unsigned char * p = (unsigned char *) addr; @@ -196,7 +204,8 @@ static __inline void * memscan(void * addr, int c, size_t size) /* * Find next zero bit in a bitmap reasonably efficiently.. */ -static __inline unsigned long find_next_zero_bit(void * addr, unsigned long size, unsigned long offset) +static __inline unsigned long +find_next_zero_bit(void * addr, unsigned long size, unsigned long offset) { unsigned long * p = ((unsigned long *) addr) + (offset >> 6); unsigned long result = offset & ~63UL; diff --git a/sys/vfs/gnu/ext2fs/ext2_alloc.c b/sys/vfs/gnu/ext2fs/ext2_alloc.c index b486ab2279..da981bf444 100644 --- a/sys/vfs/gnu/ext2fs/ext2_alloc.c +++ b/sys/vfs/gnu/ext2fs/ext2_alloc.c @@ -38,7 +38,7 @@ * * @(#)ext2_alloc.c 8.8 (Berkeley) 2/21/94 * $FreeBSD: src/sys/gnu/ext2fs/ext2_alloc.c,v 1.28.2.2 2002/07/01 00:18:51 iedowse Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_alloc.c,v 1.7 2005/08/02 13:03:55 joerg Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_alloc.c,v 1.8 2006/01/13 21:09:27 swildner Exp $ */ #include "opt_quota.h" @@ -180,7 +180,7 @@ ext2_alloc(struct inode *ip, daddr_t lbn, daddr_t bpref, int size, /* * Restore user's disk quota because allocation failed. */ - (void) chkdq(ip, (long)-btodb(size), cred, FORCE); + chkdq(ip, (long)-btodb(size), cred, FORCE); #endif nospace: ext2_fserr(fs, cred->cr_uid, "file system full"); diff --git a/sys/vfs/gnu/ext2fs/ext2_inode.c b/sys/vfs/gnu/ext2fs/ext2_inode.c index 8af6102a85..e4d82b7309 100644 --- a/sys/vfs/gnu/ext2fs/ext2_inode.c +++ b/sys/vfs/gnu/ext2fs/ext2_inode.c @@ -38,7 +38,7 @@ * * @(#)ext2_inode.c 8.5 (Berkeley) 12/30/93 * $FreeBSD: src/sys/gnu/ext2fs/ext2_inode.c,v 1.24.2.1 2000/08/03 00:52:57 peter Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_inode.c,v 1.9 2005/07/26 15:43:35 hmp Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_inode.c,v 1.10 2006/01/13 21:09:27 swildner Exp $ */ #include "opt_quota.h" @@ -349,7 +349,7 @@ done: oip->i_flag |= IN_CHANGE; vnode_pager_setsize(ovp, length); #if QUOTA - (void) chkdq(oip, -blocksreleased, NOCRED, 0); + chkdq(oip, -blocksreleased, NOCRED, 0); #endif return (allerror); } diff --git a/sys/vfs/gnu/ext2fs/ext2_linux_balloc.c b/sys/vfs/gnu/ext2fs/ext2_linux_balloc.c index a090c0bad9..5235dd9d71 100644 --- a/sys/vfs/gnu/ext2fs/ext2_linux_balloc.c +++ b/sys/vfs/gnu/ext2fs/ext2_linux_balloc.c @@ -5,7 +5,7 @@ * University of Utah, Department of Computer Science * * $FreeBSD: src/sys/gnu/ext2fs/ext2_linux_balloc.c,v 1.11.2.3 2001/08/14 18:03:19 gallatin Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_linux_balloc.c,v 1.5 2005/06/06 15:35:06 dillon Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_linux_balloc.c,v 1.6 2006/01/13 21:09:27 swildner Exp $ */ /* * linux/fs/ext2/balloc.c @@ -59,9 +59,9 @@ * ext2_linux_ialloc.c */ -static void read_block_bitmap (struct mount * mp, - unsigned int block_group, - unsigned long bitmap_nr) +static void +read_block_bitmap(struct mount *mp, unsigned int block_group, + unsigned long bitmap_nr) { struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs; struct ext2_group_desc * gdp; @@ -91,8 +91,8 @@ static void read_block_bitmap (struct mount * mp, * 2/ If the file system contains less than EXT2_MAX_GROUP_LOADED groups, * this function reads the bitmap without maintaining a LRU cache. */ -static int load__block_bitmap (struct mount * mp, - unsigned int block_group) +static int +load__block_bitmap(struct mount *mp, unsigned int block_group) { int i, j; struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs; @@ -151,8 +151,8 @@ static int load__block_bitmap (struct mount * mp, return 0; } -static __inline int load_block_bitmap (struct mount * mp, - unsigned int block_group) +static __inline int +load_block_bitmap(struct mount * mp, unsigned int block_group) { struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs; if (sb->s_loaded_block_bitmaps > 0 && @@ -167,8 +167,9 @@ static __inline int load_block_bitmap (struct mount * mp, return load__block_bitmap (mp, block_group); } -void ext2_free_blocks (struct mount * mp, unsigned long block, - unsigned long count) +void +ext2_free_blocks(struct mount * mp, unsigned long block, + unsigned long count) { struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs; struct buffer_head * bh; @@ -251,9 +252,10 @@ void ext2_free_blocks (struct mount * mp, unsigned long block, * each block group the search first looks for an entire free byte in the block * bitmap, and then for any free bit if that fails. */ -int ext2_new_block (struct mount * mp, unsigned long goal, - u_int32_t * prealloc_count, - u_int32_t * prealloc_block) +int +ext2_new_block(struct mount * mp, unsigned long goal, + u_int32_t * prealloc_count, + u_int32_t * prealloc_block) { struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs; struct buffer_head * bh; @@ -457,7 +459,8 @@ got_block: } #ifdef unused -static unsigned long ext2_count_free_blocks (struct mount * mp) +static unsigned long +ext2_count_free_blocks(struct mount * mp) { struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs; #ifdef EXT2FS_DEBUG @@ -492,15 +495,16 @@ static unsigned long ext2_count_free_blocks (struct mount * mp) } #endif /* unused */ -static __inline int block_in_use (unsigned long block, - struct ext2_sb_info * sb, - unsigned char * map) +static __inline int +block_in_use (unsigned long block, struct ext2_sb_info *sb, + unsigned char * map) { return test_bit ((block - sb->s_es->s_first_data_block) % EXT2_BLOCKS_PER_GROUP(sb), map); } -static int test_root(int a, int b) +static int +test_root(int a, int b) { if (a == 0) return 1; @@ -513,14 +517,16 @@ static int test_root(int a, int b) } } -int ext2_group_sparse(int group) +int +ext2_group_sparse(int group) { return (test_root(group, 3) || test_root(group, 5) || test_root(group, 7)); } #ifdef unused -static void ext2_check_blocks_bitmap (struct mount * mp) +static void +ext2_check_blocks_bitmap(struct mount * mp) { struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs; struct buffer_head * bh; diff --git a/sys/vfs/gnu/ext2fs/ext2_linux_ialloc.c b/sys/vfs/gnu/ext2fs/ext2_linux_ialloc.c index 630756be9c..d7b1f8cf81 100644 --- a/sys/vfs/gnu/ext2fs/ext2_linux_ialloc.c +++ b/sys/vfs/gnu/ext2fs/ext2_linux_ialloc.c @@ -5,7 +5,7 @@ * University of Utah, Department of Computer Science * * $FreeBSD: src/sys/gnu/ext2fs/ext2_linux_ialloc.c,v 1.13.2.2 2001/08/14 18:03:19 gallatin Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_linux_ialloc.c,v 1.6 2005/06/06 15:35:06 dillon Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_linux_ialloc.c,v 1.7 2006/01/13 21:09:27 swildner Exp $ */ /* * linux/fs/ext2/ialloc.c @@ -58,16 +58,17 @@ /* this is supposed to mark a buffer dirty on ready for delayed writing */ -void mark_buffer_dirty(struct buf *bh) +void +mark_buffer_dirty(struct buf *bh) { crit_enter(); bh->b_flags |= B_DIRTY; crit_exit(); } -struct ext2_group_desc * get_group_desc (struct mount * mp, - unsigned int block_group, - struct buffer_head ** bh) +struct ext2_group_desc * +get_group_desc(struct mount * mp, unsigned int block_group, + struct buffer_head **bh) { struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs; unsigned long group_desc; @@ -94,9 +95,9 @@ struct ext2_group_desc * get_group_desc (struct mount * mp, return gdp + desc; } -static void read_inode_bitmap (struct mount * mp, - unsigned long block_group, - unsigned int bitmap_nr) +static void +read_inode_bitmap(struct mount *mp, unsigned long block_group, + unsigned int bitmap_nr) { struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs; struct ext2_group_desc * gdp; @@ -127,8 +128,8 @@ static void read_inode_bitmap (struct mount * mp, * 2/ If the file system contains less than EXT2_MAX_GROUP_LOADED groups, * this function reads the bitmap without maintaining a LRU cache. */ -static int load_inode_bitmap (struct mount * mp, - unsigned int block_group) +static int +load_inode_bitmap(struct mount *mp, unsigned int block_group) { struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs; int i, j; @@ -190,7 +191,8 @@ static int load_inode_bitmap (struct mount * mp, } -void ext2_free_inode (struct inode * inode) +void +ext2_free_inode(struct inode *inode) { struct ext2_sb_info * sb; struct buffer_head * bh; @@ -254,9 +256,8 @@ void ext2_free_inode (struct inode * inode) * * This may be used one day by the NFS server */ -static void inc_inode_version (struct inode * inode, - struct ext2_group_desc *gdp, - int mode) +static void +inc_inode_version(struct inode *inode, struct ext2_group_desc *gdp, int mode) { unsigned long inode_block; struct buffer_head * bh; @@ -297,7 +298,8 @@ static void inc_inode_version (struct inode * inode, /* * this functino has been reduced to the actual 'find the inode number' part */ -ino_t ext2_new_inode (const struct inode * dir, int mode) +ino_t +ext2_new_inode(const struct inode *dir, int mode) { struct ext2_sb_info * sb; struct buffer_head * bh; @@ -443,7 +445,8 @@ repeat: } #ifdef unused -static unsigned long ext2_count_free_inodes (struct mount * mp) +static unsigned long +ext2_count_free_inodes(struct mount *mp) { #ifdef EXT2FS_DEBUG struct ext2_sb_info *sb = VFSTOUFS(mp)->um_e2fs; @@ -479,7 +482,8 @@ static unsigned long ext2_count_free_inodes (struct mount * mp) #endif /* unused */ #ifdef LATER -void ext2_check_inodes_bitmap (struct mount * mp) +void +ext2_check_inodes_bitmap(struct mount *mp) { struct ext2_super_block * es; unsigned long desc_count, bitmap_count, x; diff --git a/sys/vfs/gnu/ext2fs/ext2_readwrite.c b/sys/vfs/gnu/ext2fs/ext2_readwrite.c index 9b4e96849a..29196335b9 100644 --- a/sys/vfs/gnu/ext2fs/ext2_readwrite.c +++ b/sys/vfs/gnu/ext2fs/ext2_readwrite.c @@ -38,7 +38,7 @@ * * @(#)ufs_readwrite.c 8.7 (Berkeley) 1/21/94 * $FreeBSD: src/sys/gnu/ext2fs/ext2_readwrite.c,v 1.18.2.2 2000/12/22 18:44:33 dillon Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_readwrite.c,v 1.7 2004/04/08 20:57:52 cpressey Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_readwrite.c,v 1.8 2006/01/13 21:09:27 swildner Exp $ */ #define BLKSIZE(a, b, c) blksize(a, b, c) @@ -262,7 +262,7 @@ ext2_write(struct vop_write_args *ap) bp->b_flags |= B_RELBUF; if (ioflag & IO_SYNC) { - (void)bwrite(bp); + bwrite(bp); } else if (xfersize + blkoffset == fs->s_frag_size) { if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERW) == 0) { bp->b_flags |= B_CLUSTEROK; @@ -287,7 +287,7 @@ ext2_write(struct vop_write_args *ap) ip->i_mode &= ~(ISUID | ISGID); if (error) { if (ioflag & IO_UNIT) { - (void)UFS_TRUNCATE(vp, osize, + UFS_TRUNCATE(vp, osize, ioflag & IO_SYNC, ap->a_cred, uio->uio_td); uio->uio_offset -= resid - uio->uio_resid; uio->uio_resid = resid; diff --git a/sys/vfs/gnu/ext2fs/ext2_subr.c b/sys/vfs/gnu/ext2fs/ext2_subr.c index 1e1e9e4eff..8d2658824e 100644 --- a/sys/vfs/gnu/ext2fs/ext2_subr.c +++ b/sys/vfs/gnu/ext2fs/ext2_subr.c @@ -38,7 +38,7 @@ * * @(#)ext2_subr.c 8.2 (Berkeley) 9/21/93 * $FreeBSD: src/sys/gnu/ext2fs/ext2_subr.c,v 1.13.2.2 2000/08/03 18:48:27 peter Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_subr.c,v 1.7 2004/04/08 20:57:52 cpressey Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_subr.c,v 1.8 2006/01/13 21:09:27 swildner Exp $ */ #include @@ -114,7 +114,7 @@ ext2_checkoverlap(struct buf *bp, struct inode *ip) ep->b_blkno + btodb(ep->b_bcount) <= start) continue; vprint("Disk overlap", vp); - (void)printf("\tstart %d, end %d overlap start %d, end %d\n", + printf("\tstart %d, end %d overlap start %d, end %d\n", start, last, ep->b_blkno, ep->b_blkno + btodb(ep->b_bcount) - 1); panic("Disk buffer overlap"); diff --git a/sys/vfs/gnu/ext2fs/ext2_vfsops.c b/sys/vfs/gnu/ext2fs/ext2_vfsops.c index 817ffa605a..9424ffa231 100644 --- a/sys/vfs/gnu/ext2fs/ext2_vfsops.c +++ b/sys/vfs/gnu/ext2fs/ext2_vfsops.c @@ -38,7 +38,7 @@ * * @(#)ffs_vfsops.c 8.8 (Berkeley) 4/18/94 * $FreeBSD: src/sys/gnu/ext2fs/ext2_vfsops.c,v 1.63.2.7 2002/07/01 00:18:51 iedowse Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_vfsops.c,v 1.31 2005/09/17 07:43:06 dillon Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_vfsops.c,v 1.32 2006/01/13 21:09:27 swildner Exp $ */ #include "opt_quota.h" @@ -121,10 +121,12 @@ static int compute_sb_data (struct vnode * devvp, * VFS Operations. * * mount system call + * + * Parameters: + * data: this is actually a (struct ufs_args *) */ static int -ext2_mount(struct mount *mp, char *path, - caddr_t data, /* this is actually a (struct ufs_args *) */ +ext2_mount(struct mount *mp, char *path, caddr_t data, struct thread *td) { struct vnode *devvp; @@ -271,7 +273,8 @@ ext2_mount(struct mount *mp, char *path, * checks that the data in the descriptor blocks make sense * this is taken from ext2/super.c */ -static int ext2_check_descriptors(struct ext2_sb_info *sb) +static int +ext2_check_descriptors(struct ext2_sb_info *sb) { int i; int desc_block = 0; @@ -704,7 +707,7 @@ ext2_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td) out: if (bp) brelse(bp); - (void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, td); + VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, td); if (ump) { bsd_free(ump->um_e2fs->s_es, M_UFSMNT); bsd_free(ump->um_e2fs, M_UFSMNT); diff --git a/sys/vfs/gnu/ext2fs/ext2_vnops.c b/sys/vfs/gnu/ext2fs/ext2_vnops.c index 4a6f6407b4..400627eb0a 100644 --- a/sys/vfs/gnu/ext2fs/ext2_vnops.c +++ b/sys/vfs/gnu/ext2fs/ext2_vnops.c @@ -44,7 +44,7 @@ * @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95 * @(#)ext2_vnops.c 8.7 (Berkeley) 2/3/94 * $FreeBSD: src/sys/gnu/ext2fs/ext2_vnops.c,v 1.51.2.2 2003/01/02 17:26:18 bde Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_vnops.c,v 1.23 2005/09/14 01:13:35 dillon Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_vnops.c,v 1.24 2006/01/13 21:09:27 swildner Exp $ */ #include "opt_quota.h" @@ -243,9 +243,9 @@ ext2_fsync_bp(struct buf *bp, void *data) * since there is no way to quickly wait for them below. */ if (bp->b_vp == info->vp || info->waitfor == MNT_NOWAIT) - (void) bawrite(bp); + bawrite(bp); else - (void) bwrite(bp); + bwrite(bp); crit_enter(); return(1); } @@ -590,7 +590,7 @@ abortit: if (doingdirectory && newparent) { dp->i_nlink--; dp->i_flag |= IN_CHANGE; - (void)UFS_UPDATE(tdvp, 1); + UFS_UPDATE(tdvp, 1); } goto bad; } @@ -778,7 +778,7 @@ abortit: "rename: mangled dir"); } else { dirbuf.dotdot_ino = newparent; - (void) vn_rdwr(UIO_WRITE, fvp, + vn_rdwr(UIO_WRITE, fvp, (caddr_t)&dirbuf, sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE, diff --git a/sys/vfs/gnu/ext2fs/i386-bitops.h b/sys/vfs/gnu/ext2fs/i386-bitops.h index a09ab9524d..fe699bb669 100644 --- a/sys/vfs/gnu/ext2fs/i386-bitops.h +++ b/sys/vfs/gnu/ext2fs/i386-bitops.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/gnu/ext2fs/i386-bitops.h,v 1.5 1999/11/15 23:16:06 obrien Exp $ */ -/* $DragonFly: src/sys/vfs/gnu/ext2fs/i386-bitops.h,v 1.2 2003/06/17 04:28:34 dillon Exp $ */ +/* $DragonFly: src/sys/vfs/gnu/ext2fs/i386-bitops.h,v 1.3 2006/01/13 21:09:27 swildner Exp $ */ /* * this is mixture of i386/bitops.h and asm/string.h * taken from the Linux source tree @@ -27,7 +27,8 @@ struct __dummy { unsigned long a[100]; }; #define ADDR (*(struct __dummy *) addr) -static __inline__ int set_bit(int nr, void * addr) +static __inline__ int +set_bit(int nr, void *addr) { int oldbit; @@ -37,7 +38,8 @@ static __inline__ int set_bit(int nr, void * addr) return oldbit; } -static __inline__ int clear_bit(int nr, void * addr) +static __inline__ int +clear_bit(int nr, void *addr) { int oldbit; @@ -47,7 +49,8 @@ static __inline__ int clear_bit(int nr, void * addr) return oldbit; } -static __inline__ int change_bit(int nr, void * addr) +static __inline__ int +change_bit(int nr, void *addr) { int oldbit; @@ -61,7 +64,8 @@ static __inline__ int change_bit(int nr, void * addr) * This routine doesn't need to be atomic, but it's faster to code it * this way. */ -static __inline__ int test_bit(int nr, void * addr) +static __inline__ int +test_bit(int nr, void *addr) { int oldbit; @@ -74,7 +78,8 @@ static __inline__ int test_bit(int nr, void * addr) /* * Find-bit routines.. */ -static __inline__ int find_first_zero_bit(void * addr, unsigned size) +static __inline__ int +find_first_zero_bit(void *addr, unsigned size) { int res; int _count = (size + 31) >> 5; @@ -99,7 +104,8 @@ static __inline__ int find_first_zero_bit(void * addr, unsigned size) return res; } -static __inline__ int find_next_zero_bit (void * addr, int size, int offset) +static __inline__ int +find_next_zero_bit(void *addr, int size, int offset) { unsigned long * p = ((unsigned long *) addr) + (offset >> 5); int set = 0, bit = offset & 31, res; @@ -131,7 +137,8 @@ static __inline__ int find_next_zero_bit (void * addr, int size, int offset) * ffz = Find First Zero in word. Undefined if no zero exists, * so code should check against ~0UL first.. */ -static __inline__ unsigned long ffz(unsigned long word) +static __inline__ unsigned long +ffz(unsigned long word) { __asm__("bsfl %1,%0" :"=r" (word) @@ -145,7 +152,8 @@ static __inline__ unsigned long ffz(unsigned long word) /* * find the first occurrence of byte 'c', or 1 past the area if none */ -static __inline__ char * memscan(void * addr, unsigned char c, int size) +static __inline__ char * +memscan(void *addr, unsigned char c, int size) { if (!size) return addr; diff --git a/sys/vfs/hpfs/hpfs_alsubr.c b/sys/vfs/hpfs/hpfs_alsubr.c index e28ba5b032..88f5b38e39 100644 --- a/sys/vfs/hpfs/hpfs_alsubr.c +++ b/sys/vfs/hpfs/hpfs_alsubr.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/hpfs/hpfs_alsubr.c,v 1.1 1999/12/09 19:09:58 semenu Exp $ - * $DragonFly: src/sys/vfs/hpfs/hpfs_alsubr.c,v 1.5 2004/04/11 18:17:21 cpressey Exp $ + * $DragonFly: src/sys/vfs/hpfs/hpfs_alsubr.c,v 1.6 2006/01/13 21:09:27 swildner Exp $ */ #include @@ -532,13 +532,17 @@ retry: * Descent down to the end of tree, then search for * ralp->len contignous run begining from last run's end and * concatenate new block! If we can't find one, then... + * + * Parameters: + * hpmp: Mix info + * rlsn: LSN containing AlSec + * ralp: AlLeaf to insert + * ranp: New AlNodes' values + * resp: Mix returning info */ int -hpfs_addextentr(struct hpfsmount *hpmp, /* Mix info */ - lsn_t rlsn, /* LSN containing AlSec */ - alleaf_t *ralp, /* AlLeaf to insert */ - alnode_t *ranp, /* New AlNodes' values */ - u_long *resp) /* Mix returning info */ +hpfs_addextentr(struct hpfsmount *hpmp, lsn_t rlsn, alleaf_t *ralp, + alnode_t *ranp, u_long *resp) { struct buf *rbp; alsec_t *rasp; diff --git a/sys/vfs/hpfs/hpfs_vfsops.c b/sys/vfs/hpfs/hpfs_vfsops.c index 07a06d4496..a6c5898b52 100644 --- a/sys/vfs/hpfs/hpfs_vfsops.c +++ b/sys/vfs/hpfs/hpfs_vfsops.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/hpfs/hpfs_vfsops.c,v 1.3.2.2 2001/12/25 01:44:45 dillon Exp $ - * $DragonFly: src/sys/vfs/hpfs/hpfs_vfsops.c,v 1.30 2005/09/17 07:43:07 dillon Exp $ + * $DragonFly: src/sys/vfs/hpfs/hpfs_vfsops.c,v 1.31 2006/01/13 21:09:27 swildner Exp $ */ @@ -338,7 +338,7 @@ failed: brelse (bp); mp->mnt_data = (qaddr_t)NULL; dev->si_mountpoint = NULL; - (void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, td); + VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, td); return (error); } diff --git a/sys/vfs/isofs/cd9660/cd9660_vfsops.c b/sys/vfs/isofs/cd9660/cd9660_vfsops.c index 0ea374d1f0..043163afaf 100644 --- a/sys/vfs/isofs/cd9660/cd9660_vfsops.c +++ b/sys/vfs/isofs/cd9660/cd9660_vfsops.c @@ -37,7 +37,7 @@ * * @(#)cd9660_vfsops.c 8.18 (Berkeley) 5/22/95 * $FreeBSD: src/sys/isofs/cd9660/cd9660_vfsops.c,v 1.74.2.7 2002/04/08 09:39:29 bde Exp $ - * $DragonFly: src/sys/vfs/isofs/cd9660/cd9660_vfsops.c,v 1.28 2005/09/17 07:43:08 dillon Exp $ + * $DragonFly: src/sys/vfs/isofs/cd9660/cd9660_vfsops.c,v 1.29 2006/01/13 21:09:27 swildner Exp $ */ #include @@ -159,7 +159,7 @@ iso_mountroot(struct mount *mp, struct thread *td) args.ssector = iso_get_ssector(rootdev, td); - (void)VOP_CLOSE(rootvp, FREAD, td); + VOP_CLOSE(rootvp, FREAD, td); if (bootverbose) printf("iso_mountroot(): using session at block %d\n", @@ -167,7 +167,7 @@ iso_mountroot(struct mount *mp, struct thread *td) if ((error = iso_mountfs(rootvp, mp, td, &args)) != 0) return (error); - (void)cd9660_statfs(mp, &mp->mnt_stat, td); + cd9660_statfs(mp, &mp->mnt_stat, td); return (0); } @@ -254,10 +254,10 @@ cd9660_mount(struct mount *mp, char *path, caddr_t data, struct thread *td) return error; } imp = VFSTOISOFS(mp); - (void) copyinstr(args.fspec, mp->mnt_stat.f_mntfromname, MNAMELEN - 1, + copyinstr(args.fspec, mp->mnt_stat.f_mntfromname, MNAMELEN - 1, &size); bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size); - (void) cd9660_statfs(mp, &mp->mnt_stat, td); + cd9660_statfs(mp, &mp->mnt_stat, td); return 0; } @@ -525,7 +525,7 @@ out: if (supbp) brelse(supbp); if (needclose) - (void)VOP_CLOSE(devvp, FREAD, td); + VOP_CLOSE(devvp, FREAD, td); if (isomp) { free((caddr_t)isomp, M_ISOFSMNT); mp->mnt_data = (qaddr_t)0; diff --git a/sys/vfs/isofs/cd9660/cd9660_vnops.c b/sys/vfs/isofs/cd9660/cd9660_vnops.c index a7cc624710..89ebf76794 100644 --- a/sys/vfs/isofs/cd9660/cd9660_vnops.c +++ b/sys/vfs/isofs/cd9660/cd9660_vnops.c @@ -37,7 +37,7 @@ * * @(#)cd9660_vnops.c 8.19 (Berkeley) 5/27/95 * $FreeBSD: src/sys/isofs/cd9660/cd9660_vnops.c,v 1.62 1999/12/15 23:01:51 eivind Exp $ - * $DragonFly: src/sys/vfs/isofs/cd9660/cd9660_vnops.c,v 1.17 2005/09/14 01:13:37 dillon Exp $ + * $DragonFly: src/sys/vfs/isofs/cd9660/cd9660_vnops.c,v 1.18 2006/01/13 21:09:27 swildner Exp $ */ #include @@ -834,14 +834,7 @@ cd9660_putpages(struct vop_putpages_args *ap) * Advisory lock support */ static int -cd9660_advlock(ap) - struct vop_advlock_args /* { - struct vnode *a_vp; - caddr_t a_id; - int a_op; - struct flock *a_fl; - int a_flags; - } */ *ap; +cd9660_advlock(struct vop_advlock_args *ap) { struct iso_node *ip = VTOI(ap->a_vp); return (lf_advlock(ap, &(ip->i_lockf), ip->i_size)); diff --git a/sys/vfs/isofs/cd9660/iso.h b/sys/vfs/isofs/cd9660/iso.h index 6a38818b9d..d8ae5cc535 100644 --- a/sys/vfs/isofs/cd9660/iso.h +++ b/sys/vfs/isofs/cd9660/iso.h @@ -37,7 +37,7 @@ * * @(#)iso.h 8.6 (Berkeley) 5/10/95 * $FreeBSD: src/sys/isofs/cd9660/iso.h,v 1.19.2.1 2000/07/08 14:35:56 bp Exp $ - * $DragonFly: src/sys/vfs/isofs/cd9660/iso.h,v 1.5 2004/08/17 18:57:33 dillon Exp $ + * $DragonFly: src/sys/vfs/isofs/cd9660/iso.h,v 1.6 2006/01/13 21:09:27 swildner Exp $ */ #define ISODCL(from, to) (to - from + 1) @@ -277,16 +277,14 @@ ino_t isodirino (struct iso_directory_record *, struct iso_mnt *); static __inline int isonum_711 (u_char *); static __inline int -isonum_711(p) - u_char *p; +isonum_711(u_char *p) { return *p; } static __inline int isonum_712 (char *); static __inline int -isonum_712(p) - char *p; +isonum_712(char *p) { return *p; } @@ -295,16 +293,14 @@ isonum_712(p) static __inline int isonum_723 (u_char *); static __inline int -isonum_723(p) - u_char *p; +isonum_723(u_char *p) { return *p|(p[1] << 8); } static __inline int isonum_733 (u_char *); static __inline int -isonum_733(p) - u_char *p; +isonum_733(u_char *p) { return *p|(p[1] << 8)|(p[2] << 16)|(p[3] << 24); } @@ -314,15 +310,13 @@ isonum_733(p) #if BYTE_ORDER == LITTLE_ENDIAN static __inline int -isonum_723(p) - u_char *p +isonum_723(u_char *p) { return *(u_int16t *)p; } static __inline int -isonum_733(p) - u_char *p; +isonum_733(u_char *p) { return *(u_int32t *)p; } @@ -332,15 +326,13 @@ isonum_733(p) #if BYTE_ORDER == BIG_ENDIAN static __inline int -isonum_723(p) - u_char *p +isonum_723(u_char *p) { return *(u_int16t *)(p + 2); } static __inline int -isonum_733(p) - u_char *p; +isonum_733(u_char *p) { return *(u_int32t *)(p + 4); } diff --git a/sys/vfs/mfs/mfs_vfsops.c b/sys/vfs/mfs/mfs_vfsops.c index 2645393c17..6010f31522 100644 --- a/sys/vfs/mfs/mfs_vfsops.c +++ b/sys/vfs/mfs/mfs_vfsops.c @@ -32,7 +32,7 @@ * * @(#)mfs_vfsops.c 8.11 (Berkeley) 6/19/95 * $FreeBSD: src/sys/ufs/mfs/mfs_vfsops.c,v 1.81.2.3 2001/07/04 17:35:21 tegge Exp $ - * $DragonFly: src/sys/vfs/mfs/mfs_vfsops.c,v 1.23 2005/07/26 15:43:35 hmp Exp $ + * $DragonFly: src/sys/vfs/mfs/mfs_vfsops.c,v 1.24 2006/01/13 21:09:27 swildner Exp $ */ @@ -333,7 +333,7 @@ mfs_mount(struct mount *mp, char *path, caddr_t data, struct thread *td) * * This code is common to root and non-root mounts */ - (void) VFS_STATFS(mp, &mp->mnt_stat, td); + VFS_STATFS(mp, &mp->mnt_stat, td); goto success; diff --git a/sys/vfs/msdosfs/msdosfs_denode.c b/sys/vfs/msdosfs/msdosfs_denode.c index fdf8d74e28..931aecb552 100644 --- a/sys/vfs/msdosfs/msdosfs_denode.c +++ b/sys/vfs/msdosfs/msdosfs_denode.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/msdosfs/msdosfs_denode.c,v 1.47.2.3 2002/08/22 16:20:15 trhodes Exp $ */ -/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_denode.c,v 1.19 2004/12/17 00:18:26 dillon Exp $ */ +/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_denode.c,v 1.20 2006/01/13 21:09:27 swildner Exp $ */ /* $NetBSD: msdosfs_denode.c,v 1.28 1998/02/10 14:10:00 mrg Exp $ */ /*- @@ -636,7 +636,7 @@ deextend(struct denode *dep, u_long length) error = extendfile(dep, count, NULL, NULL, DE_CLEAR); if (error) { /* truncate the added clusters away again */ - (void) detrunc(dep, dep->de_FileSize, 0, NULL); + detrunc(dep, dep->de_FileSize, 0, NULL); return (error); } } diff --git a/sys/vfs/msdosfs/msdosfs_lookup.c b/sys/vfs/msdosfs/msdosfs_lookup.c index 7c9d2fe994..f0224d7ecc 100644 --- a/sys/vfs/msdosfs/msdosfs_lookup.c +++ b/sys/vfs/msdosfs/msdosfs_lookup.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/msdosfs/msdosfs_lookup.c,v 1.30.2.1 2000/11/03 15:55:39 bp Exp $ */ -/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_lookup.c,v 1.14 2005/09/14 01:13:38 dillon Exp $ */ +/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_lookup.c,v 1.15 2006/01/13 21:09:27 swildner Exp $ */ /* $NetBSD: msdosfs_lookup.c,v 1.37 1997/11/17 15:36:54 ws Exp $ */ /*- @@ -576,7 +576,7 @@ createde(struct denode *dep, struct denode *ddep, struct denode **depp, dirclust = de_clcount(pmp, diroffset); error = extendfile(ddep, dirclust, 0, 0, DE_CLEAR); if (error) { - (void)detrunc(ddep, ddep->de_FileSize, 0, NULL); + detrunc(ddep, ddep->de_FileSize, 0, NULL); return error; } diff --git a/sys/vfs/msdosfs/msdosfs_vfsops.c b/sys/vfs/msdosfs/msdosfs_vfsops.c index d58e683e33..aa888954ef 100644 --- a/sys/vfs/msdosfs/msdosfs_vfsops.c +++ b/sys/vfs/msdosfs/msdosfs_vfsops.c @@ -1,5 +1,5 @@ /* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/msdosfs/Attic/msdosfs_vfsops.c,v 1.60.2.8 2004/03/02 09:43:04 tjr Exp $ */ -/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_vfsops.c,v 1.28 2005/09/17 07:43:10 dillon Exp $ */ +/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_vfsops.c,v 1.29 2006/01/13 21:09:27 swildner Exp $ */ /* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */ /*- @@ -287,10 +287,9 @@ msdosfs_mount(struct mount *mp, char *path, caddr_t data, struct thread *td) return error; } - (void) copyinstr(args.fspec, mp->mnt_stat.f_mntfromname, MNAMELEN - 1, - &size); + copyinstr(args.fspec, mp->mnt_stat.f_mntfromname, MNAMELEN - 1, &size); bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size); - (void) msdosfs_statfs(mp, &mp->mnt_stat, td); + msdosfs_statfs(mp, &mp->mnt_stat, td); #ifdef MSDOSFS_DEBUG printf("msdosfs_mount(): mp %p, pmp %p, inusemap %p\n", mp, pmp, pmp->pm_inusemap); #endif @@ -670,7 +669,7 @@ mountmsdosfs(struct vnode *devvp, struct mount *mp, struct thread *td, error_exit: if (bp) brelse(bp); - (void) VOP_CLOSE(devvp, ronly ? FREAD : FREAD | FWRITE, td); + VOP_CLOSE(devvp, ronly ? FREAD : FREAD | FWRITE, td); if (pmp) { if (pmp->pm_inusemap) free(pmp->pm_inusemap, M_MSDOSFSFAT); diff --git a/sys/vfs/msdosfs/msdosfs_vnops.c b/sys/vfs/msdosfs/msdosfs_vnops.c index 6fda344c33..ecd7bc3f17 100644 --- a/sys/vfs/msdosfs/msdosfs_vnops.c +++ b/sys/vfs/msdosfs/msdosfs_vnops.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/msdosfs/msdosfs_vnops.c,v 1.95.2.4 2003/06/13 15:05:47 trhodes Exp $ */ -/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_vnops.c,v 1.27 2005/09/14 01:13:38 dillon Exp $ */ +/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_vnops.c,v 1.28 2006/01/13 21:09:27 swildner Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.68 1998/02/10 14:10:04 mrg Exp $ */ /*- @@ -789,7 +789,7 @@ msdosfs_write(struct vop_write_args *ap) * may want to write somemore into the block later. */ if (ioflag & IO_SYNC) - (void) bwrite(bp); + bwrite(bp); else if (n + croffset == pmp->pm_bpcluster) bawrite(bp); else -- 2.41.0