The 'next' argument to rf_CreateDiskQueueData is always NULL. Since

there is no particular reason to pass an extra NULL argument, turf it,
and initialize p->next to NULL within the function.
This commit is contained in:
oster 2005-02-12 03:44:41 +00:00
parent 0b15470982
commit be864067da
5 changed files with 18 additions and 21 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_copyback.c,v 1.29 2005/02/12 03:27:33 oster Exp $ */
/* $NetBSD: rf_copyback.c,v 1.30 2005/02/12 03:44:41 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -38,7 +38,7 @@
****************************************************************************/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rf_copyback.c,v 1.29 2005/02/12 03:27:33 oster Exp $");
__KERNEL_RCSID(0, "$NetBSD: rf_copyback.c,v 1.30 2005/02/12 03:44:41 oster Exp $");
#include <dev/raidframe/raidframevar.h>
@ -337,12 +337,12 @@ rf_CopybackOne(RF_CopybackDesc_t *desc, int typ, RF_RaidAddr_t addr,
desc->readreq = rf_CreateDiskQueueData(RF_IO_TYPE_READ, spOffs,
sectPerSU, desc->databuf, 0L, 0,
(int (*) (void *, int)) rf_CopybackReadDoneProc, desc,
NULL, NULL, (void *) raidPtr, RF_DISKQUEUE_DATA_FLAGS_NONE, NULL,
NULL, (void *) raidPtr, RF_DISKQUEUE_DATA_FLAGS_NONE, NULL,
PR_WAITOK);
desc->writereq = rf_CreateDiskQueueData(RF_IO_TYPE_WRITE, testOffs,
sectPerSU, desc->databuf, 0L, 0,
(int (*) (void *, int)) rf_CopybackWriteDoneProc, desc,
NULL, NULL, (void *) raidPtr, RF_DISKQUEUE_DATA_FLAGS_NONE, NULL,
NULL, (void *) raidPtr, RF_DISKQUEUE_DATA_FLAGS_NONE, NULL,
PR_WAITOK);
desc->fcol = testCol;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_dagfuncs.c,v 1.21 2005/02/12 03:27:33 oster Exp $ */
/* $NetBSD: rf_dagfuncs.c,v 1.22 2005/02/12 03:44:41 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rf_dagfuncs.c,v 1.21 2005/02/12 03:27:33 oster Exp $");
__KERNEL_RCSID(0, "$NetBSD: rf_dagfuncs.c,v 1.22 2005/02/12 03:44:41 oster Exp $");
#include <sys/param.h>
#include <sys/ioctl.h>
@ -290,7 +290,7 @@ rf_DiskReadFuncForThreads(RF_DagNode_t *node)
req = rf_CreateDiskQueueData(iotype, pda->startSector, pda->numSector,
buf, parityStripeID, which_ru,
(int (*) (void *, int)) node->wakeFunc,
node, NULL,
node,
#if RF_ACC_TRACE > 0
node->dagHdr->tracerec,
#else
@ -330,7 +330,7 @@ rf_DiskWriteFuncForThreads(RF_DagNode_t *node)
req = rf_CreateDiskQueueData(iotype, pda->startSector, pda->numSector,
buf, parityStripeID, which_ru,
(int (*) (void *, int)) node->wakeFunc,
(void *) node, NULL,
(void *) node,
#if RF_ACC_TRACE > 0
node->dagHdr->tracerec,
#else
@ -364,7 +364,6 @@ rf_DiskUndoFunc(RF_DagNode_t *node)
0L, 0, NULL, 0L, 0,
(int (*) (void *, int)) node->wakeFunc,
(void *) node,
NULL,
#if RF_ACC_TRACE > 0
node->dagHdr->tracerec,
#else
@ -395,7 +394,6 @@ rf_DiskUnlockFuncForThreads(RF_DagNode_t *node)
0L, 0, NULL, 0L, 0,
(int (*) (void *, int)) node->wakeFunc,
(void *) node,
NULL,
#if RF_ACC_TRACE > 0
node->dagHdr->tracerec,
#else

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_diskqueue.c,v 1.38 2005/02/12 03:27:33 oster Exp $ */
/* $NetBSD: rf_diskqueue.c,v 1.39 2005/02/12 03:44:41 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -66,7 +66,7 @@
****************************************************************************/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rf_diskqueue.c,v 1.38 2005/02/12 03:27:33 oster Exp $");
__KERNEL_RCSID(0, "$NetBSD: rf_diskqueue.c,v 1.39 2005/02/12 03:44:41 oster Exp $");
#include <dev/raidframe/raidframevar.h>
@ -444,7 +444,6 @@ rf_CreateDiskQueueData(RF_IoType_t typ, RF_SectorNum_t ssect,
RF_StripeNum_t parityStripeID,
RF_ReconUnitNum_t which_ru,
int (*wakeF) (void *, int), void *arg,
RF_DiskQueueData_t *next,
RF_AccTraceEntry_t *tracerec, RF_Raid_t *raidPtr,
RF_DiskQueueDataFlags_t flags, void *kb_proc,
int waitflag)
@ -476,7 +475,7 @@ rf_CreateDiskQueueData(RF_IoType_t typ, RF_SectorNum_t ssect,
p->which_ru = which_ru;
p->CompleteFunc = wakeF;
p->argument = arg;
p->next = next;
p->next = NULL;
p->tracerec = tracerec;
p->priority = RF_IO_NORMAL_PRIORITY;
p->raidPtr = raidPtr;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_diskqueue.h,v 1.18 2005/02/12 03:27:33 oster Exp $ */
/* $NetBSD: rf_diskqueue.h,v 1.19 2005/02/12 03:44:41 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -157,7 +157,7 @@ RF_DiskQueueData_t *rf_CreateDiskQueueData(RF_IoType_t, RF_SectorNum_t,
RF_SectorCount_t , caddr_t,
RF_StripeNum_t, RF_ReconUnitNum_t,
int (*wakeF) (void *, int),
void *, RF_DiskQueueData_t *,
void *,
RF_AccTraceEntry_t *, RF_Raid_t *,
RF_DiskQueueDataFlags_t,
void *, int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: rf_reconstruct.c,v 1.85 2005/02/12 03:27:33 oster Exp $ */
/* $NetBSD: rf_reconstruct.c,v 1.86 2005/02/12 03:44:41 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@ -33,7 +33,7 @@
************************************************************/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.85 2005/02/12 03:27:33 oster Exp $");
__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.86 2005/02/12 03:44:41 oster Exp $");
#include <sys/time.h>
#include <sys/buf.h>
@ -1184,7 +1184,7 @@ TryToRead(RF_Raid_t *raidPtr, RF_RowCol_t col)
/* should be ok to use a NULL proc pointer here, all the bufs we use
* should be in kernel space */
req = rf_CreateDiskQueueData(RF_IO_TYPE_READ, ctrl->diskOffset, sectorsPerRU, ctrl->rbuf->buffer, psid, which_ru,
ReconReadDoneProc, (void *) ctrl, NULL,
ReconReadDoneProc, (void *) ctrl,
#if RF_ACC_TRACE > 0
&raidPtr->recon_tracerecs[col],
#else
@ -1372,7 +1372,7 @@ IssueNextWriteRequest(RF_Raid_t *raidPtr)
req = rf_CreateDiskQueueData(RF_IO_TYPE_WRITE, rbuf->spOffset,
sectorsPerRU, rbuf->buffer,
rbuf->parityStripeID, rbuf->which_ru,
ReconWriteDoneProc, (void *) rbuf, NULL,
ReconWriteDoneProc, (void *) rbuf,
#if RF_ACC_TRACE > 0
&raidPtr->recon_tracerecs[fcol],
#else
@ -1701,7 +1701,7 @@ rf_ForceOrBlockRecon(RF_Raid_t *raidPtr, RF_AccessStripeMap_t *asmap,
/* use NULL b_proc b/c all addrs
* should be in kernel space */
req = rf_CreateDiskQueueData(RF_IO_TYPE_READ, offset + which_ru * sectorsPerRU, sectorsPerRU, new_rbuf->buffer,
psid, which_ru, (int (*) (void *, int)) ForceReconReadDoneProc, (void *) new_rbuf, NULL,
psid, which_ru, (int (*) (void *, int)) ForceReconReadDoneProc, (void *) new_rbuf,
NULL, (void *) raidPtr, 0, NULL, PR_WAITOK);
new_rbuf->arg = req;