Skip to content

Commit 2b50d24

Browse files
segoongregkh
authored andcommitted
tty_io: remove casts from void*
Remove unnesessary casts from void*. Signed-off-by: Kulikov Vasiliy <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 61fd152 commit 2b50d24

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/char/tty_io.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ static ssize_t tty_read(struct file *file, char __user *buf, size_t count,
893893
struct inode *inode;
894894
struct tty_ldisc *ld;
895895

896-
tty = (struct tty_struct *)file->private_data;
896+
tty = file->private_data;
897897
inode = file->f_path.dentry->d_inode;
898898
if (tty_paranoia_check(tty, inode, "tty_read"))
899899
return -EIO;
@@ -1070,7 +1070,7 @@ static ssize_t tty_write(struct file *file, const char __user *buf,
10701070
ssize_t ret;
10711071
struct tty_ldisc *ld;
10721072

1073-
tty = (struct tty_struct *)file->private_data;
1073+
tty = file->private_data;
10741074
if (tty_paranoia_check(tty, inode, "tty_write"))
10751075
return -EIO;
10761076
if (!tty || !tty->ops->write ||
@@ -1513,7 +1513,7 @@ int tty_release(struct inode *inode, struct file *filp)
15131513
int idx;
15141514
char buf[64];
15151515

1516-
tty = (struct tty_struct *)filp->private_data;
1516+
tty = filp->private_data;
15171517
if (tty_paranoia_check(tty, inode, "tty_release_dev"))
15181518
return 0;
15191519

@@ -1920,7 +1920,7 @@ static unsigned int tty_poll(struct file *filp, poll_table *wait)
19201920
struct tty_ldisc *ld;
19211921
int ret = 0;
19221922

1923-
tty = (struct tty_struct *)filp->private_data;
1923+
tty = filp->private_data;
19241924
if (tty_paranoia_check(tty, filp->f_path.dentry->d_inode, "tty_poll"))
19251925
return 0;
19261926

@@ -1937,7 +1937,7 @@ static int __tty_fasync(int fd, struct file *filp, int on)
19371937
unsigned long flags;
19381938
int retval = 0;
19391939

1940-
tty = (struct tty_struct *)filp->private_data;
1940+
tty = filp->private_data;
19411941
if (tty_paranoia_check(tty, filp->f_path.dentry->d_inode, "tty_fasync"))
19421942
goto out;
19431943

@@ -2497,7 +2497,7 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
24972497
struct tty_ldisc *ld;
24982498
struct inode *inode = file->f_dentry->d_inode;
24992499

2500-
tty = (struct tty_struct *)file->private_data;
2500+
tty = file->private_data;
25012501
if (tty_paranoia_check(tty, inode, "tty_ioctl"))
25022502
return -EINVAL;
25032503

0 commit comments

Comments
 (0)