Commit df0a59a1 authored by Joe Perches's avatar Joe Perches Committed by Tony Luck

[IA64] Remove unnecessary casts of private_data in perfmon.c

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent ddad53ee
...@@ -1573,7 +1573,7 @@ pfm_read(struct file *filp, char __user *buf, size_t size, loff_t *ppos) ...@@ -1573,7 +1573,7 @@ pfm_read(struct file *filp, char __user *buf, size_t size, loff_t *ppos)
return -EINVAL; return -EINVAL;
} }
ctx = (pfm_context_t *)filp->private_data; ctx = filp->private_data;
if (ctx == NULL) { if (ctx == NULL) {
printk(KERN_ERR "perfmon: pfm_read: NULL ctx [%d]\n", task_pid_nr(current)); printk(KERN_ERR "perfmon: pfm_read: NULL ctx [%d]\n", task_pid_nr(current));
return -EINVAL; return -EINVAL;
...@@ -1673,7 +1673,7 @@ pfm_poll(struct file *filp, poll_table * wait) ...@@ -1673,7 +1673,7 @@ pfm_poll(struct file *filp, poll_table * wait)
return 0; return 0;
} }
ctx = (pfm_context_t *)filp->private_data; ctx = filp->private_data;
if (ctx == NULL) { if (ctx == NULL) {
printk(KERN_ERR "perfmon: pfm_poll: NULL ctx [%d]\n", task_pid_nr(current)); printk(KERN_ERR "perfmon: pfm_poll: NULL ctx [%d]\n", task_pid_nr(current));
return 0; return 0;
...@@ -1733,7 +1733,7 @@ pfm_fasync(int fd, struct file *filp, int on) ...@@ -1733,7 +1733,7 @@ pfm_fasync(int fd, struct file *filp, int on)
return -EBADF; return -EBADF;
} }
ctx = (pfm_context_t *)filp->private_data; ctx = filp->private_data;
if (ctx == NULL) { if (ctx == NULL) {
printk(KERN_ERR "perfmon: pfm_fasync NULL ctx [%d]\n", task_pid_nr(current)); printk(KERN_ERR "perfmon: pfm_fasync NULL ctx [%d]\n", task_pid_nr(current));
return -EBADF; return -EBADF;
...@@ -1841,7 +1841,7 @@ pfm_flush(struct file *filp, fl_owner_t id) ...@@ -1841,7 +1841,7 @@ pfm_flush(struct file *filp, fl_owner_t id)
return -EBADF; return -EBADF;
} }
ctx = (pfm_context_t *)filp->private_data; ctx = filp->private_data;
if (ctx == NULL) { if (ctx == NULL) {
printk(KERN_ERR "perfmon: pfm_flush: NULL ctx [%d]\n", task_pid_nr(current)); printk(KERN_ERR "perfmon: pfm_flush: NULL ctx [%d]\n", task_pid_nr(current));
return -EBADF; return -EBADF;
...@@ -1984,7 +1984,7 @@ pfm_close(struct inode *inode, struct file *filp) ...@@ -1984,7 +1984,7 @@ pfm_close(struct inode *inode, struct file *filp)
return -EBADF; return -EBADF;
} }
ctx = (pfm_context_t *)filp->private_data; ctx = filp->private_data;
if (ctx == NULL) { if (ctx == NULL) {
printk(KERN_ERR "perfmon: pfm_close: NULL ctx [%d]\n", task_pid_nr(current)); printk(KERN_ERR "perfmon: pfm_close: NULL ctx [%d]\n", task_pid_nr(current));
return -EBADF; return -EBADF;
...@@ -4907,7 +4907,7 @@ sys_perfmonctl (int fd, int cmd, void __user *arg, int count) ...@@ -4907,7 +4907,7 @@ sys_perfmonctl (int fd, int cmd, void __user *arg, int count)
goto error_args; goto error_args;
} }
ctx = (pfm_context_t *)file->private_data; ctx = file->private_data;
if (unlikely(ctx == NULL)) { if (unlikely(ctx == NULL)) {
DPRINT(("no context for fd %d\n", fd)); DPRINT(("no context for fd %d\n", fd));
goto error_args; goto error_args;
......
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