On Sat, 2015-10-31 at 17:38 +0100, Bogicevic Sasa wrote:It is not a problem to remove unnecesarry brackets but bear in mind I am
This fixes line over 80 character messages from checkpatch.pl[]
diff --git a/drivers/staging/gdm72xx/gdm_qos.c b/drivers/staging/gdm72xx/gdm_qos.c[]
@@ -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;