lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20160126183601.GA29611@amitoj-Inspiron-3542>
Date:	Wed, 27 Jan 2016 00:06:01 +0530
From:	Amitoj Kaur Chawla <amitoj1606@...il.com>
To:	isdn@...ux-pingi.de, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc:	julia.lawall@...6.fr
Subject: [PATCH] isdn: Remove unnecessary cast in kfree

Remove unnecassary casts in the argument to kfree.

Found using Coccinelle. The semantic patch used to find this is as follows:

//<smpl>
@@
type T;
expression *f;
@@

- kfree((T *)(f));
+ kfree(f);
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@...il.com>
---
 drivers/isdn/hisax/fsm.c | 2 +-
 drivers/isdn/mISDN/fsm.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/isdn/hisax/fsm.c b/drivers/isdn/hisax/fsm.c
index c7a9471..497f815 100644
--- a/drivers/isdn/hisax/fsm.c
+++ b/drivers/isdn/hisax/fsm.c
@@ -45,7 +45,7 @@ FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount)
 void
 FsmFree(struct Fsm *fsm)
 {
-	kfree((void *) fsm->jumpmatrix);
+	kfree(fsm->jumpmatrix);
 }
 
 int
diff --git a/drivers/isdn/mISDN/fsm.c b/drivers/isdn/mISDN/fsm.c
index 26477d4..5ac2dac 100644
--- a/drivers/isdn/mISDN/fsm.c
+++ b/drivers/isdn/mISDN/fsm.c
@@ -51,7 +51,7 @@ EXPORT_SYMBOL(mISDN_FsmNew);
 void
 mISDN_FsmFree(struct Fsm *fsm)
 {
-	kfree((void *) fsm->jumpmatrix);
+	kfree(fsm->jumpmatrix);
 }
 EXPORT_SYMBOL(mISDN_FsmFree);
 
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ