Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/lfs use __USE() in the right place, instead of (void...



details:   https://anonhg.NetBSD.org/src/rev/b51a6e829df6
branches:  trunk
changeset: 790615:b51a6e829df6
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Oct 18 15:15:22 2013 +0000

description:
use __USE() in the right place, instead of (void)var.

diffstat:

 sys/ufs/lfs/lfs_vnops.c   |   5 ++---
 sys/ufs/lfs/ulfs_bswap.h  |   8 ++++----
 sys/ufs/lfs/ulfs_quota2.c |  22 ++--------------------
 3 files changed, 8 insertions(+), 27 deletions(-)

diffs (151 lines):

diff -r b136a80f9b83 -r b51a6e829df6 sys/ufs/lfs/lfs_vnops.c
--- a/sys/ufs/lfs/lfs_vnops.c   Fri Oct 18 14:14:14 2013 +0000
+++ b/sys/ufs/lfs/lfs_vnops.c   Fri Oct 18 15:15:22 2013 +0000
@@ -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 @@
        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.
diff -r b136a80f9b83 -r b51a6e829df6 sys/ufs/lfs/ulfs_bswap.h
--- a/sys/ufs/lfs/ulfs_bswap.h  Fri Oct 18 14:14:14 2013 +0000
+++ b/sys/ufs/lfs/ulfs_bswap.h  Fri Oct 18 15:15:22 2013 +0000
@@ -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)
diff -r b136a80f9b83 -r b51a6e829df6 sys/ufs/lfs/ulfs_quota2.c
--- a/sys/ufs/lfs/ulfs_quota2.c Fri Oct 18 14:14:14 2013 +0000
+++ b/sys/ufs/lfs/ulfs_quota2.c Fri Oct 18 15:15:22 2013 +0000
@@ -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 @@
 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 @@
     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 @@
        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 @@
        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 @@
        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 @@
        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 @@
        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 @@
        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 @@
        uint64_t offset;
        int error;
 
-       (void)fs; /* temporary: needed when LFS_EI is off */
-
        /*
         * Read the header block.
         */



Home | Main Index | Thread Index | Old Index