Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1005/?format=api
{ "id": 1005, "url": "http://patchwork.ozlabs.org/api/patches/1005/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20080922.191241.229288039.davem@davemloft.net/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api", "name": "Linux network development", "link_name": "netdev", "list_id": "netdev.vger.kernel.org", "list_email": "netdev@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20080922.191241.229288039.davem@davemloft.net>", "list_archive_url": null, "date": "2008-09-23T02:12:41", "name": "[5/7] : bluetooth: hci_bcsp: Use SKB list interfaces instead of home-grown stuff.", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "b8c36190df1d1c0e2485ff6e703225e2a56b39ee", "submitter": { "id": 15, "url": "http://patchwork.ozlabs.org/api/people/15/?format=api", "name": "David Miller", "email": "davem@davemloft.net" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20080922.191241.229288039.davem@davemloft.net/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/1005/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1005/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<netdev-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.176.167])\n\tby ozlabs.org (Postfix) with ESMTP id 90752DDEF3\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 23 Sep 2008 12:13:08 +1000 (EST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1754128AbYIWCM4 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 22 Sep 2008 22:12:56 -0400", "(majordomo@vger.kernel.org) by vger.kernel.org id S1754134AbYIWCMz\n\t(ORCPT <rfc822; netdev-outgoing>); Mon, 22 Sep 2008 22:12:55 -0400", "from 74-93-104-97-Washington.hfc.comcastbusiness.net\n\t([74.93.104.97]:37179\n\t\"EHLO sunset.davemloft.net\" rhost-flags-OK-FAIL-OK-OK)\n\tby vger.kernel.org with ESMTP id S1754131AbYIWCMx (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 22 Sep 2008 22:12:53 -0400", "from localhost (localhost [127.0.0.1])\n\tby sunset.davemloft.net (Postfix) with ESMTP id E6EB1C8C181\n\tfor <netdev@vger.kernel.org>; Mon, 22 Sep 2008 19:12:41 -0700 (PDT)" ], "Date": "Mon, 22 Sep 2008 19:12:41 -0700 (PDT)", "Message-Id": "<20080922.191241.229288039.davem@davemloft.net>", "To": "netdev@vger.kernel.org", "Subject": "[PATCH 5/7]: bluetooth: hci_bcsp: Use SKB list interfaces instead\n\tof home-grown stuff.", "From": "David Miller <davem@davemloft.net>", "X-Mailer": "Mew version 6.1 on Emacs 22.1 / Mule 5.0 (SAKAKI)", "Mime-Version": "1.0", "Content-Type": "Text/Plain; charset=us-ascii", "Content-Transfer-Encoding": "7bit", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "bluetooth: hci_bcsp: Use SKB list interfaces instead of home-grown stuff.\n\nSigned-off-by: David S. Miller <davem@davemloft.net>\n---\n drivers/bluetooth/hci_bcsp.c | 18 +++++++++---------\n 1 files changed, 9 insertions(+), 9 deletions(-)", "diff": "diff --git a/drivers/bluetooth/hci_bcsp.c b/drivers/bluetooth/hci_bcsp.c\nindex 4d37bb3..7938062 100644\n--- a/drivers/bluetooth/hci_bcsp.c\n+++ b/drivers/bluetooth/hci_bcsp.c\n@@ -352,14 +352,14 @@ static int bcsp_flush(struct hci_uart *hu)\n /* Remove ack'ed packets */\n static void bcsp_pkt_cull(struct bcsp_struct *bcsp)\n {\n+\tstruct sk_buff *skb, *tmp;\n \tunsigned long flags;\n-\tstruct sk_buff *skb;\n \tint i, pkts_to_be_removed;\n \tu8 seqno;\n \n \tspin_lock_irqsave(&bcsp->unack.lock, flags);\n \n-\tpkts_to_be_removed = bcsp->unack.qlen;\n+\tpkts_to_be_removed = skb_queue_len(&bcsp->unack);\n \tseqno = bcsp->msgq_txseq;\n \n \twhile (pkts_to_be_removed) {\n@@ -373,19 +373,19 @@ static void bcsp_pkt_cull(struct bcsp_struct *bcsp)\n \t\tBT_ERR(\"Peer acked invalid packet\");\n \n \tBT_DBG(\"Removing %u pkts out of %u, up to seqno %u\",\n-\t\tpkts_to_be_removed, bcsp->unack.qlen, (seqno - 1) & 0x07);\n+\t pkts_to_be_removed, skb_queue_len(&bcsp->unack),\n+\t (seqno - 1) & 0x07);\n \n-\tfor (i = 0, skb = ((struct sk_buff *) &bcsp->unack)->next; i < pkts_to_be_removed\n-\t\t\t&& skb != (struct sk_buff *) &bcsp->unack; i++) {\n-\t\tstruct sk_buff *nskb;\n+\ti = 0;\n+\tskb_queue_walk_safe(&bcsp->unack, skb, tmp) {\n+\t\tif (i++ >= pkts_to_be_removed)\n+\t\t\tbreak;\n \n-\t\tnskb = skb->next;\n \t\t__skb_unlink(skb, &bcsp->unack);\n \t\tkfree_skb(skb);\n-\t\tskb = nskb;\n \t}\n \n-\tif (bcsp->unack.qlen == 0)\n+\tif (skb_queue_empty(&bcsp->unack))\n \t\tdel_timer(&bcsp->tbcsp);\n \n \tspin_unlock_irqrestore(&bcsp->unack.lock, flags);\n", "prefixes": [ "5/7" ] }