From patchwork Fri Jul 23 09:38:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 350 Return-Path: Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23]) by open-mesh.net (Postfix) with SMTP id 3C31E154510 for ; Fri, 23 Jul 2010 11:38:52 +0200 (CEST) Received: (qmail invoked by alias); 23 Jul 2010 09:38:50 -0000 Received: from unknown (EHLO sven-desktop.lazhur.ath.cx) [89.246.195.217] by mail.gmx.net (mp003) with SMTP; 23 Jul 2010 11:38:50 +0200 X-Authenticated: #15668376 X-Provags-ID: V01U2FsdGVkX188xyA/kRw852VoKw5sAc0sV7nZM+aApAgy1/SmHT GLb5E0nf4tA4SC From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.net Date: Fri, 23 Jul 2010 11:38:44 +0200 Message-Id: <1279877924-14638-1-git-send-email-sven.eckelmann@gmx.de> X-Mailer: git-send-email 1.7.1 X-Y-GMX-Trusted: 0 Cc: Joe Perches , Greg Kroah-Hartman Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: Remove unnecessary casts of private_data X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2010 09:38:52 -0000 From: Joe Perches Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sven Eckelmann --- This patch is already added to maint. Please also apply it to trunk. batman-adv/bat_debugfs.c | 4 ++-- batman-adv/icmp_socket.c | 12 ++++-------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/batman-adv/bat_debugfs.c b/batman-adv/bat_debugfs.c index 83ec177..c73ce4a 100644 --- a/batman-adv/bat_debugfs.c +++ b/batman-adv/bat_debugfs.c @@ -107,7 +107,7 @@ static int log_release(struct inode *inode, struct file *file) static ssize_t log_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { - struct bat_priv *bat_priv = (struct bat_priv *)file->private_data; + struct bat_priv *bat_priv = file->private_data; struct debug_log *debug_log = bat_priv->debug_log; int error, i = 0; char c; @@ -161,7 +161,7 @@ static ssize_t log_read(struct file *file, char __user *buf, static unsigned int log_poll(struct file *file, poll_table *wait) { - struct bat_priv *bat_priv = (struct bat_priv *)file->private_data; + struct bat_priv *bat_priv = file->private_data; struct debug_log *debug_log = bat_priv->debug_log; poll_wait(file, &debug_log->queue_wait, wait); diff --git a/batman-adv/icmp_socket.c b/batman-adv/icmp_socket.c index a84e84d..6a014a3 100644 --- a/batman-adv/icmp_socket.c +++ b/batman-adv/icmp_socket.c @@ -80,8 +80,7 @@ static int bat_socket_open(struct inode *inode, struct file *file) static int bat_socket_release(struct inode *inode, struct file *file) { - struct socket_client *socket_client = - (struct socket_client *)file->private_data; + struct socket_client *socket_client = file->private_data; struct socket_packet *socket_packet; struct list_head *list_pos, *list_pos_tmp; unsigned long flags; @@ -109,8 +108,7 @@ static int bat_socket_release(struct inode *inode, struct file *file) static ssize_t bat_socket_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { - struct socket_client *socket_client = - (struct socket_client *)file->private_data; + struct socket_client *socket_client = file->private_data; struct socket_packet *socket_packet; size_t packet_len; int error; @@ -157,8 +155,7 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff, { /* FIXME: each orig_node->batman_if will be attached to a softif */ struct bat_priv *bat_priv = netdev_priv(soft_device); - struct socket_client *socket_client = - (struct socket_client *)file->private_data; + struct socket_client *socket_client = file->private_data; struct icmp_packet_rr icmp_packet; struct orig_node *orig_node; struct batman_if *batman_if; @@ -249,8 +246,7 @@ out: static unsigned int bat_socket_poll(struct file *file, poll_table *wait) { - struct socket_client *socket_client = - (struct socket_client *)file->private_data; + struct socket_client *socket_client = file->private_data; poll_wait(file, &socket_client->queue_wait, wait);