drivers:staging:gdm72xx Fix line over 80 characters
PATCH 1/1 drivers:staging:gdm72xx Fix line over 80 characters
This fixes line over 80 character messages from checkpatch.pl
--- drivers/staging/gdm72xx/gdm_qos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/gdm72xx/gdm_qos.c +1 -1
@@ -382,7 +382,7 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size)spin_lock_irqsave (&qcb->qos_lock, flags); qcb->csr[index].sfid = sfid; - qcb->csr[index].classifier_rule_en = ((buf[pos++] <<8 ) &0xff00 ); + qcb->csr[index].classifier_rule_en = (buf[pos++] <<8 ) &0xff00 ; qcb->csr[index].classifier_rule_en += buf[pos++];if (qcb->csr[index].classifier_rule_en ==0 ) qcb->qos_null_idx = index;
Signature · 1 line
2.1.4
Quoted 1 line · Bogicevic Sasa
This fixes line over 80 character messages from checkpatch.pl
[]
drivers/staging/gdm72xx/gdm_qos.c
Quoted 1 line
drivers/staging/gdm72xx/gdm_qos.c +0
-0
[]
drivers/staging/gdm72xx/gdm_qos.c void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size) · line 388
Quoted 9 lines
drivers/staging/gdm72xx/gdm_qos.c +1
-1@@ -382,7 +382,7 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size)spin_lock_irqsave (&qcb->qos_lock, flags); qcb->csr[index].sfid = sfid; - qcb->csr[index].classifier_rule_en = ((buf[pos++] <<8 ) &0xff00 ); + qcb->csr[index].classifier_rule_en = (buf[pos++] <<8 ) &0xff00 ; qcb->csr[index].classifier_rule_en += buf[pos++];if (qcb->csr[index].classifier_rule_en ==0 ) qcb->qos_null_idx = index;
If you do this one, please do all of them in the
same block.
qcb->csr[index].srcport_lo = ((buf[pos++]<<8)&0xff00); qcb->csr[index].srcport_lo += buf[pos++]; qcb->csr[index].srcport_hi = ((buf[pos++]<<8)&0xff00); qcb->csr[index].srcport_hi += buf[pos++]; qcb->csr[index].dstport_lo = ((buf[pos++]<<8)&0xff00); qcb->csr[index].dstport_lo += buf[pos++]; qcb->csr[index].dstport_hi = ((buf[pos++]<<8)&0xff00);
It'd probably be nicer to use a temporary for
qcb->csr[index] too.
Also, the += is kind of odd. These are really a le16_to_cpu conversion, so it might be nicer to use that mechanism.
csr->srcport_lo = get_unaligned_le16(&buf[pos]); pos += 2;
Quoted 29 lines · Joe Perches
Quoted 1 line · Bogicevic Sasa
This fixes line over 80 character messages from checkpatch.pl
[]
drivers/staging/gdm72xx/gdm_qos.c
Quoted 1 line
drivers/staging/gdm72xx/gdm_qos.c +0
-0[]
drivers/staging/gdm72xx/gdm_qos.c void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size) · line 388
Quoted 9 lines
drivers/staging/gdm72xx/gdm_qos.c +1
-1@@ -382,7 +382,7 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size)spin_lock_irqsave (&qcb->qos_lock, flags); qcb->csr[index].sfid = sfid; - qcb->csr[index].classifier_rule_en = ((buf[pos++] <<8 ) &0xff00 ); + qcb->csr[index].classifier_rule_en = (buf[pos++] <<8 ) &0xff00 ; qcb->csr[index].classifier_rule_en += buf[pos++];if (qcb->csr[index].classifier_rule_en ==0 ) qcb->qos_null_idx = index;If you do this one, please do all of them in the
same block.qcb->csr[index].srcport_lo = ((buf[pos++]<<8)&0xff00); qcb->csr[index].srcport_lo += buf[pos++]; qcb->csr[index].srcport_hi = ((buf[pos++]<<8)&0xff00); qcb->csr[index].srcport_hi += buf[pos++]; qcb->csr[index].dstport_lo = ((buf[pos++]<<8)&0xff00); qcb->csr[index].dstport_lo += buf[pos++]; qcb->csr[index].dstport_hi = ((buf[pos++]<<8)&0xff00);It'd probably be nicer to use a temporary for
qcb->csr[index] too.
Quoted 8 lines
Also, the += is kind of odd. These are really a
le16_to_cpuconversion, so it might be nicer to use that mechanism.csr->srcport_lo = get_unaligned_le16(&buf[pos]); pos += 2;
It is not a problem to remove unnecesarry brackets but bear in mind I am new to bitwise stuff. So how it should be, like this?
qcb->csr[index].srcport_lo = get_unaligned_le16(&buf[pos]); pos += 2; qcb->csr[index].srcport_lo = buf[pos];
Quoted 34 lines · Bogicevic Sasa
Quoted 33 lines · Joe Perches
Quoted 1 line · Bogicevic Sasa
This fixes line over 80 character messages from checkpatch.pl
[]
drivers/staging/gdm72xx/gdm_qos.c
Quoted 1 line
drivers/staging/gdm72xx/gdm_qos.c +0
-0[]
drivers/staging/gdm72xx/gdm_qos.c void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size) · line 388
Quoted 9 lines
drivers/staging/gdm72xx/gdm_qos.c +1
-1@@ -382,7 +382,7 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size)spin_lock_irqsave (&qcb->qos_lock, flags); qcb->csr[index].sfid = sfid; - qcb->csr[index].classifier_rule_en = ((buf[pos++] <<8 ) &0xff00 ); + qcb->csr[index].classifier_rule_en = (buf[pos++] <<8 ) &0xff00 ; qcb->csr[index].classifier_rule_en += buf[pos++];if (qcb->csr[index].classifier_rule_en ==0 ) qcb->qos_null_idx = index;If you do this one, please do all of them in the
same block.qcb->csr[index].srcport_lo = ((buf[pos++]<<8)&0xff00); qcb->csr[index].srcport_lo += buf[pos++]; qcb->csr[index].srcport_hi = ((buf[pos++]<<8)&0xff00); qcb->csr[index].srcport_hi += buf[pos++]; qcb->csr[index].dstport_lo = ((buf[pos++]<<8)&0xff00); qcb->csr[index].dstport_lo += buf[pos++]; qcb->csr[index].dstport_hi = ((buf[pos++]<<8)&0xff00);It'd probably be nicer to use a temporary for
qcb->csr[index] too.Also, the += is kind of odd. These are really a
le16_to_cpuconversion, so it might be nicer to use that mechanism.
Quoted 6 lines
Quoted 4 lines
csr->srcport_lo = get_unaligned_le16(&buf[pos]); pos += 2;It is not a problem to remove unnecesarry brackets but bear in mind I am new to bitwise stuff.
No worries, it's not that obvious.
Quoted 5 lines
So how it should be, like this?
qcb->csr[index].srcport_lo = get_unaligned_le16(&buf[pos]); pos += 2; qcb->csr[index].srcport_lo = buf[pos];
No, it'd be:
csr->srcport_lo = get_unaligned_le16(&buf[pos]); pos += 2; csr->srcport_hi = get_unaligned_le16(&buf[pos]); pos += 2; csr->dstport_lo = get_unaligned_le16(&buf[pos]); pos += 2; csr->dstport_hi = get_unaligned_le16(&buf[pos]); pos += 2;
Quoted 52 lines · Joe Perches
Quoted 34 lines · Bogicevic Sasa
Quoted 33 lines · Joe Perches
Quoted 1 line · Bogicevic Sasa
This fixes line over 80 character messages from checkpatch.pl
[]
drivers/staging/gdm72xx/gdm_qos.c
Quoted 1 line
drivers/staging/gdm72xx/gdm_qos.c +0
-0[]
drivers/staging/gdm72xx/gdm_qos.c void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size) · line 388
Quoted 9 lines
drivers/staging/gdm72xx/gdm_qos.c +1
-1@@ -382,7 +382,7 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size)spin_lock_irqsave (&qcb->qos_lock, flags); qcb->csr[index].sfid = sfid; - qcb->csr[index].classifier_rule_en = ((buf[pos++] <<8 ) &0xff00 ); + qcb->csr[index].classifier_rule_en = (buf[pos++] <<8 ) &0xff00 ; qcb->csr[index].classifier_rule_en += buf[pos++];if (qcb->csr[index].classifier_rule_en ==0 ) qcb->qos_null_idx = index;If you do this one, please do all of them in the
same block.qcb->csr[index].srcport_lo = ((buf[pos++]<<8)&0xff00); qcb->csr[index].srcport_lo += buf[pos++]; qcb->csr[index].srcport_hi = ((buf[pos++]<<8)&0xff00); qcb->csr[index].srcport_hi += buf[pos++]; qcb->csr[index].dstport_lo = ((buf[pos++]<<8)&0xff00); qcb->csr[index].dstport_lo += buf[pos++]; qcb->csr[index].dstport_hi = ((buf[pos++]<<8)&0xff00);It'd probably be nicer to use a temporary for
qcb->csr[index] too.Also, the += is kind of odd. These are really a
le16_to_cpuconversion, so it might be nicer to use that mechanism.Quoted 6 lines
Quoted 4 lines
csr->srcport_lo = get_unaligned_le16(&buf[pos]); pos += 2;It is not a problem to remove unnecesarry brackets but bear in mind I am new to bitwise stuff.
No worries, it's not that obvious.
Quoted 5 lines
So how it should be, like this?
qcb->csr[index].srcport_lo = get_unaligned_le16(&buf[pos]); pos += 2; qcb->csr[index].srcport_lo = buf[pos];No, it'd be:
Quoted 10 lines
csr->srcport_lo = get_unaligned_le16(&buf[pos]); pos += 2; csr->srcport_hi = get_unaligned_le16(&buf[pos]); pos += 2; csr->dstport_lo = get_unaligned_le16(&buf[pos]); pos += 2; csr->dstport_hi = get_unaligned_le16(&buf[pos]); pos += 2;
Ah ok Ill do it like that than and resend