Bluetooth: Tidy-up coding style in hci_bcsp.c

drivers/bluetooth/hci_bcsp.c contains some style issues as
highlighted by

./scripts/checkpatch.pl --strict -f drivers/bluetooth/hci_bcsp.c

a) comments - maintainer prefers network style comments
b) positioning of lines in multi-line statements
c) spaces after casts
d) missing blank lines after declarations

Therefore, tidy-up the above to make it easier to apply
future code changes that have conforming style.

Signed-off-by: Dean Jenkins <Dean_Jenkins@mentor.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Dean Jenkins 2016-09-23 18:56:26 +01:00 committed by Marcel Holtmann
parent acf91ec384
commit 8083ad1cf9

View File

@ -90,7 +90,8 @@ struct bcsp_struct {
/* ---- BCSP CRC calculation ---- */
/* Table for calculating CRC for polynomial 0x1021, LSB processed first,
initial value 0xffff, bits shifted in reverse order. */
* initial value 0xffff, bits shifted in reverse order.
*/
static const u16 crc_table[] = {
0x0000, 0x1081, 0x2102, 0x3183,
@ -213,6 +214,7 @@ static struct sk_buff *bcsp_prepare_pkt(struct bcsp_struct *bcsp, u8 *data,
/* Vendor specific commands */
if (hci_opcode_ogf(__le16_to_cpu(opcode)) == 0x3f) {
u8 desc = *(data + HCI_COMMAND_HDR_SIZE);
if ((desc & 0xf0) == 0xc0) {
data += HCI_COMMAND_HDR_SIZE + 1;
len -= HCI_COMMAND_HDR_SIZE + 1;
@ -287,7 +289,8 @@ static struct sk_buff *bcsp_dequeue(struct hci_uart *hu)
struct sk_buff *skb;
/* First of all, check for unreliable messages in the queue,
since they have priority */
* since they have priority
*/
skb = skb_dequeue(&bcsp->unrel);
if (skb != NULL) {
@ -594,8 +597,8 @@ static int bcsp_recv(struct hci_uart *hu, const void *data, int count)
bcsp->rx_count = 0;
continue;
}
if (bcsp->rx_skb->data[0] & 0x80 /* reliable pkt */
&& (bcsp->rx_skb->data[0] & 0x07) != bcsp->rxseq_txack) {
if (bcsp->rx_skb->data[0] & 0x80 && /* reliable pkt */
(bcsp->rx_skb->data[0] & 0x07) != bcsp->rxseq_txack) {
BT_ERR("Out-of-order packet arrived, got %u expected %u",
bcsp->rx_skb->data[0] & 0x07, bcsp->rxseq_txack);