staging: gdm72xx: Add space around '&'
PATCH 1/5 staging: gdm72xx: Add space around '&'
Add space around operator '&'. Problem found using checkpatch.pl
CHECK: spaces preferred around that '&' (ctx:VxV)
--- drivers/staging/gdm72xx/gdm_qos.c | 40 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-)
drivers/staging/gdm72xx/gdm_qos.c +20 -20
@@ -143,18 +143,18 @@ static int chk_ipv4_rule(struct gdm_wimax_csr_s *csr, u8 *stream, u8 *port) {int i; -if (csr->classifier_rule_en&IPTYPEOFSERVICE ) { +if (csr->classifier_rule_en &IPTYPEOFSERVICE ) {if (((stream[1 ] & csr->ip2s_mask) < csr->ip2s_lo) || ((stream[1 ] & csr->ip2s_mask) > csr->ip2s_hi))return 1 ; } -if (csr->classifier_rule_en&PROTOCOL ) { +if (csr->classifier_rule_en &PROTOCOL ) {if (stream[9 ] != csr->protocol)return 1 ; } -if (csr->classifier_rule_en&IPMASKEDSRCADDRESS ) { +if (csr->classifier_rule_en &IPMASKEDSRCADDRESS ) {for (i =0 ; i <4 ; i++) {if ((stream[12 + i] & csr->ipsrc_addrmask[i]) != (csr->ipsrc_addr[i] & csr->ipsrc_addrmask[i]))
@@ -162,7 +162,7 @@ static int chk_ipv4_rule(struct gdm_wimax_csr_s *csr, u8 *stream, u8 *port) } } -if (csr->classifier_rule_en&IPMASKEDDSTADDRESS ) { +if (csr->classifier_rule_en &IPMASKEDDSTADDRESS ) {for (i =0 ; i <4 ; i++) {if ((stream[16 + i] & csr->ipdst_addrmask[i]) != (csr->ipdst_addr[i] & csr->ipdst_addrmask[i]))
@@ -170,14 +170,14 @@ static int chk_ipv4_rule(struct gdm_wimax_csr_s *csr, u8 *stream, u8 *port) } } -if (csr->classifier_rule_en&PROTOCOLSRCPORTRANGE ) { - i = ((port[0 ]<<8 )&0xff00 )+port[1 ]; +if (csr->classifier_rule_en &PROTOCOLSRCPORTRANGE ) { + i = ((port[0 ]<<8 ) &0xff00 )+port[1 ];if ((i < csr->srcport_lo) || (i > csr->srcport_hi))return 1 ; } -if (csr->classifier_rule_en&PROTOCOLDSTPORTRANGE ) { - i = ((port[2 ]<<8 )&0xff00 )+port[3 ]; +if (csr->classifier_rule_en &PROTOCOLDSTPORTRANGE ) { + i = ((port[2 ]<<8 ) &0xff00 )+port[3 ];if ((i < csr->dstport_lo) || (i > csr->dstport_hi))return 1 ; }
@@ -193,7 +193,7 @@ static int get_qos_index(struct nic *nic, u8 *iph, u8 *tcpudph)if (!iph || !tcpudph)return -1 ; - ip_ver = (iph[0 ]>>4 )&0xf ; + ip_ver = (iph[0 ]>>4 ) &0xf ;if (ip_ver !=4 )return -1 ;
@@ -342,9 +342,9 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size)if (sub_cmd_evt ==QOS_REPORT ) {spin_lock_irqsave (&qcb->qos_lock, flags);for (i =0 ; i < qcb->qos_list_cnt; i++) { - sfid = ((buf[(i*5 )+6 ]<<24 )&0xff000000 ); - sfid += ((buf[(i*5 )+7 ]<<16 )&0xff0000 ); - sfid += ((buf[(i*5 )+8 ]<<8 )&0xff00 ); + sfid = ((buf[(i*5 )+6 ]<<24 ) &0xff000000 ); + sfid += ((buf[(i*5 )+7 ]<<16 ) &0xff0000 ); + sfid += ((buf[(i*5 )+8 ]<<8 ) &0xff00 ); sfid += (buf[(i*5 )+9 ]); index =get_csr (qcb, sfid,0 );if (index ==-1 ) {
@@ -363,9 +363,9 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size)/* sub_cmd_evt == QOS_ADD || sub_cmd_evt == QOS_CHANG_DEL */ pos =6 ; - sfid = ((buf[pos++]<<24 )&0xff000000 ); - sfid += ((buf[pos++]<<16 )&0xff0000 ); - sfid += ((buf[pos++]<<8 )&0xff00 ); + sfid = ((buf[pos++]<<24 ) &0xff000000 ); + sfid += ((buf[pos++]<<16 ) &0xff0000 ); + sfid += ((buf[pos++]<<8 ) &0xff00 ); sfid += (buf[pos++]); index =get_csr (qcb, sfid,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;
@@ -406,13 +406,13 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size) qcb->csr[index].ipdst_addr[1 ] = buf[pos++]; qcb->csr[index].ipdst_addr[2 ] = buf[pos++]; qcb->csr[index].ipdst_addr[3 ] = buf[pos++]; - qcb->csr[index].srcport_lo = ((buf[pos++]<<8 )&0xff00 ); + 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++]<<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++]<<8 ) &0xff00 ); qcb->csr[index].dstport_lo += buf[pos++]; - qcb->csr[index].dstport_hi = ((buf[pos++]<<8 )&0xff00 ); + qcb->csr[index].dstport_hi = ((buf[pos++]<<8 ) &0xff00 ); qcb->csr[index].dstport_hi += buf[pos++]; qcb->qos_limit_size =254 /qcb->qos_list_cnt;
Signature · 1 line
1.9.1
PATCH 2/5 staging: gdm72xx: Add space around '-'
Add space around operator '-'. Problem found using checkpatch.pl
CHECK: spaces preferred around that '-' (ctx:VxV)
--- drivers/staging/gdm72xx/gdm_qos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/gdm72xx/gdm_qos.c +2 -2
@@ -101,7 +101,7 @@ void gdm_qos_init(void *nic_ptr) } qcb->qos_list_cnt =0 ; - qcb->qos_null_idx =QOS_MAX -1 ; + qcb->qos_null_idx =QOS_MAX -1 ; qcb->qos_limit_size =255 ;spin_lock_init (&qcb->qos_lock);
@@ -128,7 +128,7 @@ void gdm_qos_release_list(void *nic_ptr) } qcb->qos_list_cnt =0 ; - qcb->qos_null_idx =QOS_MAX -1 ; + qcb->qos_null_idx =QOS_MAX -1 ;for (i =0 ; i <QOS_MAX ; i++) {list_for_each_entry_safe (entry, n, &qcb->qos_list[i], list) {
Signature · 1 line
1.9.1
PATCH 3/5 staging: gdm72xx: Add space around '+'
In reply to Burcin AkalinAdd space around operator '+'. Problem found using checkpatch.pl
CHECK: spaces preferred around that '+' (ctx:VxV)
--- drivers/staging/gdm72xx/gdm_qos.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/staging/gdm72xx/gdm_qos.c +7 -7
@@ -171,13 +171,13 @@ static int chk_ipv4_rule(struct gdm_wimax_csr_s *csr, u8 *stream, u8 *port) }if (csr->classifier_rule_en &PROTOCOLSRCPORTRANGE ) { - i = ((port[0 ]<<8 ) &0xff00 )+port[1 ]; + i = ((port[0 ]<<8 ) &0xff00 ) + port[1 ];if ((i < csr->srcport_lo) || (i > csr->srcport_hi))return 1 ; }if (csr->classifier_rule_en &PROTOCOLDSTPORTRANGE ) { - i = ((port[2 ]<<8 ) &0xff00 )+port[3 ]; + i = ((port[2 ]<<8 ) &0xff00 ) + port[3 ];if ((i < csr->dstport_lo) || (i > csr->dstport_hi))return 1 ; }
@@ -342,17 +342,17 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size)if (sub_cmd_evt ==QOS_REPORT ) {spin_lock_irqsave (&qcb->qos_lock, flags);for (i =0 ; i < qcb->qos_list_cnt; i++) { - sfid = ((buf[(i*5 )+6 ]<<24 ) &0xff000000 ); - sfid += ((buf[(i*5 )+7 ]<<16 ) &0xff0000 ); - sfid += ((buf[(i*5 )+8 ]<<8 ) &0xff00 ); - sfid += (buf[(i*5 )+9 ]); + sfid = ((buf[(i*5 ) +6 ]<<24 ) &0xff000000 ); + sfid += ((buf[(i*5 ) +7 ]<<16 ) &0xff0000 ); + sfid += ((buf[(i*5 ) +8 ]<<8 ) &0xff00 ); + sfid += (buf[(i*5 ) +9 ]); index =get_csr (qcb, sfid,0 );if (index ==-1 ) {spin_unlock_irqrestore (&qcb->qos_lock, flags);netdev_err (nic->netdev,"QoS ERROR: No SF\n" );return ; } - qcb->csr[index].qos_buf_count = buf[(i*5 )+10 ]; + qcb->csr[index].qos_buf_count = buf[(i*5 ) +10 ]; }extract_qos_list (nic, &send_list);
Signature · 1 line
1.9.1
Re: [Outreachy kernel] [PATCH 3/5] staging: gdm72xx: Add space around '+'
Quoted 14 lines · Burcin Akalin
Add space around operator '+'. Problem found using checkpatch.pl
CHECK: spaces preferred around that '+' (ctx:VxV)Signed-off-by Burcin Akalin <[email protected]>--- drivers/staging/gdm72xx/gdm_qos.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/staging/gdm72xx/gdm_qos.c +0
-0
drivers/staging/gdm72xx/gdm_qos.c static int chk_ipv4_rule(struct gdm_wimax_csr_s *csr, u8 *stream, u8 *port) · line 174
Quoted 5 lines
drivers/staging/gdm72xx/gdm_qos.c +1
-1@@ -171,13 +171,13 @@ static int chk_ipv4_rule(struct gdm_wimax_csr_s *csr, u8 *stream, u8 *port) }if (csr->classifier_rule_en &PROTOCOLSRCPORTRANGE ) { - i = ((port[0 ]<<8 ) &0xff00 )+port[1 ]; + i = ((port[0 ]<<8 ) &0xff00 ) + port[1 ];
I think that the <<s should need spaces too. Did checkpatch not complain about that on this patch?
julia
Quoted 43 lines
drivers/staging/gdm72xx/gdm_qos.c +6
-6if ((i < csr->srcport_lo) || (i > csr->srcport_hi))return 1 ; }if (csr->classifier_rule_en &PROTOCOLDSTPORTRANGE ) { - i = ((port[2 ]<<8 ) &0xff00 )+port[3 ]; + i = ((port[2 ]<<8 ) &0xff00 ) + port[3 ];if ((i < csr->dstport_lo) || (i > csr->dstport_hi))return 1 ; }@@ -342,17 +342,17 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size)if (sub_cmd_evt ==QOS_REPORT ) {spin_lock_irqsave (&qcb->qos_lock, flags);for (i =0 ; i < qcb->qos_list_cnt; i++) { - sfid = ((buf[(i*5 )+6 ]<<24 ) &0xff000000 ); - sfid += ((buf[(i*5 )+7 ]<<16 ) &0xff0000 ); - sfid += ((buf[(i*5 )+8 ]<<8 ) &0xff00 ); - sfid += (buf[(i*5 )+9 ]); + sfid = ((buf[(i*5 ) +6 ]<<24 ) &0xff000000 ); + sfid += ((buf[(i*5 ) +7 ]<<16 ) &0xff0000 ); + sfid += ((buf[(i*5 ) +8 ]<<8 ) &0xff00 ); + sfid += (buf[(i*5 ) +9 ]); index =get_csr (qcb, sfid,0 );if (index ==-1 ) {spin_unlock_irqrestore (&qcb->qos_lock, flags);netdev_err (nic->netdev,"QoS ERROR: No SF\n" );return ; } - qcb->csr[index].qos_buf_count = buf[(i*5 )+10 ]; + qcb->csr[index].qos_buf_count = buf[(i*5 ) +10 ]; }extract_qos_list (nic, &send_list);Signature · 8 lines
1.9.1 -- You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1446332212-10079-3-git-send-email-brcnakalin%40gmail.com. For more options, visit https://groups.google.com/d/optout.
PATCH 4/5 staging: gdm72xx: Add space around '/'
In reply to Burcin AkalinAdd space around operator '/'. Problem found using checkpatch.pl
CHECK: spaces preferred around that '/' (ctx:VxV)
--- drivers/staging/gdm72xx/gdm_qos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/gdm72xx/gdm_qos.c +2 -2
@@ -415,7 +415,7 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size) qcb->csr[index].dstport_hi = ((buf[pos++]<<8 ) &0xff00 ); qcb->csr[index].dstport_hi += buf[pos++]; - qcb->qos_limit_size =254 /qcb->qos_list_cnt; + qcb->qos_limit_size =254 / qcb->qos_list_cnt;spin_unlock_irqrestore (&qcb->qos_lock, flags); }else if (sub_cmd_evt ==QOS_CHANGE_DEL ) { netdev_dbg(nic->netdev, "QOS_CHANGE_DEL SFID = 0x%x, index=%d\n",
@@ -426,7 +426,7 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size)spin_lock_irqsave (&qcb->qos_lock, flags); qcb->csr[index].enabled = false; qcb->qos_list_cnt--; - qcb->qos_limit_size =254 /qcb->qos_list_cnt; + qcb->qos_limit_size =254 / qcb->qos_list_cnt;list_for_each_entry_safe (entry, n, &qcb->qos_list[index], list) {
Signature · 1 line
1.9.1
PATCH 5/5 staging: gdm72xx: Add space around '>>'
In reply to Burcin AkalinAdd space around operator '>>'. Problem found using checkpatch.pl
CHECK: spaces preferred around that '>>' (ctx:VxV)
--- drivers/staging/gdm72xx/gdm_qos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/gdm72xx/gdm_qos.c +1 -1
@@ -193,7 +193,7 @@ static int get_qos_index(struct nic *nic, u8 *iph, u8 *tcpudph)if (!iph || !tcpudph)return -1 ; - ip_ver = (iph[0 ]>>4 ) &0xf ; + ip_ver = (iph[0 ] >>4 ) &0xf ;if (ip_ver !=4 )return -1 ;
Signature · 1 line
1.9.1
Greg KH
maintainerQuoted 8 lines · Burcin Akalin
Add space around operator '&'. Problem found using checkpatch.pl
CHECK: spaces preferred around that '&' (ctx:VxV)Signed-off-by Burcin Akalin <[email protected]>--- drivers/staging/gdm72xx/gdm_qos.c | 40 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-)
You sent this same patch 2 days ago, right? Please always let me know, otherwise it confuses maintainers...