Commit 158f9d76 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse: coda annotation

parent a247c9ec
......@@ -29,7 +29,7 @@
int use_coda_close;
static ssize_t
coda_file_read(struct file *coda_file, char *buf, size_t count, loff_t *ppos)
coda_file_read(struct file *coda_file, char __user *buf, size_t count, loff_t *ppos)
{
struct coda_file_info *cfi;
struct file *host_file;
......@@ -45,7 +45,7 @@ coda_file_read(struct file *coda_file, char *buf, size_t count, loff_t *ppos)
}
static ssize_t
coda_file_write(struct file *coda_file, const char *buf, size_t count, loff_t *ppos)
coda_file_write(struct file *coda_file, const char __user *buf, size_t count, loff_t *ppos)
{
struct inode *host_inode, *coda_inode = coda_file->f_dentry->d_inode;
struct coda_file_info *cfi;
......
......@@ -58,7 +58,7 @@ static int coda_pioctl(struct inode * inode, struct file * filp,
struct coda_inode_info *cnp;
/* get the Pioctl data arguments from user space */
if (copy_from_user(&data, (int *)user_data, sizeof(data))) {
if (copy_from_user(&data, (void __user *)user_data, sizeof(data))) {
return -EINVAL;
}
......
......@@ -88,7 +88,7 @@ static int coda_psdev_ioctl(struct inode * inode, struct file * filp,
switch(cmd) {
case CIOC_KERNEL_VERSION:
data = CODA_KERNEL_VERSION;
return put_user(data, (int *) arg);
return put_user(data, (int __user *) arg);
default:
return -ENOTTY;
}
......@@ -100,7 +100,7 @@ static int coda_psdev_ioctl(struct inode * inode, struct file * filp,
* Receive a message written by Venus to the psdev
*/
static ssize_t coda_psdev_write(struct file *file, const char *buf,
static ssize_t coda_psdev_write(struct file *file, const char __user *buf,
size_t nbytes, loff_t *off)
{
struct venus_comm *vcp = (struct venus_comm *) file->private_data;
......@@ -212,7 +212,7 @@ static ssize_t coda_psdev_write(struct file *file, const char *buf,
* Read a message from the kernel to Venus
*/
static ssize_t coda_psdev_read(struct file * file, char * buf,
static ssize_t coda_psdev_read(struct file * file, char __user * buf,
size_t nbytes, loff_t *off)
{
DECLARE_WAITQUEUE(wait, current);
......
......@@ -69,7 +69,7 @@ void reset_coda_cache_inv_stats( void )
}
int do_reset_coda_vfs_stats( ctl_table * table, int write, struct file * filp,
void * buffer, size_t * lenp )
void __user * buffer, size_t * lenp )
{
if ( write ) {
reset_coda_vfs_stats();
......@@ -83,7 +83,7 @@ int do_reset_coda_vfs_stats( ctl_table * table, int write, struct file * filp,
}
int do_reset_coda_cache_inv_stats( ctl_table * table, int write,
struct file * filp, void * buffer,
struct file * filp, void __user * buffer,
size_t * lenp )
{
if ( write ) {
......@@ -214,7 +214,7 @@ struct proc_dir_entry* proc_fs_coda;
#define coda_proc_create(name,get_info) \
create_proc_info_entry(name, 0, proc_fs_coda, get_info)
void coda_sysctl_init()
void coda_sysctl_init(void)
{
reset_coda_vfs_stats();
reset_coda_cache_inv_stats();
......@@ -234,7 +234,7 @@ void coda_sysctl_init()
#endif
}
void coda_sysctl_clean()
void coda_sysctl_clean(void)
{
#ifdef CONFIG_SYSCTL
......
......@@ -759,13 +759,14 @@ union coda_downcalls {
#define PIOCPARM_MASK 0x0000ffff
struct ViceIoctl {
caddr_t in, out; /* Data to be transferred in, or out */
void __user *in; /* Data to be transferred in */
void __user *out; /* Data to be transferred out */
short in_size; /* Size of input buffer <= 2K */
short out_size; /* Maximum size of output buffer, <= 2K */
};
struct PioctlData {
const char *path;
const char __user *path;
int follow;
struct ViceIoctl vi;
};
......
......@@ -82,9 +82,9 @@ void reset_coda_cache_inv_stats( void );
* data structure for /proc/sys/... files
*/
int do_reset_coda_vfs_stats( ctl_table * table, int write, struct file * filp,
void * buffer, size_t * lenp );
void __user * buffer, size_t * lenp );
int do_reset_coda_cache_inv_stats( ctl_table * table, int write,
struct file * filp, void * buffer,
struct file * filp, void __user * buffer,
size_t * lenp );
/* these functions are called to form the content of /proc/fs/coda/... files */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment