osi_UFSOpen returns struct osi_file *

The osi_UFSOpen function always returns a (struct osi_file *). Fix
the code to reflect this, rather than casting to and from (void *).

Change-Id: I3aa0bb17b547060671aa7045a8237b3926ec613f
Reviewed-on: http://gerrit.openafs.org/851
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Simon Wilkinson 2009-11-19 16:34:07 +00:00 committed by Derrick Brashear
parent 6f803428fd
commit 4057a9941b
14 changed files with 29 additions and 29 deletions

View File

@ -23,7 +23,7 @@ extern struct osi_dev cacheDev;
extern struct vfs *afs_cacheVfsp;
void *
struct osi_file *
osi_UFSOpen(afs_dcache_id_t *ainode)
{
struct inode *ip;
@ -56,7 +56,7 @@ osi_UFSOpen(afs_dcache_id_t *ainode)
afile->size = VTOI(afile->vnode)->i_size;
afile->offset = 0;
afile->proc = (int (*)())0;
return (void *)afile;
return afile;
}
int

View File

@ -130,7 +130,7 @@ VnodeToDev(vnode_t avp)
#endif
}
void *
struct osi_file *
osi_UFSOpen(afs_dcache_id_t *ainode)
{
struct vnode *vp;
@ -204,7 +204,7 @@ osi_UFSOpen(afs_dcache_id_t *ainode)
code = afs_osi_Stat(afile, &tstat);
afile->size = tstat.size;
#endif
return (void *)afile;
return afile;
}
int

View File

@ -23,7 +23,7 @@ extern struct osi_dev cacheDev;
extern struct mount *afs_cacheVfsp;
void *
struct osi_file *
osi_UFSOpen(afs_dcache_id_t *ainode)
{
struct osi_file *afile;
@ -59,7 +59,7 @@ osi_UFSOpen(afs_dcache_id_t *ainode)
afile->size = VTOI(vp)->i_size;
afile->offset = 0;
afile->proc = NULL;
return (void *)afile;
return afile;
}
int

View File

@ -24,7 +24,7 @@ extern struct osi_dev cacheDev;
extern struct vfs *afs_cacheVfsp;
void *
struct osi_file *
osi_UFSOpen(afs_dcache_id_t *ainode)
{
struct inode *ip;
@ -57,7 +57,7 @@ osi_UFSOpen(afs_dcache_id_t *ainode)
afile->size = VTOI(afile->vnode)->i_size;
afile->offset = 0;
afile->proc = (int (*)())0;
return (void *)afile;
return afile;
}
int

View File

@ -37,7 +37,7 @@ afs_XFSIGetVnode(afs_dcache_id_t *ainode)
}
/* Force to 64 bits, even for EFS filesystems. */
void *
struct osi_file *
osi_UFSOpen(afs_dcache_id_t *ainode)
{
struct inode *ip;
@ -62,7 +62,7 @@ osi_UFSOpen(afs_dcache_id_t *ainode)
afile->size = VnodeToSize(afile->vnode);
afile->offset = 0;
afile->proc = (int (*)())0;
return (void *)afile;
return afile;
}
int

View File

@ -68,7 +68,7 @@ afs_linux_raw_open(afs_dcache_id_t *ainode)
return filp;
}
void *
struct osi_file *
osi_UFSOpen(afs_dcache_id_t *ainode)
{
struct osi_file *afile = NULL;
@ -97,7 +97,7 @@ osi_UFSOpen(afs_dcache_id_t *ainode)
AFS_GLOCK();
afile->offset = 0;
afile->proc = (int (*)())0;
return (void *)afile;
return afile;
}
#if defined(LINUX_USE_FH)

View File

@ -71,7 +71,7 @@ afs_linux_raw_open(afs_dcache_id_t *ainode)
return filp;
}
void *
struct osi_file *
osi_UFSOpen(afs_dcache_id_t *ainode)
{
struct osi_file *afile = NULL;
@ -100,10 +100,10 @@ osi_UFSOpen(afs_dcache_id_t *ainode)
AFS_GLOCK();
afile->offset = 0;
afile->proc = (int (*)())0;
return (void *)afile;
return afile;
}
#else
void *
struct osi_file *
osi_UFSOpen(afs_dcache_id_t *ainode)
{
register struct osi_file *afile = NULL;
@ -150,7 +150,7 @@ osi_UFSOpen(afs_dcache_id_t *ainode)
AFS_GLOCK();
afile->offset = 0;
afile->proc = (int (*)())0;
return (void *)afile;
return afile;
}
#endif

View File

@ -23,7 +23,7 @@ extern struct osi_dev cacheDev;
extern struct mount *afs_cacheVfsp;
void *
struct osi_file *
osi_UFSOpen(afs_dcache_id_t *ainode)
{
struct inode *ip;
@ -49,7 +49,7 @@ osi_UFSOpen(afs_dcache_id_t *ainode)
afile->size = VTOI(afile->vnode)->i_size;
afile->offset = 0;
afile->proc = (int (*)())0;
return (void *)afile;
return afile;
}
int

View File

@ -23,7 +23,7 @@ extern struct osi_dev cacheDev;
extern struct mount *afs_cacheVfsp;
void *
struct osi_file *
osi_UFSOpen(afs_dcache_id_t *ainode)
{
struct osi_file *afile;
@ -53,7 +53,7 @@ osi_UFSOpen(afs_dcache_id_t *ainode)
#endif
afile->offset = 0;
afile->proc = NULL;
return (void *)afile;
return afile;
}
int

View File

@ -141,7 +141,7 @@ VnodeToSize(vnode_t * vp)
return (afs_int32) (vattr.va_size);
}
void *
struct osi_file *
osi_VxfsOpen(afs_dcache_id_t *ainode)
{
struct vnode *vp;
@ -160,11 +160,11 @@ osi_VxfsOpen(afs_dcache_id_t *ainode)
afile->size = VnodeToSize(afile->vnode);
afile->offset = 0;
afile->proc = (int (*)())0;
return (void *)afile;
return afile;
}
#endif /* AFS_HAVE_VXFS */
void *
struct osi_file *
osi_UfsOpen(afs_dcache_id_t *ainode)
{
#ifdef AFS_CACHE_VNODE_PATH
@ -248,13 +248,13 @@ osi_UfsOpen(afs_dcache_id_t *ainode)
#endif
afile->offset = 0;
afile->proc = (int (*)())0;
return (void *)afile;
return afile;
}
/**
* In Solaris 7 we use 64 bit inode numbers
*/
void *
struct osi_file *
osi_UFSOpen(afs_dcache_id_t *ainode)
{
extern int cacheDiskType;

View File

@ -698,7 +698,7 @@ lookupname(char *fnamep, int segflg, int followlink,
/*
* open a file given its i-node number
*/
void *
struct osi_file *
osi_UFSOpen(afs_dcache_id_t *ino)
{
int rc;

View File

@ -785,7 +785,7 @@ afs_UFSRead(register struct vcache *avc, struct uio *auio,
}
} else {
/* get the data from the file */
tfile = (struct osi_file *)osi_UFSOpen(&tdc->f.inode);
tfile = osi_UFSOpen(&tdc->f.inode);
#ifdef AFS_DARWIN80_ENV
trimlen = len;
tuiop = afsio_darwin_partialcopy(auio, trimlen);

View File

@ -422,7 +422,7 @@ afs_UFSWrite(register struct vcache *avc, struct uio *auio, int aio,
error = EIO;
break;
}
tfile = (struct osi_file *)osi_UFSOpen(&tdc->f.inode);
tfile = osi_UFSOpen(&tdc->f.inode);
len = totalLength; /* write this amount by default */
offset = filePos - AFS_CHUNKTOBASE(tdc->f.chunk);
max = AFS_CHUNKTOSIZE(tdc->f.chunk); /* max size of this chunk */

View File

@ -673,7 +673,7 @@ extern int afs_syscall_iincdec(int, int, int, int);
/* ARCH/osi_file.c */
extern int afs_osicred_initialized;
extern void *osi_UFSOpen(afs_dcache_id_t *ainode);
extern struct osi_file *osi_UFSOpen(afs_dcache_id_t *ainode);
#if defined(AFS_LINUX22_ENV)
extern void osi_get_fh(struct dentry *dp, afs_ufs_dcache_id_t *ainode);
#endif