[PATCH 49/67] tty_io: remove casts from void*

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg Kroah-Hartman
Date: Thursday, August 5, 2010 - 3:23 pm

From: Kulikov Vasiliy <segooon@gmail.com>

Remove unnesessary casts from void*.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/tty_io.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 6bf6d36..0906c15 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -893,7 +893,7 @@ static ssize_t tty_read(struct file *file, char __user *buf, size_t count,
 	struct inode *inode;
 	struct tty_ldisc *ld;
 
-	tty = (struct tty_struct *)file->private_data;
+	tty = file->private_data;
 	inode = file->f_path.dentry->d_inode;
 	if (tty_paranoia_check(tty, inode, "tty_read"))
 		return -EIO;
@@ -1070,7 +1070,7 @@ static ssize_t tty_write(struct file *file, const char __user *buf,
 	ssize_t ret;
 	struct tty_ldisc *ld;
 
-	tty = (struct tty_struct *)file->private_data;
+	tty = file->private_data;
 	if (tty_paranoia_check(tty, inode, "tty_write"))
 		return -EIO;
 	if (!tty || !tty->ops->write ||
@@ -1513,7 +1513,7 @@ int tty_release(struct inode *inode, struct file *filp)
 	int	idx;
 	char	buf[64];
 
-	tty = (struct tty_struct *)filp->private_data;
+	tty = filp->private_data;
 	if (tty_paranoia_check(tty, inode, "tty_release_dev"))
 		return 0;
 
@@ -1920,7 +1920,7 @@ static unsigned int tty_poll(struct file *filp, poll_table *wait)
 	struct tty_ldisc *ld;
 	int ret = 0;
 
-	tty = (struct tty_struct *)filp->private_data;
+	tty = filp->private_data;
 	if (tty_paranoia_check(tty, filp->f_path.dentry->d_inode, "tty_poll"))
 		return 0;
 
@@ -1937,7 +1937,7 @@ static int __tty_fasync(int fd, struct file *filp, int on)
 	unsigned long flags;
 	int retval = 0;
 
-	tty = (struct tty_struct *)filp->private_data;
+	tty = filp->private_data;
 	if (tty_paranoia_check(tty, filp->f_path.dentry->d_inode, "tty_fasync"))
 		goto out;
 
@@ -2497,7 +2497,7 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	struct tty_ldisc *ld;
 	struct inode *inode = file->f_dentry->d_inode;
 
-	tty = (struct tty_struct *)file->private_data;
+	tty = file->private_data;
 	if (tty_paranoia_check(tty, inode, "tty_ioctl"))
 		return -EINVAL;
 
-- 
1.7.2

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GIT PATCH] TTY patches for 2.6.36, Greg KH, (Thu Aug 5, 2:35 pm)
[PATCH 01/67] n_gsm.c: removed duplicated #includes, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 02/67] serial: There's no config CONSOLE, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 03/67] vt: clean up the code - use kernel library, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 04/67] serial: add UART_CAP_EFR and UART_CAP_SLEEP ..., Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 05/67] mrst_max3110: add UART driver for Max3110 on ..., Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 06/67] max3110 sanity check a register, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 07/67] serial: replace open coded mutex with a real ..., Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 08/67] serial: fix wakup races in the mrst_max3110 ..., Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 09/67] tty: Remove Hayes ESP ioctls, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 10/67] tty: remove remaining Hayes ESP ioctls, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 11/67] tty: Add EXTPROC support for LINEMODE, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 12/67] vt/console: try harder to print output when ..., Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 13/67] stallion: prune lock_kernel calls, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 14/67] istallion: use bit ops for the board flags, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 15/67] riscom8: kill use of lock_kernel, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 16/67] isicom: kill off the BKL, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 17/67] rocket: kill BKL, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 18/67] synclink: kill the big kernel lock, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 19/67] cyclades: Kill off BKL usage, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 20/67] epca: Kill the big kernel lock, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 21/67] specialix: Kill the BKL, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 22/67] tty: Fix the digi acceleport driver NULL checks, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 23/67] synclink: reworking locking a bit, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 24/67] tty: serial - fix various misuses/mishandlin ..., Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 25/67] tty: serial - fix tty back references in termios, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 26/67] tty: serial - fix tty referencing in set_ldisc, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 27/67] vc: Locking clean up, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 28/67] tty: Make vt's have a tty_port, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 29/67] tty: Move the vt_tty field from the vc_data ..., Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 30/67] serial: Change the wait for carrier locking, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 31/67] serial: add port helpers, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 32/67] serial: trim locking on the helpers, Greg Kroah-Hartman, (Thu Aug 5, 3:22 pm)
[PATCH 33/67] serial: Use block_til_ready helper, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 34/67] serial: fix termios settings in open, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 35/67] tty: replace BKL with a new tty_lock, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 36/67] tty: never hold BTM while getting tty_mutex, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 37/67] tty: fix console_sem lock order, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 38/67] cdc-acm: remove dead code, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 39/67] tty: introduce wait_event_interruptible_tty, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 40/67] tty: reorder ldisc locking, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 41/67] tty: untangle locking of wait_until_sent, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 42/67] tty: remove tty_lock_nested, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 43/67] tty: implement BTM as mutex instead of BKL, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 44/67] tty: release BTM while sleeping in block_til ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 45/67] 8250: fix set_ldisc operation, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 46/67] tty: avoid recursive BTM in pty_close, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 47/67] serial: max3107: introduce a max3107 driver, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 48/67] serial: max3107: Abstract out the platform s ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 49/67] tty_io: remove casts from void*, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 50/67] vt: Fix warning: statement with no effect du ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 51/67] serial: crisv10: formatting of pointers in p ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 53/67] serial: fix missing bit coverage of ASYNC_FLAGS, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 54/67] serial: general fixes in the serial_rs485 st ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 55/67] serial: mcf: don't take spinlocks in already ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 56/67] serial: MMIO32 support for 8250_early.c, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 57/67] timbuart: use __devinit and __devexit macros ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 58/67] serial: 68328serial.c: remove dead (ALMA_ANS ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 59/67] serial: add support for OX16PCI958 card, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 60/67] mxser: remove unnesesary NULL check, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 61/67] hsu: driver for Medfield High Speed UART device, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 62/67] hsu: add a periodic timer to check dma rx ch ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 63/67] hsu: some code cleanup, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 64/67] hsu: call PCI pm hooks in suspend/resume fun ..., Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
[PATCH 65/67] serial: max3107: Fix gpiolib support, Greg Kroah-Hartman, (Thu Aug 5, 3:23 pm)
Re: [GIT PATCH] TTY patches for 2.6.36, Linus Torvalds, (Fri Aug 6, 11:40 am)
Re: [GIT PATCH] TTY patches for 2.6.36, Greg KH, (Fri Aug 6, 11:51 am)
Re: [GIT PATCH] TTY patches for 2.6.36, Greg KH, (Fri Aug 6, 12:37 pm)
Re: [GIT PATCH] TTY patches for 2.6.36, Linus Torvalds, (Fri Aug 6, 12:38 pm)
[PATCH retry] tty: implement BTM as mutex instead of BKL, Arnd Bergmann, (Fri Aug 6, 12:40 pm)
Re: [GIT PATCH] TTY patches for 2.6.36, Arnd Bergmann, (Fri Aug 6, 12:40 pm)
Re: [GIT PATCH] TTY patches for 2.6.36, Alan Cox, (Fri Aug 6, 12:45 pm)
Re: [GIT PATCH] TTY patches for 2.6.36, Arnd Bergmann, (Fri Aug 6, 12:58 pm)
Re: [GIT PATCH] TTY patches for 2.6.36, Linus Torvalds, (Fri Aug 6, 1:11 pm)
Re: [GIT PATCH] TTY patches for 2.6.36, Arnd Bergmann, (Fri Aug 6, 1:19 pm)
Re: [GIT PATCH] TTY patches for 2.6.36, Greg KH, (Fri Aug 6, 1:22 pm)
Re: [GIT PATCH] TTY patches for 2.6.36, Andy Whitcroft, (Mon Aug 9, 9:06 am)
Re: [GIT PATCH] TTY patches for 2.6.36, Arnd Bergmann, (Mon Aug 9, 11:38 am)
Re: [GIT PATCH] TTY patches for 2.6.36, Alan Cox, (Mon Aug 9, 12:24 pm)
Re: [GIT PATCH] TTY patches for 2.6.36, Andy Whitcroft, (Tue Aug 10, 12:31 am)