]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
batman-adv: Remove explicit casts cast from void* for store
authorSven Eckelmann <sven@narfation.org>
Sat, 14 May 2011 21:14:52 +0000 (23:14 +0200)
committerSven Eckelmann <sven@narfation.org>
Mon, 30 May 2011 05:39:32 +0000 (07:39 +0200)
It is not necessary to cast a void* to the pointer type when we just
store it and don't want to do pointer arithmetic before the actual
assignment.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
net/batman-adv/bitarray.c
net/batman-adv/hard-interface.c
net/batman-adv/translation-table.c

index 767e2379b1aa3c6e7289bebb1d9ede53d43b8fc7..700ee4f7a9457f451dbbec48543b3d720cf79e0c 100644 (file)
@@ -130,7 +130,7 @@ static void bit_reset_window(unsigned long *seq_bits)
 char bit_get_packet(void *priv, unsigned long *seq_bits,
                    int32_t seq_num_diff, int8_t set_mark)
 {
-       struct bat_priv *bat_priv = (struct bat_priv *)priv;
+       struct bat_priv *bat_priv = priv;
 
        /* sequence number is slightly older. We already got a sequence number
         * higher than this one, so we just mark it. */
index 915e12b820b9b82780c9bd2bfa04099d079c2262..e626e75a7e653234b74a8a28dd917020b95a4e3a 100644 (file)
@@ -523,7 +523,7 @@ void hardif_remove_interfaces(void)
 static int hard_if_event(struct notifier_block *this,
                         unsigned long event, void *ptr)
 {
-       struct net_device *net_dev = (struct net_device *)ptr;
+       struct net_device *net_dev = ptr;
        struct hard_iface *hard_iface = hardif_get_by_netdev(net_dev);
        struct hard_iface *primary_if = NULL;
        struct bat_priv *bat_priv;
index be7b5cc71d28c06d1779e2be28132c17705241d0..802eacef05b85bd42ffd1738dad7095d6d532067 100644 (file)
@@ -313,7 +313,7 @@ out:
 
 static void _tt_local_del(struct hlist_node *node, void *arg)
 {
-       struct bat_priv *bat_priv = (struct bat_priv *)arg;
+       struct bat_priv *bat_priv = arg;
        void *data = container_of(node, struct tt_local_entry, hash_entry);
 
        kfree(data);