Nuke the 5 NULL parameters from rf_DoAccess(). Observe that 4 of
the variables are passed directly to rf_AllocRaidAccDesc(), and the 5th isn't even used. Hunt them down and nuke them too.
This commit is contained in:
parent
31cd64b605
commit
99020323e6
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rf_driver.c,v 1.40 2001/07/18 06:45:33 thorpej Exp $ */
|
||||
/* $NetBSD: rf_driver.c,v 1.41 2001/07/27 03:30:07 oster Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
@ -572,11 +572,7 @@ rf_AllocRaidAccDesc(
|
||||
RF_SectorCount_t numBlocks,
|
||||
caddr_t bufPtr,
|
||||
void *bp,
|
||||
RF_DagHeader_t ** paramDAG,
|
||||
RF_AccessStripeMapHeader_t ** paramASM,
|
||||
RF_RaidAccessFlags_t flags,
|
||||
void (*cbF) (struct buf *),
|
||||
void *cbA,
|
||||
RF_AccessState_t * states)
|
||||
{
|
||||
RF_RaidAccessDesc_t *desc;
|
||||
@ -600,16 +596,16 @@ rf_AllocRaidAccDesc(
|
||||
desc->numBlocks = numBlocks;
|
||||
desc->bufPtr = bufPtr;
|
||||
desc->bp = bp;
|
||||
desc->paramDAG = paramDAG;
|
||||
desc->paramASM = paramASM;
|
||||
desc->paramDAG = NULL;
|
||||
desc->paramASM = NULL;
|
||||
desc->flags = flags;
|
||||
desc->states = states;
|
||||
desc->state = 0;
|
||||
|
||||
desc->status = 0;
|
||||
memset((char *) &desc->tracerec, 0, sizeof(RF_AccTraceEntry_t));
|
||||
desc->callbackFunc = (void (*) (RF_CBParam_t)) cbF; /* XXX */
|
||||
desc->callbackArg = cbA;
|
||||
desc->callbackFunc = NULL;
|
||||
desc->callbackArg = NULL;
|
||||
desc->next = NULL;
|
||||
desc->head = desc;
|
||||
desc->numPending = 0;
|
||||
@ -648,12 +644,7 @@ rf_DoAccess(
|
||||
RF_SectorCount_t numBlocks,
|
||||
caddr_t bufPtr,
|
||||
void *bp_in,
|
||||
RF_DagHeader_t ** paramDAG,
|
||||
RF_AccessStripeMapHeader_t ** paramASM,
|
||||
RF_RaidAccessFlags_t flags,
|
||||
RF_RaidAccessDesc_t ** paramDesc,
|
||||
void (*cbF) (struct buf *),
|
||||
void *cbA)
|
||||
RF_RaidAccessFlags_t flags)
|
||||
/*
|
||||
type should be read or write
|
||||
async_flag should be RF_TRUE or RF_FALSE
|
||||
@ -694,8 +685,7 @@ bp_in is a buf pointer. void * to facilitate ignoring it outside the kernel
|
||||
return (ENOSPC);
|
||||
}
|
||||
desc = rf_AllocRaidAccDesc(raidPtr, type, raidAddress,
|
||||
numBlocks, lbufPtr, bp, paramDAG, paramASM,
|
||||
flags, cbF, cbA, raidPtr->Layout.map->states);
|
||||
numBlocks, lbufPtr, bp, flags, raidPtr->Layout.map->states);
|
||||
|
||||
if (desc == NULL) {
|
||||
return (ENOMEM);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rf_driver.h,v 1.4 2000/02/13 04:53:57 oster Exp $ */
|
||||
/* $NetBSD: rf_driver.h,v 1.5 2001/07/27 03:30:07 oster Exp $ */
|
||||
/*
|
||||
* rf_driver.h
|
||||
*/
|
||||
@ -47,20 +47,14 @@ RF_RaidAccessDesc_t *rf_AllocRaidAccDesc(RF_Raid_t * raidPtr, RF_IoType_t type,
|
||||
RF_RaidAddr_t raidAddress,
|
||||
RF_SectorCount_t numBlocks,
|
||||
caddr_t bufPtr,
|
||||
void *bp, RF_DagHeader_t ** paramDAG,
|
||||
RF_AccessStripeMapHeader_t ** paramASM,
|
||||
void *bp,
|
||||
RF_RaidAccessFlags_t flags,
|
||||
void (*cbF) (struct buf *),
|
||||
void *cbA,
|
||||
RF_AccessState_t * states);
|
||||
void rf_FreeRaidAccDesc(RF_RaidAccessDesc_t * desc);
|
||||
int rf_DoAccess(RF_Raid_t * raidPtr, RF_IoType_t type, int async_flag,
|
||||
RF_RaidAddr_t raidAddress, RF_SectorCount_t numBlocks,
|
||||
caddr_t bufPtr, void *bp_in, RF_DagHeader_t ** paramDAG,
|
||||
RF_AccessStripeMapHeader_t ** paramASM,
|
||||
RF_RaidAccessFlags_t flags,
|
||||
RF_RaidAccessDesc_t ** paramDesc,
|
||||
void (*cbF) (struct buf *), void *cbA);
|
||||
caddr_t bufPtr, void *bp_in,
|
||||
RF_RaidAccessFlags_t flags);
|
||||
int rf_SetReconfiguredMode(RF_Raid_t * raidPtr, RF_RowCol_t row,
|
||||
RF_RowCol_t col);
|
||||
int rf_FailDisk(RF_Raid_t * raidPtr, RF_RowCol_t frow, RF_RowCol_t fcol,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rf_netbsdkintf.c,v 1.108 2001/07/18 06:45:34 thorpej Exp $ */
|
||||
/* $NetBSD: rf_netbsdkintf.c,v 1.109 2001/07/27 03:30:07 oster Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
@ -1744,9 +1744,7 @@ raidstart(raidPtr)
|
||||
retcode = rf_DoAccess(raidPtr, (bp->b_flags & B_READ) ?
|
||||
RF_IO_TYPE_READ : RF_IO_TYPE_WRITE,
|
||||
do_async, raid_addr, num_blocks,
|
||||
bp->b_data, bp, NULL, NULL,
|
||||
RF_DAG_NONBLOCKING_IO, NULL, NULL, NULL);
|
||||
|
||||
bp->b_data, bp, RF_DAG_NONBLOCKING_IO);
|
||||
|
||||
RF_LOCK_MUTEX(raidPtr->mutex);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user