[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0711202151430.25786@ask.diku.dk>
Date: Tue, 20 Nov 2007 21:52:37 +0100 (CET)
From: Julia Lawall <julia@...u.dk>
To: marcel@...tmann.org, maxk@...lcomm.com,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH] drivers/bluetooth: Convert kfree to kfree_skb
From: Julia Lawall <julia@...u.dk>
kfree_skb rather than kfree should be used for values of type struct
sk_buff *.
This was fixed using the following semantic patch
(http://www.emn.fr/x-info/coccinelle/).
// <smpl>
@@
struct sk_buff *skb;
@@
- kfree(skb)
+ kfree_skb(skb)
// </smpl>
Signed-off-by: Julia Lawall <julia@...u.dk>
---
diff -u -p a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c
--- a/drivers/bluetooth/bpa10x.c 2007-11-01 10:30:39.000000000 +0100
+++ b/drivers/bluetooth/bpa10x.c 2007-11-20 21:07:42.000000000 +0100
@@ -446,8 +446,8 @@ static void bpa10x_destruct(struct hci_d
BT_DBG("%s", hdev->name);
- kfree(data->rx_skb[0]);
- kfree(data->rx_skb[1]);
+ kfree_skb(data->rx_skb[0]);
+ kfree_skb(data->rx_skb[1]);
kfree(data);
}
diff -u -p a/drivers/bluetooth/btsdio.c b/drivers/bluetooth/btsdio.c
--- a/drivers/bluetooth/btsdio.c 2007-11-01 10:30:39.000000000 +0100
+++ b/drivers/bluetooth/btsdio.c 2007-11-20 21:07:44.000000000 +0100
@@ -152,7 +152,7 @@ static int btsdio_rx_packet(struct btsdi
err = sdio_readsb(data->func, skb->data, REG_RDAT, len - 4);
if (err < 0) {
- kfree(skb);
+ kfree_skb(skb);
return err;
}
@@ -163,7 +163,7 @@ static int btsdio_rx_packet(struct btsdi
err = hci_recv_frame(skb);
if (err < 0) {
- kfree(skb);
+ kfree_skb(skb);
return err;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists