diff options
| author | dsl <dsl@NetBSD.org> | 2003-03-21 23:11:19 +0000 |
|---|---|---|
| committer | dsl <dsl@NetBSD.org> | 2003-03-21 23:11:19 +0000 |
| commit | bd99e3429dbeebe30a4551ccf58b793499a044b6 (patch) | |
| tree | 32b47e70469582edd4842314da8f75305a00c6bc /sys/dev/raidframe | |
| parent | 3f2184def790cfd198da260d2d517019eb12a7ea (diff) | |
Use 'void *' instead of 'caddr_t' in prototypes of VOP_IOCTL, VOP_FCNTL
and VOP_ADVLOCK, delete casts from callers (and some to copyin/out).
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_copyback.c | 6 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_disks.c | 6 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_netbsdkintf.c | 30 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_reconstruct.c | 6 |
4 files changed, 20 insertions, 28 deletions
diff --git a/sys/dev/raidframe/rf_copyback.c b/sys/dev/raidframe/rf_copyback.c index 7e7cdcefcef..7d0d996abe5 100644 --- a/sys/dev/raidframe/rf_copyback.c +++ b/sys/dev/raidframe/rf_copyback.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_copyback.c,v 1.22 2002/11/16 16:49:46 oster Exp $ */ +/* $NetBSD: rf_copyback.c,v 1.23 2003/03/21 23:11:22 dsl 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.22 2002/11/16 16:49:46 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_copyback.c,v 1.23 2003/03/21 23:11:22 dsl Exp $"); #include <dev/raidframe/raidframevar.h> @@ -162,7 +162,7 @@ rf_CopybackReconstructedData(raidPtr) if ((retcode = VOP_GETATTR(vp, &va, proc->p_ucred, proc)) != 0) { return; } - retcode = VOP_IOCTL(vp, DIOCGPART, (caddr_t) & dpart, + retcode = VOP_IOCTL(vp, DIOCGPART, &dpart, FREAD, proc->p_ucred, proc); if (retcode) { return; diff --git a/sys/dev/raidframe/rf_disks.c b/sys/dev/raidframe/rf_disks.c index 01fcd3b8853..f30f406dc16 100644 --- a/sys/dev/raidframe/rf_disks.c +++ b/sys/dev/raidframe/rf_disks.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_disks.c,v 1.40 2002/10/22 03:15:28 oster Exp $ */ +/* $NetBSD: rf_disks.c,v 1.41 2003/03/21 23:11:22 dsl Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -67,7 +67,7 @@ ***************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.40 2002/10/22 03:15:28 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.41 2003/03/21 23:11:22 dsl Exp $"); #include <dev/raidframe/raidframevar.h> @@ -646,7 +646,7 @@ rf_ConfigureDisk(raidPtr, buf, diskPtr, row, col) if ((error = VOP_GETATTR(vp, &va, proc->p_ucred, proc)) != 0) { return (error); } - error = VOP_IOCTL(vp, DIOCGPART, (caddr_t) & dpart, + error = VOP_IOCTL(vp, DIOCGPART, &dpart, FREAD, proc->p_ucred, proc); if (error) { return (error); diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index 32e040631e3..b97743dd6b8 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.155 2003/02/25 20:35:36 thorpej Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.156 2003/03/21 23:11:23 dsl Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -111,7 +111,7 @@ ***********************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.155 2003/02/25 20:35:36 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.156 2003/03/21 23:11:23 dsl Exp $"); #include <sys/param.h> #include <sys/errno.h> @@ -885,8 +885,7 @@ raidioctl(dev, cmd, data, flag, p) if (k_cfg == NULL) { return (ENOMEM); } - retcode = copyin((caddr_t) u_cfg, (caddr_t) k_cfg, - sizeof(RF_Config_t)); + retcode = copyin(u_cfg, k_cfg, sizeof(RF_Config_t)); if (retcode) { RF_Free(k_cfg, sizeof(RF_Config_t)); db1_printf(("rf_ioctl: retcode=%d copyin.1\n", @@ -907,8 +906,7 @@ raidioctl(dev, cmd, data, flag, p) RF_Free(k_cfg, sizeof(RF_Config_t)); return (ENOMEM); } - retcode = copyin(k_cfg->layoutSpecific, - (caddr_t) specific_buf, + retcode = copyin(k_cfg->layoutSpecific, specific_buf, k_cfg->layoutSpecificSize); if (retcode) { RF_Free(k_cfg, sizeof(RF_Config_t)); @@ -1021,10 +1019,9 @@ raidioctl(dev, cmd, data, flag, p) raidPtr->raid_cinfo[row][column].ci_vp, clabel ); - retcode = copyout((caddr_t) clabel, - (caddr_t) *clabel_ptr, + retcode = copyout(clabel, *clabel_ptr, sizeof(RF_ComponentLabel_t)); - RF_Free( clabel, sizeof(RF_ComponentLabel_t)); + RF_Free(clabel, sizeof(RF_ComponentLabel_t)); return (retcode); case RAIDFRAME_SET_COMPONENT_LABEL: @@ -1252,8 +1249,7 @@ raidioctl(dev, cmd, data, flag, p) for (j = d_cfg->cols, i = 0; i < d_cfg->nspares; i++, j++) { d_cfg->spares[i] = raidPtr->Disks[0][j]; } - retcode = copyout((caddr_t) d_cfg, (caddr_t) * ucfgp, - sizeof(RF_DeviceConfig_t)); + retcode = copyout(d_cfg, *ucfgp, sizeof(RF_DeviceConfig_t)); RF_Free(d_cfg, sizeof(RF_DeviceConfig_t)); return (retcode); @@ -1370,8 +1366,7 @@ raidioctl(dev, cmd, data, flag, p) progressInfo.remaining = progressInfo.total - progressInfo.completed; } - retcode = copyout((caddr_t) &progressInfo, - (caddr_t) *progressInfoPtr, + retcode = copyout(&progressInfo, *progressInfoPtr, sizeof(RF_ProgressInfo_t)); return (retcode); @@ -1404,8 +1399,7 @@ raidioctl(dev, cmd, data, flag, p) progressInfo.completed = 100; progressInfo.total = 100; } - retcode = copyout((caddr_t) &progressInfo, - (caddr_t) *progressInfoPtr, + retcode = copyout(&progressInfo, *progressInfoPtr, sizeof(RF_ProgressInfo_t)); return (retcode); @@ -1436,8 +1430,7 @@ raidioctl(dev, cmd, data, flag, p) progressInfo.completed = 100; progressInfo.total = 100; } - retcode = copyout((caddr_t) &progressInfo, - (caddr_t) *progressInfoPtr, + retcode = copyout(&progressInfo, *progressInfoPtr, sizeof(RF_ProgressInfo_t)); return (retcode); @@ -2726,8 +2719,7 @@ rf_find_raid_components() } /* Ok, the disk exists. Go get the disklabel. */ - error = VOP_IOCTL(vp, DIOCGDINFO, (caddr_t)&label, - FREAD, NOCRED, 0); + error = VOP_IOCTL(vp, DIOCGDINFO, &label, FREAD, NOCRED, 0); if (error) { /* * XXX can't happen - open() would diff --git a/sys/dev/raidframe/rf_reconstruct.c b/sys/dev/raidframe/rf_reconstruct.c index 063a0b95bc6..2641bb458d7 100644 --- a/sys/dev/raidframe/rf_reconstruct.c +++ b/sys/dev/raidframe/rf_reconstruct.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconstruct.c,v 1.52 2003/02/09 10:04:34 jdolecek Exp $ */ +/* $NetBSD: rf_reconstruct.c,v 1.53 2003/03/21 23:11:23 dsl 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.52 2003/02/09 10:04:34 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.53 2003/03/21 23:11:23 dsl Exp $"); #include <sys/time.h> #include <sys/buf.h> @@ -508,7 +508,7 @@ rf_ReconstructInPlace(raidPtr, row, col) RF_UNLOCK_MUTEX(raidPtr->mutex); return(retcode); } - retcode = VOP_IOCTL(vp, DIOCGPART, (caddr_t) & dpart, + retcode = VOP_IOCTL(vp, DIOCGPART, &dpart, FREAD, proc->p_ucred, proc); if (retcode) { RF_LOCK_MUTEX(raidPtr->mutex); |
