2014-06-23 13:29:47

by Loic Poulain

[permalink] [raw]
Subject: [PATCH] Bluetooth: Remove redundant calls to h5_reset_rx

h5_reset_rx is unconditionally called at the end of
h5_complete_rx_pkt, no need to call it anymore after
that.

Signed-off-by: Loic Poulain <[email protected]>
---
drivers/bluetooth/hci_h5.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
index 04680ea..e521730 100644
--- a/drivers/bluetooth/hci_h5.c
+++ b/drivers/bluetooth/hci_h5.c
@@ -358,7 +358,6 @@ static int h5_rx_crc(struct hci_uart *hu, unsigned char c)
struct h5 *h5 = hu->priv;

h5_complete_rx_pkt(hu);
- h5_reset_rx(h5);

return 0;
}
@@ -373,7 +372,6 @@ static int h5_rx_payload(struct hci_uart *hu, unsigned char c)
h5->rx_pending = 2;
} else {
h5_complete_rx_pkt(hu);
- h5_reset_rx(h5);
}

return 0;
--
1.8.3.2


2014-06-23 13:37:39

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: Remove redundant calls to h5_reset_rx

Hi Loic,

> h5_reset_rx is unconditionally called at the end of
> h5_complete_rx_pkt, no need to call it anymore after
> that.
>
> Signed-off-by: Loic Poulain <[email protected]>
> ---
> drivers/bluetooth/hci_h5.c | 2 --
> 1 file changed, 2 deletions(-)

you need to fix this:

CC drivers/bluetooth/hci_h5.o
drivers/bluetooth/hci_h5.c: In function ?h5_rx_crc?:
drivers/bluetooth/hci_h5.c:358:13: warning: unused variable ?h5? [-Wunused-variable]
struct h5 *h5 = hu->priv;
^
Regards

Marcel