net: sctp: remove cast for kmalloc/kzalloc return value
authorZhang Yanfei <zhangyanfei@cn.fujitsu.com>
Tue, 12 Mar 2013 05:39:47 +0000 (13:39 +0800)
committerJiri Kosina <jkosina@suse.cz>
Mon, 18 Mar 2013 13:16:00 +0000 (14:16 +0100)
remove cast for kmalloc/kzalloc return value.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Cc: Vlad Yasevich <vyasevich@gmail.com>
Cc: Sridhar Samudrala <sri@us.ibm.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-sctp@vger.kernel.org
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
include/net/sctp/sctp.h
net/sctp/protocol.c

index df85a0c0f2d52f0b71d02232f0a015e1a805112f..cd89510eab2a44d405c2cba2817b3b7ae863306e 100644 (file)
@@ -576,7 +576,7 @@ for (pos = chunk->subh.fwdtsn_hdr->skip;\
 #define WORD_ROUND(s) (((s)+3)&~3)
 
 /* Make a new instance of type.  */
-#define t_new(type, flags)     (type *)kzalloc(sizeof(type), flags)
+#define t_new(type, flags)     kzalloc(sizeof(type), flags)
 
 /* Compare two timevals.  */
 #define tv_lt(s, t) \
index 1c2e46cb919181f4005164ebe6e38cf5af5ecd6c..eaee00c61139b974572e8c4aed425176f3ae2894 100644 (file)
@@ -1403,7 +1403,7 @@ SCTP_STATIC __init int sctp_init(void)
 
        /* Allocate and initialize the endpoint hash table.  */
        sctp_ep_hashsize = 64;
-       sctp_ep_hashtable = (struct sctp_hashbucket *)
+       sctp_ep_hashtable =
                kmalloc(64 * sizeof(struct sctp_hashbucket), GFP_KERNEL);
        if (!sctp_ep_hashtable) {
                pr_err("Failed endpoint_hash alloc\n");