net: vxge-main: Remove unnecessary cast in kfree()
authorXu Wang <vulab@iscas.ac.cn>
Mon, 20 Jul 2020 03:09:59 +0000 (03:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Jul 2020 23:45:09 +0000 (16:45 -0700)
Remove unnecassary casts in the argument to kfree.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/neterion/vxge/vxge-main.c

index b0faa73..fc4ed0a 100644 (file)
@@ -1076,7 +1076,7 @@ static int vxge_mac_list_del(struct vxge_vpath *vpath, struct macInfo *mac)
        list_for_each_safe(entry, next, &vpath->mac_addr_list) {
                if (((struct vxge_mac_addrs *)entry)->macaddr == del_mac) {
                        list_del(entry);
-                       kfree((struct vxge_mac_addrs *)entry);
+                       kfree(entry);
                        vpath->mac_addr_cnt--;
 
                        if (is_multicast_ether_addr(mac->macaddr))
@@ -2913,7 +2913,7 @@ static void vxge_free_mac_add_list(struct vxge_vpath *vpath)
 
        list_for_each_safe(entry, next, &vpath->mac_addr_list) {
                list_del(entry);
-               kfree((struct vxge_mac_addrs *)entry);
+               kfree(entry);
        }
 }