public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: "Weng, Wending" <WWeng@rheinmetall.ca>
Cc: "'linux-bluetooth@vger.kernel.org'" <linux-bluetooth@vger.kernel.org>
Subject: RE: patch for hci_bcsp.c(2.6.31.-rc1)
Date: Mon, 24 Aug 2009 11:37:47 -0700	[thread overview]
Message-ID: <1251139067.2950.57.camel@localhost.localdomain> (raw)
In-Reply-To: <54B31811B83D744D90BF0289EB447D460C1A5046@MAIL-MB1.oerlikon.ca>

Hi Wending,

>         replace >= with > will not work. Below is the new patch.
> 
> From: root <root@SBC_PC_3.localdomain>
> Date: Mon, 24 Aug 2009 14:06:18 -0400
> Subject: [PATCH] The routine bcsp_pkt_cull displays the false error message
> "Removed only %u out of %u pkts" when multiple to be acked packets are queued.
> As if (i++ >= pkts_to_be_removed)
>         break;
>    will breaks the loop and increase the counter i when i==pkts_to_be_removed,
>    the loop ends up with i=pkts_to_be_removed+1. The following line:
>    if (i != pkts_to_be_removed) {
>         BT_ERR("Removed only %u out of %u pkts", i, pkts_to_be_removed);
>    }
>    will display the false message.
> The counter i must not increase on the same line.
> ---
>  drivers/bluetooth/hci_bcsp.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/bluetooth/hci_bcsp.c b/drivers/bluetooth/hci_bcsp.c
> index 894b2cb..40aec0f 100644
> --- a/drivers/bluetooth/hci_bcsp.c
> +++ b/drivers/bluetooth/hci_bcsp.c
> @@ -373,8 +373,9 @@ static void bcsp_pkt_cull(struct bcsp_struct *bcsp)
> 
>         i = 0;
>         skb_queue_walk_safe(&bcsp->unack, skb, tmp) {
> -               if (i++ >= pkts_to_be_removed)
> +               if (i >= pkts_to_be_removed)
>                         break;
> +               i++;
> 
>                 __skb_unlink(skb, &bcsp->unack);
>                 kfree_skb(skb);

looks good, but I need a patch that applies with bluetooth-testing.git
tree. And please create it with git format-patch.

Regards

Marcel



  reply	other threads:[~2009-08-24 18:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-19 13:19 patch for hci_bcsp.c(2.6.31.-rc1) Weng, Wending
2009-08-22 20:05 ` Marcel Holtmann
2009-08-24 14:03   ` Weng, Wending
2009-08-24 17:19     ` Marcel Holtmann
2009-08-24 18:33       ` Weng, Wending
2009-08-24 18:37         ` Marcel Holtmann [this message]
2009-08-24 20:19           ` patch for hci_bcsp.c(bluetooth-testing) Weng, Wending
2009-08-24 20:34             ` Marcel Holtmann

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=1251139067.2950.57.camel@localhost.localdomain \
    --to=marcel@holtmann.org \
    --cc=WWeng@rheinmetall.ca \
    --cc=linux-bluetooth@vger.kernel.org \
    /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