staging: wilc1000: linux_mon: Enhance code formatting
PATCH 2/4 staging: wilc1000: linux_mon: Enhance code formatting
Trims line size at 80 characters in linux_mon.c file by moving parts of some lines in new lines.
Fixed the checkpath.pl issue:
CHECK: Line over 80 characters.
Signed-off-by Tamara Diaconita <[email protected]>
--- drivers/staging/wilc1000/linux_mon.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-)
drivers/staging/wilc1000/linux_mon.c +18 -9
@@ -68,18 +68,21 @@ void WILC_WFI_monitor_rx(u8 *buff, u32 size)if (pkt_offset &IS_MANAGMEMENT_CALLBACK ) {/* hostapd callback mgmt frame */ - skb =dev_alloc_skb (size +sizeof (struct wilc_wfi_radiotap_cb_hdr )); + skb =dev_alloc_skb (size + +sizeof (struct wilc_wfi_radiotap_cb_hdr ));if (!skb)return ;memcpy (skb_put (skb, size), buff, size); - cb_hdr = (struct wilc_wfi_radiotap_cb_hdr *)skb_push (skb,sizeof (*cb_hdr)); + cb_hdr = (struct wilc_wfi_radiotap_cb_hdr *)skb_push (skb, +sizeof (*cb_hdr));memset (cb_hdr,0 ,sizeof (struct wilc_wfi_radiotap_cb_hdr )); cb_hdr->hdr.it_version =0 ;/* PKTHDR_RADIOTAP_VERSION; */ - cb_hdr->hdr.it_len =cpu_to_le16 (sizeof (struct wilc_wfi_radiotap_cb_hdr )); + cb_hdr->hdr.it_len = +cpu_to_le16 (sizeof (struct wilc_wfi_radiotap_cb_hdr )); cb_hdr->hdr.it_present = cpu_to_le32( (1 << IEEE80211_RADIOTAP_RATE) |
@@ -95,16 +98,19 @@ void WILC_WFI_monitor_rx(u8 *buff, u32 size) } }else { - skb =dev_alloc_skb (size +sizeof (struct wilc_wfi_radiotap_hdr )); + skb =dev_alloc_skb (size + +sizeof (struct wilc_wfi_radiotap_hdr ));if (!skb)return ;memcpy (skb_put (skb, size), buff, size); - hdr = (struct wilc_wfi_radiotap_hdr *)skb_push (skb,sizeof (*hdr)); + hdr = (struct wilc_wfi_radiotap_hdr *)skb_push (skb, +sizeof (*hdr));memset (hdr,0 ,sizeof (struct wilc_wfi_radiotap_hdr )); hdr->hdr.it_version =0 ;/* PKTHDR_RADIOTAP_VERSION; */ - hdr->hdr.it_len =cpu_to_le16 (sizeof (struct wilc_wfi_radiotap_hdr )); + hdr->hdr.it_len = +cpu_to_le16 (sizeof (struct wilc_wfi_radiotap_hdr )); hdr->hdr.it_present =cpu_to_le32 (1 <<IEEE80211_RADIOTAP_RATE );/* | */ hdr->rate =5 ;/* txrate->bitrate / 5; */
@@ -196,16 +202,19 @@ static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb,skb_pull (skb, rtap_len);if (skb->data[0 ] ==0xc0 && (!(memcmp (broadcast, &skb->data[4 ],6 )))) { - skb2 =dev_alloc_skb (skb->len +sizeof (struct wilc_wfi_radiotap_cb_hdr )); + skb2 =dev_alloc_skb (skb->len + +sizeof (struct wilc_wfi_radiotap_cb_hdr ));memcpy (skb_put (skb2, skb->len), skb->data, skb->len); - cb_hdr = (struct wilc_wfi_radiotap_cb_hdr *)skb_push (skb2,sizeof (*cb_hdr)); + cb_hdr = (struct wilc_wfi_radiotap_cb_hdr *)skb_push (skb2, +sizeof (*cb_hdr));memset (cb_hdr,0 ,sizeof (struct wilc_wfi_radiotap_cb_hdr )); cb_hdr->hdr.it_version =0 ;/* PKTHDR_RADIOTAP_VERSION; */ - cb_hdr->hdr.it_len =cpu_to_le16 (sizeof (struct wilc_wfi_radiotap_cb_hdr )); + cb_hdr->hdr.it_len = +cpu_to_le16 (sizeof (struct wilc_wfi_radiotap_cb_hdr )); cb_hdr->hdr.it_present = cpu_to_le32( (1 << IEEE80211_RADIOTAP_RATE) |
Signature · 1 line
2.9.3
Quoted 6 lines · Tamara Diaconita
Trims line size at 80 characters in
linux_mon.cfile by moving parts of some lines in new lines.Fixed the checkpath.pl issue:
CHECK: Line over 80 characters.Signed-off-by Tamara Diaconita <[email protected]>
Tamara, Same comments from patch 1 about the subject & log message apply here. Patch below looks good to me.
alisons
Quoted 88 lines
--- drivers/staging/wilc1000/linux_mon.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-)drivers/staging/wilc1000/linux_mon.c +18
-9@@ -68,18 +68,21 @@ void WILC_WFI_monitor_rx(u8 *buff, u32 size)if (pkt_offset &IS_MANAGMEMENT_CALLBACK ) {/* hostapd callback mgmt frame */ - skb =dev_alloc_skb (size +sizeof (struct wilc_wfi_radiotap_cb_hdr )); + skb =dev_alloc_skb (size + +sizeof (struct wilc_wfi_radiotap_cb_hdr ));if (!skb)return ;memcpy (skb_put (skb, size), buff, size); - cb_hdr = (struct wilc_wfi_radiotap_cb_hdr *)skb_push (skb,sizeof (*cb_hdr)); + cb_hdr = (struct wilc_wfi_radiotap_cb_hdr *)skb_push (skb, +sizeof (*cb_hdr));memset (cb_hdr,0 ,sizeof (struct wilc_wfi_radiotap_cb_hdr )); cb_hdr->hdr.it_version =0 ;/* PKTHDR_RADIOTAP_VERSION; */ - cb_hdr->hdr.it_len =cpu_to_le16 (sizeof (struct wilc_wfi_radiotap_cb_hdr )); + cb_hdr->hdr.it_len = +cpu_to_le16 (sizeof (struct wilc_wfi_radiotap_cb_hdr )); cb_hdr->hdr.it_present = cpu_to_le32( (1 << IEEE80211_RADIOTAP_RATE) |@@ -95,16 +98,19 @@ void WILC_WFI_monitor_rx(u8 *buff, u32 size) } }else { - skb =dev_alloc_skb (size +sizeof (struct wilc_wfi_radiotap_hdr )); + skb =dev_alloc_skb (size + +sizeof (struct wilc_wfi_radiotap_hdr ));if (!skb)return ;memcpy (skb_put (skb, size), buff, size); - hdr = (struct wilc_wfi_radiotap_hdr *)skb_push (skb,sizeof (*hdr)); + hdr = (struct wilc_wfi_radiotap_hdr *)skb_push (skb, +sizeof (*hdr));memset (hdr,0 ,sizeof (struct wilc_wfi_radiotap_hdr )); hdr->hdr.it_version =0 ;/* PKTHDR_RADIOTAP_VERSION; */ - hdr->hdr.it_len =cpu_to_le16 (sizeof (struct wilc_wfi_radiotap_hdr )); + hdr->hdr.it_len = +cpu_to_le16 (sizeof (struct wilc_wfi_radiotap_hdr )); hdr->hdr.it_present =cpu_to_le32 (1 <<IEEE80211_RADIOTAP_RATE );/* | */ hdr->rate =5 ;/* txrate->bitrate / 5; */ @@ -196,16 +202,19 @@ static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb,skb_pull (skb, rtap_len);if (skb->data[0 ] ==0xc0 && (!(memcmp (broadcast, &skb->data[4 ],6 )))) { - skb2 =dev_alloc_skb (skb->len +sizeof (struct wilc_wfi_radiotap_cb_hdr )); + skb2 =dev_alloc_skb (skb->len + +sizeof (struct wilc_wfi_radiotap_cb_hdr ));memcpy (skb_put (skb2, skb->len), skb->data, skb->len); - cb_hdr = (struct wilc_wfi_radiotap_cb_hdr *)skb_push (skb2,sizeof (*cb_hdr)); + cb_hdr = (struct wilc_wfi_radiotap_cb_hdr *)skb_push (skb2, +sizeof (*cb_hdr));memset (cb_hdr,0 ,sizeof (struct wilc_wfi_radiotap_cb_hdr )); cb_hdr->hdr.it_version =0 ;/* PKTHDR_RADIOTAP_VERSION; */ - cb_hdr->hdr.it_len =cpu_to_le16 (sizeof (struct wilc_wfi_radiotap_cb_hdr )); + cb_hdr->hdr.it_len = +cpu_to_le16 (sizeof (struct wilc_wfi_radiotap_cb_hdr )); cb_hdr->hdr.it_present = cpu_to_le32( (1 << IEEE80211_RADIOTAP_RATE) |Signature · 8 lines
2.9.3 -- 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/20170310165847.4082-1-diaconita.tamara%40gmail.com. For more options, visit https://groups.google.com/d/optout.