Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224528
b: refs/heads/master
c: e80be0b
h: refs/heads/master
v: v3
  • Loading branch information
Joe Perches authored and David S. Miller committed Nov 29, 2010
1 parent 0361065 commit c82469e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f3167460144cd2c24b964a32d40d32f851b5d5f4
refs/heads/master: e80be0b0ee307a2801e57cf36333d3d659e4bcc6
24 changes: 9 additions & 15 deletions trunk/drivers/net/vxge/vxge-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -1219,8 +1219,7 @@ vxge_hw_device_initialize(
if (status != VXGE_HW_OK)
goto exit;

hldev = (struct __vxge_hw_device *)
vzalloc(sizeof(struct __vxge_hw_device));
hldev = vzalloc(sizeof(struct __vxge_hw_device));
if (hldev == NULL) {
status = VXGE_HW_ERR_OUT_OF_MEMORY;
goto exit;
Expand Down Expand Up @@ -2140,8 +2139,7 @@ __vxge_hw_mempool_create(
goto exit;
}

mempool = (struct vxge_hw_mempool *)
vzalloc(sizeof(struct vxge_hw_mempool));
mempool = vzalloc(sizeof(struct vxge_hw_mempool));
if (mempool == NULL) {
status = VXGE_HW_ERR_OUT_OF_MEMORY;
goto exit;
Expand All @@ -2165,7 +2163,7 @@ __vxge_hw_mempool_create(

/* allocate array of memblocks */
mempool->memblocks_arr =
(void **) vzalloc(sizeof(void *) * mempool->memblocks_max);
vzalloc(sizeof(void *) * mempool->memblocks_max);
if (mempool->memblocks_arr == NULL) {
__vxge_hw_mempool_destroy(mempool);
status = VXGE_HW_ERR_OUT_OF_MEMORY;
Expand All @@ -2175,7 +2173,7 @@ __vxge_hw_mempool_create(

/* allocate array of private parts of items per memblocks */
mempool->memblocks_priv_arr =
(void **) vzalloc(sizeof(void *) * mempool->memblocks_max);
vzalloc(sizeof(void *) * mempool->memblocks_max);
if (mempool->memblocks_priv_arr == NULL) {
__vxge_hw_mempool_destroy(mempool);
status = VXGE_HW_ERR_OUT_OF_MEMORY;
Expand All @@ -2184,7 +2182,7 @@ __vxge_hw_mempool_create(
}

/* allocate array of memblocks DMA objects */
mempool->memblocks_dma_arr = (struct vxge_hw_mempool_dma *)
mempool->memblocks_dma_arr =
vzalloc(sizeof(struct vxge_hw_mempool_dma) *
mempool->memblocks_max);

Expand All @@ -2196,8 +2194,7 @@ __vxge_hw_mempool_create(
}

/* allocate hash array of items */
mempool->items_arr =
(void **) vzalloc(sizeof(void *) * mempool->items_max);
mempool->items_arr = vzalloc(sizeof(void *) * mempool->items_max);
if (mempool->items_arr == NULL) {
__vxge_hw_mempool_destroy(mempool);
status = VXGE_HW_ERR_OUT_OF_MEMORY;
Expand Down Expand Up @@ -4258,8 +4255,7 @@ vxge_hw_vpath_open(struct __vxge_hw_device *hldev,
if (status != VXGE_HW_OK)
goto vpath_open_exit1;

vp = (struct __vxge_hw_vpath_handle *)
vzalloc(sizeof(struct __vxge_hw_vpath_handle));
vp = vzalloc(sizeof(struct __vxge_hw_vpath_handle));
if (vp == NULL) {
status = VXGE_HW_ERR_OUT_OF_MEMORY;
goto vpath_open_exit2;
Expand Down Expand Up @@ -5065,8 +5061,7 @@ static void vxge_hw_blockpool_block_add(struct __vxge_hw_device *devh,
item);

if (entry == NULL)
entry = (struct __vxge_hw_blockpool_entry *)
vmalloc(sizeof(struct __vxge_hw_blockpool_entry));
entry = vmalloc(sizeof(struct __vxge_hw_blockpool_entry));
else
list_del(&entry->item);

Expand Down Expand Up @@ -5182,8 +5177,7 @@ __vxge_hw_blockpool_free(struct __vxge_hw_device *devh,
item);

if (entry == NULL)
entry = (struct __vxge_hw_blockpool_entry *)
vmalloc(sizeof(
entry = vmalloc(sizeof(
struct __vxge_hw_blockpool_entry));
else
list_del(&entry->item);
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/net/vxge/vxge-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4602,9 +4602,7 @@ vxge_probe(struct pci_dev *pdev, const struct pci_device_id *pre)

/* Copy the station mac address to the list */
for (i = 0; i < vdev->no_of_vpath; i++) {
entry = (struct vxge_mac_addrs *)
kzalloc(sizeof(struct vxge_mac_addrs),
GFP_KERNEL);
entry = kzalloc(sizeof(struct vxge_mac_addrs), GFP_KERNEL);
if (NULL == entry) {
vxge_debug_init(VXGE_ERR,
"%s: mac_addr_list : memory allocation failed",
Expand Down

0 comments on commit c82469e

Please sign in to comment.