diff options
Diffstat (limited to 'drivers/misc/sgi-xp')
| -rw-r--r-- | drivers/misc/sgi-xp/xpc_uv.c | 2 | ||||
| -rw-r--r-- | drivers/misc/sgi-xp/xpnet.c | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/drivers/misc/sgi-xp/xpc_uv.c b/drivers/misc/sgi-xp/xpc_uv.c index ba9ae0e2df0f..fff522d347e3 100644 --- a/drivers/misc/sgi-xp/xpc_uv.c +++ b/drivers/misc/sgi-xp/xpc_uv.c @@ -1598,7 +1598,7 @@ out_2: * by xpc_notify_senders_of_disconnect_uv(), and to also get an * error returned here will confuse them. Additionally, since * in this case the channel is being disconnected we don't need - * to put the the msg_slot back on the free list. + * to put the msg_slot back on the free list. */ if (cmpxchg(&msg_slot->func, func, NULL) != func) { ret = xpSuccess; diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c index 50644f83e78c..2396ba3b03bd 100644 --- a/drivers/misc/sgi-xp/xpnet.c +++ b/drivers/misc/sgi-xp/xpnet.c @@ -285,7 +285,7 @@ xpnet_connection_activity(enum xp_retval reason, short partid, int channel, __clear_bit(partid, xpnet_broadcast_partitions); spin_unlock_bh(&xpnet_broadcast_lock); - if (bitmap_empty((unsigned long *)xpnet_broadcast_partitions, + if (bitmap_empty(xpnet_broadcast_partitions, xp_max_npartitions)) { netif_carrier_off(xpnet_device); } @@ -522,9 +522,8 @@ xpnet_init(void) dev_info(xpnet, "registering network device %s\n", XPNET_DEVICE_NAME); - xpnet_broadcast_partitions = kcalloc(BITS_TO_LONGS(xp_max_npartitions), - sizeof(long), - GFP_KERNEL); + xpnet_broadcast_partitions = bitmap_zalloc(xp_max_npartitions, + GFP_KERNEL); if (xpnet_broadcast_partitions == NULL) return -ENOMEM; @@ -535,7 +534,7 @@ xpnet_init(void) xpnet_device = alloc_netdev(0, XPNET_DEVICE_NAME, NET_NAME_UNKNOWN, ether_setup); if (xpnet_device == NULL) { - kfree(xpnet_broadcast_partitions); + bitmap_free(xpnet_broadcast_partitions); return -ENOMEM; } @@ -574,7 +573,7 @@ xpnet_init(void) result = register_netdev(xpnet_device); if (result != 0) { free_netdev(xpnet_device); - kfree(xpnet_broadcast_partitions); + bitmap_free(xpnet_broadcast_partitions); } return result; @@ -590,7 +589,7 @@ xpnet_exit(void) unregister_netdev(xpnet_device); free_netdev(xpnet_device); - kfree(xpnet_broadcast_partitions); + bitmap_free(xpnet_broadcast_partitions); } module_exit(xpnet_exit); |