mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
To: Vlad Yasevich <vyasevich@gmail.com>,
	Sridhar Samudrala <sri@us.ibm.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-sctp@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH 18/18] net: sctp: remove cast for kmalloc/kzalloc return value
Date: Tue, 12 Mar 2013 13:39:47 +0800	[thread overview]
Message-ID: <513EBFA3.4070303@cn.fujitsu.com> (raw)
In-Reply-To: <513EB23D.7020303@cn.fujitsu.com>

remove cast for kmalloc/kzalloc return value.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.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
---
 include/net/sctp/sctp.h |    2 +-
 net/sctp/protocol.c     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index df85a0c..cd89510 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -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) \
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 1c2e46c..eaee00c 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -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");
-- 
1.7.1


  parent reply	other threads:[~2013-03-12  5:41 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-12  4:42 [PATCH 01/18] arm: remove cast for kzalloc " Zhang Yanfei
2013-03-12  4:47 ` [PATCH 02/18] ia64: remove cast for kmalloc " Zhang Yanfei
2013-03-12  4:54 ` [PATCH 03/18] powerpc: remove cast for kmalloc/kzalloc " Zhang Yanfei
2013-03-12  4:58 ` [PATCH 04/18] x86: platform: mrst: remove cast for kmalloc " Zhang Yanfei
2013-03-12  8:50   ` [tip:x86/platform] x86/platform/intel/mrst: Remove cast for kmalloc() " tip-bot for Zhang Yanfei
2013-03-12  5:03 ` [PATCH 05/18] driver: staging: csr: remove cast for kmalloc " Zhang Yanfei
2013-03-12  5:07 ` [PATCH 06/18] driver: gpu: drm: i915: remove cast for kzalloc " Zhang Yanfei
2013-03-12  5:10 ` [PATCH 07/18] driver: hv: remove cast for kmalloc " Zhang Yanfei
2013-03-12  5:13 ` [PATCH 08/18] driver: isdn: capi: " Zhang Yanfei
2013-03-12 15:41   ` David Miller
2013-03-12  5:15 ` [PATCH 09/18] driver: isdn: hisax: remove cast for kmalloc/kzalloc " Zhang Yanfei
2013-03-12 15:41   ` David Miller
2013-03-12  5:18 ` [PATCH 10/18] driver: s390: block: remove cast for kzalloc " Zhang Yanfei
2013-03-12  7:22   ` Heiko Carstens
2013-03-12  5:22 ` [PATCH 11/18] driver: s390: net: " Zhang Yanfei
2013-03-12  7:25   ` Heiko Carstens
2013-03-12  5:25 ` [PATCH 12/18] driver: scsi: remove cast for kmalloc/kzalloc " Zhang Yanfei
2013-03-12  9:27   ` James Bottomley
2013-03-12 16:32     ` Joe Perches
2013-03-12  5:27 ` [PATCH 13/18] driver: tty: serial: remove cast for kzalloc " Zhang Yanfei
2013-03-12  5:29 ` [PATCH 14/18] driver: tty: vt: remove cast for kmalloc " Zhang Yanfei
2013-03-12  5:33 ` [PATCH 15/18] driver: usb: storage: " Zhang Yanfei
2013-03-12  5:35 ` [PATCH 16/18] fs: befs: " Zhang Yanfei
2013-03-12  5:37 ` [PATCH 17/18] fs: ufs: " Zhang Yanfei
2013-03-12  5:39 ` Zhang Yanfei [this message]
2013-03-12 11:35   ` [PATCH 18/18] net: sctp: remove cast for kmalloc/kzalloc " Neil Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=513EBFA3.4070303@cn.fujitsu.com \
    --to=zhangyanfei@cn.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=sri@us.ibm.com \
    --cc=vyasevich@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome