aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vxge/vxge-config.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-11-27 18:05:45 -0500
committerDavid S. Miller <davem@davemloft.net>2010-11-28 20:26:23 -0500
commite80be0b0ee307a2801e57cf36333d3d659e4bcc6 (patch)
tree1f8ec30ea9898c6002c31179025a094f34975194 /drivers/net/vxge/vxge-config.c
parentf3167460144cd2c24b964a32d40d32f851b5d5f4 (diff)
vxge: remove unnecessary [kv][mcz]alloc casts
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxge/vxge-config.c')
-rw-r--r--drivers/net/vxge/vxge-config.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/net/vxge/vxge-config.c b/drivers/net/vxge/vxge-config.c
index 44d3ddd37b3e..a0241fe72d8b 100644
--- a/drivers/net/vxge/vxge-config.c
+++ b/drivers/net/vxge/vxge-config.c
@@ -1219,8 +1219,7 @@ vxge_hw_device_initialize(
1219 if (status != VXGE_HW_OK) 1219 if (status != VXGE_HW_OK)
1220 goto exit; 1220 goto exit;
1221 1221
1222 hldev = (struct __vxge_hw_device *) 1222 hldev = vzalloc(sizeof(struct __vxge_hw_device));
1223 vzalloc(sizeof(struct __vxge_hw_device));
1224 if (hldev == NULL) { 1223 if (hldev == NULL) {
1225 status = VXGE_HW_ERR_OUT_OF_MEMORY; 1224 status = VXGE_HW_ERR_OUT_OF_MEMORY;
1226 goto exit; 1225 goto exit;
@@ -2140,8 +2139,7 @@ __vxge_hw_mempool_create(
2140 goto exit; 2139 goto exit;
2141 } 2140 }
2142 2141
2143 mempool = (struct vxge_hw_mempool *) 2142 mempool = vzalloc(sizeof(struct vxge_hw_mempool));
2144 vzalloc(sizeof(struct vxge_hw_mempool));
2145 if (mempool == NULL) { 2143 if (mempool == NULL) {
2146 status = VXGE_HW_ERR_OUT_OF_MEMORY; 2144 status = VXGE_HW_ERR_OUT_OF_MEMORY;
2147 goto exit; 2145 goto exit;
@@ -2165,7 +2163,7 @@ __vxge_hw_mempool_create(
2165 2163
2166 /* allocate array of memblocks */ 2164 /* allocate array of memblocks */
2167 mempool->memblocks_arr = 2165 mempool->memblocks_arr =
2168 (void **) vzalloc(sizeof(void *) * mempool->memblocks_max); 2166 vzalloc(sizeof(void *) * mempool->memblocks_max);
2169 if (mempool->memblocks_arr == NULL) { 2167 if (mempool->memblocks_arr == NULL) {
2170 __vxge_hw_mempool_destroy(mempool); 2168 __vxge_hw_mempool_destroy(mempool);
2171 status = VXGE_HW_ERR_OUT_OF_MEMORY; 2169 status = VXGE_HW_ERR_OUT_OF_MEMORY;
@@ -2175,7 +2173,7 @@ __vxge_hw_mempool_create(
2175 2173
2176 /* allocate array of private parts of items per memblocks */ 2174 /* allocate array of private parts of items per memblocks */
2177 mempool->memblocks_priv_arr = 2175 mempool->memblocks_priv_arr =
2178 (void **) vzalloc(sizeof(void *) * mempool->memblocks_max); 2176 vzalloc(sizeof(void *) * mempool->memblocks_max);
2179 if (mempool->memblocks_priv_arr == NULL) { 2177 if (mempool->memblocks_priv_arr == NULL) {
2180 __vxge_hw_mempool_destroy(mempool); 2178 __vxge_hw_mempool_destroy(mempool);
2181 status = VXGE_HW_ERR_OUT_OF_MEMORY; 2179 status = VXGE_HW_ERR_OUT_OF_MEMORY;
@@ -2184,7 +2182,7 @@ __vxge_hw_mempool_create(
2184 } 2182 }
2185 2183
2186 /* allocate array of memblocks DMA objects */ 2184 /* allocate array of memblocks DMA objects */
2187 mempool->memblocks_dma_arr = (struct vxge_hw_mempool_dma *) 2185 mempool->memblocks_dma_arr =
2188 vzalloc(sizeof(struct vxge_hw_mempool_dma) * 2186 vzalloc(sizeof(struct vxge_hw_mempool_dma) *
2189 mempool->memblocks_max); 2187 mempool->memblocks_max);
2190 2188
@@ -2196,8 +2194,7 @@ __vxge_hw_mempool_create(
2196 } 2194 }
2197 2195
2198 /* allocate hash array of items */ 2196 /* allocate hash array of items */
2199 mempool->items_arr = 2197 mempool->items_arr = vzalloc(sizeof(void *) * mempool->items_max);
2200 (void **) vzalloc(sizeof(void *) * mempool->items_max);
2201 if (mempool->items_arr == NULL) { 2198 if (mempool->items_arr == NULL) {
2202 __vxge_hw_mempool_destroy(mempool); 2199 __vxge_hw_mempool_destroy(mempool);
2203 status = VXGE_HW_ERR_OUT_OF_MEMORY; 2200 status = VXGE_HW_ERR_OUT_OF_MEMORY;
@@ -4258,8 +4255,7 @@ vxge_hw_vpath_open(struct __vxge_hw_device *hldev,
4258 if (status != VXGE_HW_OK) 4255 if (status != VXGE_HW_OK)
4259 goto vpath_open_exit1; 4256 goto vpath_open_exit1;
4260 4257
4261 vp = (struct __vxge_hw_vpath_handle *) 4258 vp = vzalloc(sizeof(struct __vxge_hw_vpath_handle));
4262 vzalloc(sizeof(struct __vxge_hw_vpath_handle));
4263 if (vp == NULL) { 4259 if (vp == NULL) {
4264 status = VXGE_HW_ERR_OUT_OF_MEMORY; 4260 status = VXGE_HW_ERR_OUT_OF_MEMORY;
4265 goto vpath_open_exit2; 4261 goto vpath_open_exit2;
@@ -5065,8 +5061,7 @@ static void vxge_hw_blockpool_block_add(struct __vxge_hw_device *devh,
5065 item); 5061 item);
5066 5062
5067 if (entry == NULL) 5063 if (entry == NULL)
5068 entry = (struct __vxge_hw_blockpool_entry *) 5064 entry = vmalloc(sizeof(struct __vxge_hw_blockpool_entry));
5069 vmalloc(sizeof(struct __vxge_hw_blockpool_entry));
5070 else 5065 else
5071 list_del(&entry->item); 5066 list_del(&entry->item);
5072 5067
@@ -5182,8 +5177,7 @@ __vxge_hw_blockpool_free(struct __vxge_hw_device *devh,
5182 item); 5177 item);
5183 5178
5184 if (entry == NULL) 5179 if (entry == NULL)
5185 entry = (struct __vxge_hw_blockpool_entry *) 5180 entry = vmalloc(sizeof(
5186 vmalloc(sizeof(
5187 struct __vxge_hw_blockpool_entry)); 5181 struct __vxge_hw_blockpool_entry));
5188 else 5182 else
5189 list_del(&entry->item); 5183 list_del(&entry->item);