aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/ctcm_main.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-05-16 17:15:13 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-18 01:42:54 -0400
commitae57b20a0a1d3aa6cc35b51355949177de94aece (patch)
treee75b39b31da224459e2f87557ea2110568755e97 /drivers/s390/net/ctcm_main.c
parent95718c1c25370b2c85061a4d8dfab2831b3ad280 (diff)
drivers/s390/net: Drop memory allocation cast
Drop cast on the result of kmalloc and similar functions. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ type T; @@ - (T *) (\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...)) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/ctcm_main.c')
-rw-r--r--drivers/s390/net/ctcm_main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c
index e35713dd0504..4ecafbf91211 100644
--- a/drivers/s390/net/ctcm_main.c
+++ b/drivers/s390/net/ctcm_main.c
@@ -1364,8 +1364,7 @@ static int add_channel(struct ccw_device *cdev, enum ctcm_channel_types type,
1364 1364
1365 ch->protocol = priv->protocol; 1365 ch->protocol = priv->protocol;
1366 if (IS_MPC(priv)) { 1366 if (IS_MPC(priv)) {
1367 ch->discontact_th = (struct th_header *) 1367 ch->discontact_th = kzalloc(TH_HEADER_LENGTH, gfp_type());
1368 kzalloc(TH_HEADER_LENGTH, gfp_type());
1369 if (ch->discontact_th == NULL) 1368 if (ch->discontact_th == NULL)
1370 goto nomem_return; 1369 goto nomem_return;
1371 1370
@@ -1379,8 +1378,7 @@ static int add_channel(struct ccw_device *cdev, enum ctcm_channel_types type,
1379 } else 1378 } else
1380 ccw_num = 8; 1379 ccw_num = 8;
1381 1380
1382 ch->ccw = (struct ccw1 *) 1381 ch->ccw = kzalloc(ccw_num * sizeof(struct ccw1), GFP_KERNEL | GFP_DMA);
1383 kzalloc(ccw_num * sizeof(struct ccw1), GFP_KERNEL | GFP_DMA);
1384 if (ch->ccw == NULL) 1382 if (ch->ccw == NULL)
1385 goto nomem_return; 1383 goto nomem_return;
1386 1384