* [PATCH] isdn: Remove unnecessary cast in kfree
@ 2016-01-26 18:36 Amitoj Kaur Chawla
0 siblings, 0 replies; only message in thread
From: Amitoj Kaur Chawla @ 2016-01-26 18:36 UTC (permalink / raw)
To: isdn, netdev, linux-kernel; +Cc: julia.lawall
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@gmail.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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-01-26 18:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-26 18:36 [PATCH] isdn: Remove unnecessary cast in kfree Amitoj Kaur Chawla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox