* [Kernel-janitors] tun updates Removed uneccessary casts
@ 2004-03-16 20:37 Chuck Short
2004-03-17 0:05 ` Dave Jones
0 siblings, 1 reply; 2+ messages in thread
From: Chuck Short @ 2004-03-16 20:37 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 61 bytes --]
Hi,
This patch removes uneccasarry casts from tun.c
chuck
[-- Attachment #2: tun-kj-audit.patch --]
[-- Type: text/plain, Size: 2904 bytes --]
--- linux-2.6.4.orig/drivers/net/tun.c 2004-03-11 02:55:26.000000000 +0000
+++ linux-2.6.4/drivers/net/tun.c 2004-03-16 16:50:03.000000000 +0000
@@ -70,7 +70,7 @@ static int tun_net_close(struct net_devi
/* Net device start xmit */
static int tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
{
- struct tun_struct *tun = (struct tun_struct *)dev->priv;
+ struct tun_struct *tun = dev->priv;
DBG(KERN_INFO "%s: tun_net_xmit %d\n", tun->dev->name, skb->len);
@@ -113,14 +113,14 @@ static void tun_net_mclist(struct net_de
static struct net_device_stats *tun_net_stats(struct net_device *dev)
{
- struct tun_struct *tun = (struct tun_struct *)dev->priv;
+ struct tun_struct *tun = dev->priv;
return &tun->stats;
}
/* Initialize net device. */
static void tun_net_init(struct net_device *dev)
{
- struct tun_struct *tun = (struct tun_struct *)dev->priv;
+ struct tun_struct *tun = dev->priv;
switch (tun->flags & TUN_TYPE_MASK) {
case TUN_TUN_DEV:
@@ -153,7 +153,7 @@ static void tun_net_init(struct net_devi
/* Poll */
static unsigned int tun_chr_poll(struct file *file, poll_table * wait)
{
- struct tun_struct *tun = (struct tun_struct *)file->private_data;
+ struct tun_struct *tun = file->private_data;
unsigned int mask = POLLOUT | POLLWRNORM;
if (!tun)
@@ -217,7 +217,7 @@ static __inline__ ssize_t tun_get_user(s
static ssize_t tun_chr_writev(struct file * file, const struct iovec *iv,
unsigned long count, loff_t *pos)
{
- struct tun_struct *tun = (struct tun_struct *)file->private_data;
+ struct tun_struct *tun = file->private_data;
unsigned long i;
size_t len;
@@ -279,7 +279,7 @@ static __inline__ ssize_t tun_put_user(s
static ssize_t tun_chr_readv(struct file *file, const struct iovec *iv,
unsigned long count, loff_t *pos)
{
- struct tun_struct *tun = (struct tun_struct *)file->private_data;
+ struct tun_struct *tun = file->private_data;
DECLARE_WAITQUEUE(wait, current);
struct sk_buff *skb;
ssize_t len, ret = 0;
@@ -455,7 +455,7 @@ static int tun_set_iff(struct file *file
static int tun_chr_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
- struct tun_struct *tun = (struct tun_struct *)file->private_data;
+ struct tun_struct *tun = file->private_data;
if (cmd == TUNSETIFF && !tun) {
struct ifreq ifr;
@@ -527,7 +527,7 @@ static int tun_chr_ioctl(struct inode *i
static int tun_chr_fasync(int fd, struct file *file, int on)
{
- struct tun_struct *tun = (struct tun_struct *)file->private_data;
+ struct tun_struct *tun = file->private_data;
int ret;
if (!tun)
@@ -558,7 +558,7 @@ static int tun_chr_open(struct inode *in
static int tun_chr_close(struct inode *inode, struct file *file)
{
- struct tun_struct *tun = (struct tun_struct *)file->private_data;
+ struct tun_struct *tun = file->private_data;
if (!tun)
return 0;
[-- Attachment #3: Type: text/plain, Size: 163 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Kernel-janitors] tun updates Removed uneccessary casts
2004-03-16 20:37 [Kernel-janitors] tun updates Removed uneccessary casts Chuck Short
@ 2004-03-17 0:05 ` Dave Jones
0 siblings, 0 replies; 2+ messages in thread
From: Dave Jones @ 2004-03-17 0:05 UTC (permalink / raw)
To: kernel-janitors
On Tue, Mar 16, 2004 at 08:37:51PM +0000, Chuck Short wrote:
> Hi,
>
> This patch removes uneccasarry casts from tun.c
Already done in 2.6.5rc1
Dave
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-03-17 0:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-16 20:37 [Kernel-janitors] tun updates Removed uneccessary casts Chuck Short
2004-03-17 0:05 ` Dave Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.