Module Name: src Committed By: christos Date: Fri Oct 18 15:15:22 UTC 2013
Modified Files: src/sys/ufs/lfs: lfs_vnops.c ulfs_bswap.h ulfs_quota2.c Log Message: use __USE() in the right place, instead of (void)var. To generate a diff of this commit: cvs rdiff -u -r1.258 -r1.259 src/sys/ufs/lfs/lfs_vnops.c cvs rdiff -u -r1.5 -r1.6 src/sys/ufs/lfs/ulfs_bswap.h cvs rdiff -u -r1.13 -r1.14 src/sys/ufs/lfs/ulfs_quota2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/ufs/lfs/lfs_vnops.c diff -u src/sys/ufs/lfs/lfs_vnops.c:1.258 src/sys/ufs/lfs/lfs_vnops.c:1.259 --- src/sys/ufs/lfs/lfs_vnops.c:1.258 Thu Oct 17 17:01:08 2013 +++ src/sys/ufs/lfs/lfs_vnops.c Fri Oct 18 11:15:22 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_vnops.c,v 1.258 2013/10/17 21:01:08 christos Exp $ */ +/* $NetBSD: lfs_vnops.c,v 1.259 2013/10/18 15:15:22 christos Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.258 2013/10/17 21:01:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.259 2013/10/18 15:15:22 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -621,7 +621,6 @@ lfs_mknod(void *v) if (vap->va_rdev != VNOVAL) { struct ulfsmount *ump = ip->i_ump; struct lfs *fs = ip->i_lfs; - (void)fs; /* temporary: needed when LFS_EI is off */ /* * Want to be able to use this to make badblock * inodes, so don't truncate the dev number. Index: src/sys/ufs/lfs/ulfs_bswap.h diff -u src/sys/ufs/lfs/ulfs_bswap.h:1.5 src/sys/ufs/lfs/ulfs_bswap.h:1.6 --- src/sys/ufs/lfs/ulfs_bswap.h:1.5 Thu Oct 17 17:01:08 2013 +++ src/sys/ufs/lfs/ulfs_bswap.h Fri Oct 18 11:15:22 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ulfs_bswap.h,v 1.5 2013/10/17 21:01:08 christos Exp $ */ +/* $NetBSD: ulfs_bswap.h,v 1.6 2013/10/18 15:15:22 christos Exp $ */ /* from NetBSD: ufs_bswap.h,v 1.19 2009/10/19 18:41:17 bouyer Exp */ /* @@ -41,9 +41,9 @@ #define ULFS_FSNEEDSWAP(fs) ((fs)->fs_flags & FS_SWAPPED) #define ULFS_IPNEEDSWAP(ip) ULFS_MPNEEDSWAP((ip)->i_lfs) #else -#define ULFS_MPNEEDSWAP(ump) (0) -#define ULFS_FSNEEDSWAP(fs) (0) -#define ULFS_IPNEEDSWAP(ip) (0) +#define ULFS_MPNEEDSWAP(ump) (__USE(ump), 0) +#define ULFS_FSNEEDSWAP(fs) (__USE(fs), 0) +#define ULFS_IPNEEDSWAP(ip) (__USE(ip), 0) #endif #if !defined(_KERNEL) || defined(LFS_EI) Index: src/sys/ufs/lfs/ulfs_quota2.c diff -u src/sys/ufs/lfs/ulfs_quota2.c:1.13 src/sys/ufs/lfs/ulfs_quota2.c:1.14 --- src/sys/ufs/lfs/ulfs_quota2.c:1.13 Mon Jul 29 12:40:46 2013 +++ src/sys/ufs/lfs/ulfs_quota2.c Fri Oct 18 11:15:22 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ulfs_quota2.c,v 1.13 2013/07/29 16:40:46 dholland Exp $ */ +/* $NetBSD: ulfs_quota2.c,v 1.14 2013/10/18 15:15:22 christos Exp $ */ /* from NetBSD: ufs_quota2.c,v 1.35 2012/09/27 07:47:56 bouyer Exp */ /* from NetBSD: ffs_quota2.c,v 1.4 2011/06/12 03:36:00 rmind Exp */ @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ulfs_quota2.c,v 1.13 2013/07/29 16:40:46 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ulfs_quota2.c,v 1.14 2013/10/18 15:15:22 christos Exp $"); #include <sys/buf.h> #include <sys/param.h> @@ -142,10 +142,8 @@ static int getq2h(struct ulfsmount *ump, int type, struct buf **bpp, struct quota2_header **q2hp, int flags) { -#ifdef LFS_EI struct lfs *fs = ump->um_lfs; const int needswap = ULFS_MPNEEDSWAP(fs); -#endif int error; struct buf *bp; struct quota2_header *q2h; @@ -199,10 +197,8 @@ quota2_walk_list(struct ulfsmount *ump, uint64_t *offp, int flags, void *a, int (*func)(struct ulfsmount *, uint64_t *, struct quota2_entry *, uint64_t, void *)) { -#ifdef LFS_EI struct lfs *fs = ump->um_lfs; const int needswap = ULFS_MPNEEDSWAP(fs); -#endif daddr_t off = ulfs_rw64(*offp, needswap); struct buf *bp, *obp = hbp; int ret = 0, ret2 = 0; @@ -308,8 +304,6 @@ quota2_q2ealloc(struct ulfsmount *ump, i struct lfs *fs = ump->um_lfs; const int needswap = ULFS_MPNEEDSWAP(fs); - (void)fs; /* temporary: needed when LFS_EI is off */ - KASSERT(mutex_owned(&dq->dq_interlock)); KASSERT(mutex_owned(&lfs_dqlock)); error = getq2h(ump, type, &hbp, &q2h, B_MODIFY); @@ -459,8 +453,6 @@ quota2_check(struct inode *ip, int vtype const int needswap = ULFS_MPNEEDSWAP(fs); int i; - (void)fs; /* temporary: needed when LFS_EI is off */ - if ((error = getinoquota2(ip, change > 0, change != 0, bp, q2e)) != 0) return error; if (change == 0) { @@ -597,8 +589,6 @@ lfsquota2_handle_cmd_put(struct ulfsmoun struct lfs *fs = ump->um_lfs; const int needswap = ULFS_MPNEEDSWAP(fs); - (void)fs; /* temporary: needed when LFS_EI is off */ - /* make sure we can index by the fs-independent idtype */ CTASSERT(QUOTA_IDTYPE_USER == ULFS_USRQUOTA); CTASSERT(QUOTA_IDTYPE_GROUP == ULFS_GRPQUOTA); @@ -804,8 +794,6 @@ quota2_fetch_q2e(struct ulfsmount *ump, struct lfs *fs = ump->um_lfs; const int needswap = ULFS_MPNEEDSWAP(fs); - (void)fs; /* temporary: needed when LFS_EI is off */ - error = lfs_dqget(NULLVP, qk->qk_id, ump, qk->qk_idtype, &dq); if (error) return error; @@ -843,8 +831,6 @@ quota2_fetch_quotaval(struct ulfsmount * const int needswap = ULFS_MPNEEDSWAP(fs); id_t id2; - (void)fs; /* temporary: needed when LFS_EI is off */ - error = lfs_dqget(NULLVP, qk->qk_id, ump, qk->qk_idtype, &dq); if (error) return error; @@ -884,8 +870,6 @@ lfsquota2_handle_cmd_get(struct ulfsmoun const int needswap = ULFS_MPNEEDSWAP(fs); id_t id2; - (void)fs; /* temporary: needed when LFS_EI is off */ - /* * Make sure the FS-independent codes match the internal ones, * so we can use the passed-in objtype without having to @@ -1146,8 +1130,6 @@ q2cursor_getkeys(struct ulfsmount *ump, uint64_t offset; int error; - (void)fs; /* temporary: needed when LFS_EI is off */ - /* * Read the header block. */