Source-Changes-HG archive

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

[src/trunk]: src/sys fix unused



details:   https://anonhg.NetBSD.org/src/rev/a6b21b1ff4c9
branches:  trunk
changeset: 328014:a6b21b1ff4c9
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Mar 23 09:30:59 2014 +0000

description:
fix unused

diffstat:

 sys/compat/ndis/subr_ndis.c              |  15 +++++----------
 sys/compat/ndis/subr_ntoskrnl.c          |   8 ++++----
 sys/dev/raidframe/rf_decluster.c         |  12 ++++--------
 sys/dev/raidframe/rf_declusterPQ.c       |  17 ++++++-----------
 sys/dev/raidframe/rf_evenodd.c           |   9 +++------
 sys/dev/raidframe/rf_evenodd_dagfuncs.c  |  15 +++++++--------
 sys/dev/raidframe/rf_parityloggingdags.c |  15 +++------------
 sys/fs/udf/udf_strat_sequential.c        |   5 +++--
 sys/fs/udf/udf_subr.c                    |   8 ++++++--
 sys/fs/udf/udf_vnops.c                   |   5 +++--
 10 files changed, 44 insertions(+), 65 deletions(-)

diffs (truncated from 518 to 300 lines):

diff -r 1204216fede5 -r a6b21b1ff4c9 sys/compat/ndis/subr_ndis.c
--- a/sys/compat/ndis/subr_ndis.c       Sun Mar 23 06:03:38 2014 +0000
+++ b/sys/compat/ndis/subr_ndis.c       Sun Mar 23 09:30:59 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_ndis.c,v 1.26 2012/02/03 23:38:07 christos Exp $  */
+/*     $NetBSD: subr_ndis.c,v 1.27 2014/03/23 09:31:15 christos Exp $  */
 
 /*-
  * Copyright (c) 2003
@@ -37,7 +37,7 @@
 __FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.67.2.7 2005/03/31 21:50:11 wpaul Exp $");
 #endif
 #ifdef __NetBSD__
-__KERNEL_RCSID(0, "$NetBSD: subr_ndis.c,v 1.26 2012/02/03 23:38:07 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_ndis.c,v 1.27 2014/03/23 09:31:15 christos Exp $");
 #endif
 
 /*
@@ -718,7 +718,6 @@
 NdisReadConfiguration(ndis_status *status, ndis_config_parm **parm, ndis_handle cfg, ndis_unicode_string *key, ndis_parm_type type)
 {
        char                    *keystr = NULL;
-       uint16_t                *unicode;
        ndis_miniport_block     *block;
        struct ndis_softc       *sc;
 #ifdef __FreeBSD__     
@@ -729,7 +728,6 @@
 #ifdef __NetBSD__
        const struct sysctlnode *pnode = NULL;
        struct sysctlnode *ndiscld = NULL;
-       int error;
        int numcld;
        int mib[1];
        int i;
@@ -753,7 +751,6 @@
        ndis_unicode_to_ascii(key->us_buf, key->us_len, &keystr);
        *parm = &block->nmb_replyparm;
        memset((char *)&block->nmb_replyparm, 0, sizeof(ndis_config_parm));
-       unicode = (uint16_t *)&block->nmb_dummybuf;
        
 #ifdef __NetBSD__      
        if(strlen(keystr) + strlen("ndis_") > MAX_SYSCTL_LEN) {
@@ -796,7 +793,7 @@
        mib[0] = sc->ndis_sysctl_mib;
        
        sysctl_lock(false);
-               error = sysctl_locate(curlwp, &mib[0], 1, &pnode, NULL);
+               sysctl_locate(curlwp, &mib[0], 1, &pnode, NULL);
        
                numcld  = pnode->sysctl_csize;
                ndiscld = pnode->sysctl_child;
@@ -1043,7 +1040,6 @@
 #endif
 
        /* PN(NdisReadPciSlotInformation) */
-       device_t                dev;
     struct ndis_softc  *sc;
 
        block = (ndis_miniport_block *)adapter;
@@ -1051,8 +1047,8 @@
        if (block == NULL)
                return(0);
 
-       dev = (device_t)block->nmb_physdeviceobj->do_devext;
 #ifdef __FreeBSD__     
+       device_t dev = (device_t)block->nmb_physdeviceobj->do_devext;
     sc = device_get_softc(dev);
 #else /* __NetBSD__ */
        sc = (struct ndis_softc *)block->nmb_physdeviceobj->pdo_sc;
@@ -1106,7 +1102,6 @@
     pcireg_t    *dest;
 #endif
 
-       device_t                dev;
 
        /* PN(NdisWritePciSlotInformation) */
        
@@ -1118,8 +1113,8 @@
        if (block == NULL)
                return(0);
 
-       dev = block->nmb_physdeviceobj->do_devext;
 #ifdef __FreeBSD__     
+    device_t dev = block->nmb_physdeviceobj->do_devext;
     sc = device_get_softc(dev);
 #else /* __NetBSD__ */
        sc = (struct ndis_softc *)block->nmb_physdeviceobj->pdo_sc;
diff -r 1204216fede5 -r a6b21b1ff4c9 sys/compat/ndis/subr_ntoskrnl.c
--- a/sys/compat/ndis/subr_ntoskrnl.c   Sun Mar 23 06:03:38 2014 +0000
+++ b/sys/compat/ndis/subr_ntoskrnl.c   Sun Mar 23 09:30:59 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_ntoskrnl.c,v 1.22 2012/02/03 23:39:59 christos Exp $      */
+/*     $NetBSD: subr_ntoskrnl.c,v 1.23 2014/03/23 09:31:15 christos Exp $      */
 
 /*-
  * Copyright (c) 2003
@@ -37,7 +37,7 @@
 __FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.43.2.5 2005/03/31 04:24:36 wpaul Exp $");
 #endif
 #ifdef __NetBSD__
-__KERNEL_RCSID(0, "$NetBSD: subr_ntoskrnl.c,v 1.22 2012/02/03 23:39:59 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_ntoskrnl.c,v 1.23 2014/03/23 09:31:15 christos Exp $");
 #endif
 
 #ifdef __FreeBSD__
@@ -1001,9 +1001,9 @@
 ntoskrnl_wakeup(void *arg)
 {
        nt_dispatch_header      *obj;
-       wait_block              *w;
        list_entry              *e;
 #ifdef __FreeBSD__
+       wait_block              *w;
        struct thread           *td;
 #endif
 
@@ -1012,9 +1012,9 @@
        obj->dh_sigstate = TRUE;
        e = obj->dh_waitlisthead.nle_flink;
        while (e != &obj->dh_waitlisthead) {
-               w = (wait_block *)e;
 /* TODO: is this correct? */           
 #ifdef __FreeBSD__
+               w = (wait_block *)e;
                td = w->wb_kthread;
                ndis_thresume(td->td_proc);
 #else
diff -r 1204216fede5 -r a6b21b1ff4c9 sys/dev/raidframe/rf_decluster.c
--- a/sys/dev/raidframe/rf_decluster.c  Sun Mar 23 06:03:38 2014 +0000
+++ b/sys/dev/raidframe/rf_decluster.c  Sun Mar 23 09:30:59 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_decluster.c,v 1.23 2011/08/31 18:31:02 plunky Exp $ */
+/*     $NetBSD: rf_decluster.c,v 1.24 2014/03/23 09:30:59 christos Exp $       */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -48,7 +48,7 @@
  *--------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_decluster.c,v 1.23 2011/08/31 18:31:02 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_decluster.c,v 1.24 2014/03/23 09:30:59 christos Exp $");
 
 #include <dev/raidframe/raidframevar.h>
 
@@ -382,7 +382,7 @@
        RF_DeclusteredConfigInfo_t *info = (RF_DeclusteredConfigInfo_t *) layoutPtr->layoutSpecificInfo;
        RF_StripeNum_t SUID = raidSector / layoutPtr->sectorsPerStripeUnit;
        RF_StripeNum_t FullTableID, FullTableOffset, TableID, TableOffset;
-       RF_StripeNum_t BlockID, BlockOffset, RepIndex;
+       RF_StripeNum_t BlockID, RepIndex;
        RF_StripeCount_t sus_per_fulltable = info->SUsPerFullTable;
        RF_StripeCount_t fulltable_depth = info->FullTableDepthInPUs * layoutPtr->SUsPerPU;
        RF_StripeNum_t base_suid = 0, outSU, SpareRegion = 0, SpareSpace = 0;
@@ -404,8 +404,6 @@
        /* BlockID         = (TableOffset / info->PUsPerBlock) %
         * info->BlocksPerTable; */
        BlockID = TableOffset / info->PUsPerBlock;
-       /* BlockOffset     = TableOffset % info->PUsPerBlock; */
-       BlockOffset = TableOffset - BlockID * info->PUsPerBlock;
        BlockID %= info->BlocksPerTable;
 
        /* the parity block is in the position indicated by RepIndex */
@@ -445,12 +443,10 @@
        RF_StripeCount_t fulltable_depth = info->FullTableDepthInPUs * layoutPtr->SUsPerPU;
        RF_StripeNum_t base_suid = 0;
        RF_StripeNum_t SUID = rf_RaidAddressToStripeUnitID(layoutPtr, addr);
-       RF_StripeNum_t stripeID, FullTableID;
+       RF_StripeNum_t stripeID;
        int     tableOffset;
 
        rf_decluster_adjust_params(layoutPtr, &SUID, &sus_per_fulltable, &fulltable_depth, &base_suid);
-       FullTableID = SUID / sus_per_fulltable; /* fulltable ID within array
-                                                * (across rows) */
        stripeID = rf_StripeUnitIDToStripeID(layoutPtr, SUID);  /* find stripe offset
                                                                 * into array */
        tableOffset = (stripeID % info->BlocksPerTable);        /* find offset into
diff -r 1204216fede5 -r a6b21b1ff4c9 sys/dev/raidframe/rf_declusterPQ.c
--- a/sys/dev/raidframe/rf_declusterPQ.c        Sun Mar 23 06:03:38 2014 +0000
+++ b/sys/dev/raidframe/rf_declusterPQ.c        Sun Mar 23 09:30:59 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_declusterPQ.c,v 1.15 2006/11/16 01:33:23 christos Exp $     */
+/*     $NetBSD: rf_declusterPQ.c,v 1.16 2014/03/23 09:30:59 christos Exp $     */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -35,7 +35,7 @@
  *--------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_declusterPQ.c,v 1.15 2006/11/16 01:33:23 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_declusterPQ.c,v 1.16 2014/03/23 09:30:59 christos Exp $");
 
 #include <dev/raidframe/raidframevar.h>
 
@@ -56,7 +56,7 @@
                          RF_Config_t *cfgPtr)
 {
        RF_RaidLayout_t *layoutPtr = &(raidPtr->Layout);
-       int     b, v, k, r, lambda;     /* block design params */
+       int     b, v, k, r;     /* block design params */
        int     i, j, l;
        int    *first_avail_slot;
        int     complete_FT_count, SUID;
@@ -78,7 +78,6 @@
        cfgBuf += sizeof(int);
        r = *((int *) cfgBuf);
        cfgBuf += sizeof(int);
-       lambda = *((int *) cfgBuf);
        cfgBuf += sizeof(int);
        raidPtr->noRotate = *((int *) cfgBuf);
        cfgBuf += sizeof(int);
@@ -350,7 +349,7 @@
        RF_DeclusteredConfigInfo_t *info = (RF_DeclusteredConfigInfo_t *) layoutPtr->layoutSpecificInfo;
        RF_StripeNum_t SUID = raidSector / layoutPtr->sectorsPerStripeUnit;
        RF_StripeNum_t FullTableID, FullTableOffset, TableID, TableOffset;
-       RF_StripeNum_t BlockID, BlockOffset, RepIndex;
+       RF_StripeNum_t BlockID, RepIndex;
        RF_StripeCount_t sus_per_fulltable = info->SUsPerFullTable;
        RF_StripeCount_t fulltable_depth = info->FullTableDepthInPUs * layoutPtr->SUsPerPU;
        RF_StripeNum_t base_suid = 0, outSU, SpareRegion, SpareSpace = 0;
@@ -370,7 +369,6 @@
        TableID = FullTableOffset / info->SUsPerTable;
        TableOffset = FullTableOffset - TableID * info->SUsPerTable;
        BlockID = TableOffset / info->PUsPerBlock;
-       BlockOffset = TableOffset - BlockID * info->PUsPerBlock;
        BlockID %= info->BlocksPerTable;
 
        /* the parity block is in the position indicated by RepIndex */
@@ -401,7 +399,7 @@
        RF_DeclusteredConfigInfo_t *info = (RF_DeclusteredConfigInfo_t *) layoutPtr->layoutSpecificInfo;
        RF_StripeNum_t SUID = raidSector / layoutPtr->sectorsPerStripeUnit;
        RF_StripeNum_t FullTableID, FullTableOffset, TableID, TableOffset;
-       RF_StripeNum_t BlockID, BlockOffset, RepIndex, RepIndexQ;
+       RF_StripeNum_t BlockID, RepIndex, RepIndexQ;
        RF_StripeCount_t sus_per_fulltable = info->SUsPerFullTable;
        RF_StripeCount_t fulltable_depth = info->FullTableDepthInPUs * layoutPtr->SUsPerPU;
        RF_StripeNum_t base_suid = 0, outSU, SpareRegion, SpareSpace = 0;
@@ -421,7 +419,6 @@
        TableID = FullTableOffset / info->SUsPerTable;
        TableOffset = FullTableOffset - TableID * info->SUsPerTable;
        BlockID = TableOffset / info->PUsPerBlock;
-       BlockOffset = TableOffset - BlockID * info->PUsPerBlock;
        BlockID %= info->BlocksPerTable;
 
        /* the q block is in the position indicated by RepIndex */
@@ -456,12 +453,10 @@
        RF_StripeCount_t fulltable_depth = info->FullTableDepthInPUs * layoutPtr->SUsPerPU;
        RF_StripeNum_t base_suid = 0;
        RF_StripeNum_t SUID = rf_RaidAddressToStripeUnitID(layoutPtr, addr);
-       RF_StripeNum_t stripeID, FullTableID;
+       RF_StripeNum_t stripeID;
        int     tableOffset;
 
        rf_decluster_adjust_params(layoutPtr, &SUID, &sus_per_fulltable, &fulltable_depth, &base_suid);
-       FullTableID = SUID / sus_per_fulltable; /* fulltable ID within array
-                                                * (across rows) */
        stripeID = rf_StripeUnitIDToStripeID(layoutPtr, SUID);  /* find stripe offset
                                                                 * into array */
        tableOffset = (stripeID % info->BlocksPerTable);        /* find offset into
diff -r 1204216fede5 -r a6b21b1ff4c9 sys/dev/raidframe/rf_evenodd.c
--- a/sys/dev/raidframe/rf_evenodd.c    Sun Mar 23 06:03:38 2014 +0000
+++ b/sys/dev/raidframe/rf_evenodd.c    Sun Mar 23 09:30:59 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_evenodd.c,v 1.20 2011/05/05 04:20:51 mrg Exp $      */
+/*     $NetBSD: rf_evenodd.c,v 1.21 2014/03/23 09:30:59 christos Exp $ */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -33,7 +33,7 @@
  ****************************************************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_evenodd.c,v 1.20 2011/05/05 04:20:51 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_evenodd.c,v 1.21 2014/03/23 09:30:59 christos Exp $");
 
 #include "rf_archs.h"
 
@@ -337,7 +337,7 @@
        int     numbytes = rf_RaidAddressToByte(raidPtr, numsector);
        int     bytesPerStripe = numbytes * layoutPtr->numDataCol;
        RF_DagHeader_t *rd_dag_h, *wr_dag_h;    /* read, write dag */
-       RF_DagNode_t *blockNode, *unblockNode, *wrBlock, *wrUnblock;
+       RF_DagNode_t *blockNode, *wrBlock;
        RF_AccessStripeMapHeader_t *asm_h;
        RF_AccessStripeMap_t *asmap;
        RF_AllocListElem_t *alloclist;
@@ -366,7 +366,6 @@
        rd_dag_h = rf_MakeSimpleDAG(raidPtr, stripeWidth, numbytes, buf, rf_DiskReadFunc, rf_DiskReadUndoFunc,
            "Rod", alloclist, flags, RF_IO_NORMAL_PRIORITY);
        blockNode = rd_dag_h->succedents[0];
-       unblockNode = blockNode->succedents[0]->succedents[0];
 
        /* map the stripe and fill in the PDAs in the dag */
        asm_h = rf_MapAccess(raidPtr, startAddr, layoutPtr->dataSectorsPerStripe, buf, RF_DONT_REMAP);
@@ -461,7 +460,6 @@
                wr_dag_h = rf_MakeSimpleDAG(raidPtr, 1, numbytes, pbuf, rf_DiskWriteFunc, rf_DiskWriteUndoFunc,
                    "Wnp", alloclist, flags, RF_IO_NORMAL_PRIORITY);
                wrBlock = wr_dag_h->succedents[0];
-               wrUnblock = wrBlock->succedents[0]->succedents[0];



Home | Main Index | Thread Index | Old Index