* [PATCH 0/2] Correct long line comments and remove whitespace in code @ 2020-03-20 1:38 R Veera Kumar 2020-03-20 1:38 ` [PATCH 1/2] staging: rtl8723bs: os_dep: Correct long line comments R Veera Kumar 2020-03-20 1:38 ` [PATCH 2/2] staging: rtl8723bs: os_dep: Remove whitespace characters in code line R Veera Kumar 0 siblings, 2 replies; 8+ messages in thread From: R Veera Kumar @ 2020-03-20 1:38 UTC (permalink / raw) To: Greg Kroah-Hartman; +Cc: R Veera Kumar, outreachy-kernel Correct long line comments to match coding style of respecting 80 character per line limit. Remove five leading whitespace characters in code line. --- R Veera Kumar (2): staging: rtl8723bs: os_dep: Correct long line comments staging: rtl8723bs: os_dep: Remove whitespace characters in code line drivers/staging/rtl8723bs/os_dep/recv_linux.c | 38 +++++++++++++------ 1 file changed, 26 insertions(+), 12 deletions(-) -- 2.20.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] staging: rtl8723bs: os_dep: Correct long line comments 2020-03-20 1:38 [PATCH 0/2] Correct long line comments and remove whitespace in code R Veera Kumar @ 2020-03-20 1:38 ` R Veera Kumar 2020-03-20 14:05 ` Greg Kroah-Hartman 2020-03-20 1:38 ` [PATCH 2/2] staging: rtl8723bs: os_dep: Remove whitespace characters in code line R Veera Kumar 1 sibling, 1 reply; 8+ messages in thread From: R Veera Kumar @ 2020-03-20 1:38 UTC (permalink / raw) To: Greg Kroah-Hartman; +Cc: R Veera Kumar, outreachy-kernel Correct long line comments to respect 80 character per line limit. Signed-off-by: R Veera Kumar <vkor@vkten.in> --- Changes in v3: - Remove extra ' ' character before comment Changes in v2: - Remove an extra blank line added by error --- drivers/staging/rtl8723bs/os_dep/recv_linux.c | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c index a6491f163272..87090af7d776 100644 --- a/drivers/staging/rtl8723bs/os_dep/recv_linux.c +++ b/drivers/staging/rtl8723bs/os_dep/recv_linux.c @@ -35,7 +35,8 @@ void rtw_os_recv_resource_free(struct recv_priv *precvpriv) for (i = 0; i < NR_RECVFRAME; i++) { if (precvframe->u.hdr.pkt) { - dev_kfree_skb_any(precvframe->u.hdr.pkt);/* free skb by driver */ + /* free skb by driver */ + dev_kfree_skb_any(precvframe->u.hdr.pkt); precvframe->u.hdr.pkt = NULL; } precvframe++; @@ -80,7 +81,10 @@ _pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubframe_Length, u8 ((!memcmp(sub_skb->data, rtw_rfc1042_header, SNAP_SIZE) && eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || !memcmp(sub_skb->data, rtw_bridge_tunnel_header, SNAP_SIZE))) { - /* remove RFC1042 or Bridge-Tunnel encapsulation and replace EtherType */ + /* + * remove RFC1042 or Bridge-Tunnel encapsulation and replace + * EtherType + */ skb_pull(sub_skb, SNAP_SIZE); memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->src, ETH_ALEN); memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->dst, ETH_ALEN); @@ -112,7 +116,10 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, _pkt *pkt, struct rx_pkt /* DBG_871X("bmcast =%d\n", bmcast); */ if (memcmp(pattrib->dst, myid(&padapter->eeprompriv), ETH_ALEN)) { - /* DBG_871X("not ap psta =%p, addr =%pM\n", psta, pattrib->dst); */ + /* + * DBG_871X("not ap psta =%p, addr =%pM\n", + * psta, pattrib->dst); + */ if (bmcast) { psta = rtw_get_bcmc_stainfo(padapter); @@ -124,7 +131,10 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, _pkt *pkt, struct rx_pkt if (psta) { struct net_device *pnetdev = (struct net_device*)padapter->pnetdev; - /* DBG_871X("directly forwarding to the rtw_xmit_entry\n"); */ + /* + * DBG_871X("directly forwarding to the + * rtw_xmit_entry\n"); + */ /* skb->ip_summed = CHECKSUM_NONE; */ pkt->dev = pnetdev; @@ -236,7 +246,10 @@ static void rtw_os_ksocket_send(struct adapter *padapter, union recv_frame *prec u16 len = *(u16*)(skb->data+ETH_HLEN+2); /* u16 ctrl_type = *(u16*)(skb->data+ETH_HLEN+4); */ - /* DBG_871X("eth, RC: len = 0x%x, ctrl_type = 0x%x\n", len, ctrl_type); */ + /* + * DBG_871X("eth, RC: len = 0x%x, ctrl_type = 0x%x\n", + * len, ctrl_type); + */ DBG_871X("eth, RC: len = 0x%x\n", len); for (i = 0; i < len; i++) @@ -291,7 +304,8 @@ int rtw_recv_indicatepkt(struct adapter *padapter, union recv_frame *precv_frame rtw_os_recv_indicate_pkt(padapter, skb, pattrib); - precv_frame->u.hdr.pkt = NULL; /* pointers to NULL before rtw_free_recvframe() */ + /* pointers to NULL before rtw_free_recvframe() */ + precv_frame->u.hdr.pkt = NULL; rtw_free_recvframe(precv_frame, pfree_recv_queue); -- 2.20.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] staging: rtl8723bs: os_dep: Correct long line comments 2020-03-20 1:38 ` [PATCH 1/2] staging: rtl8723bs: os_dep: Correct long line comments R Veera Kumar @ 2020-03-20 14:05 ` Greg Kroah-Hartman 2020-03-21 2:14 ` R Veera Kumar 0 siblings, 1 reply; 8+ messages in thread From: Greg Kroah-Hartman @ 2020-03-20 14:05 UTC (permalink / raw) To: R Veera Kumar; +Cc: outreachy-kernel On Fri, Mar 20, 2020 at 07:08:22AM +0530, R Veera Kumar wrote: > Correct long line comments to respect 80 character per > line limit. > > Signed-off-by: R Veera Kumar <vkor@vkten.in> > --- > Changes in v3: > - Remove extra ' ' character before comment > Changes in v2: > - Remove an extra blank line added by error > --- > drivers/staging/rtl8723bs/os_dep/recv_linux.c | 26 ++++++++++++++----- > 1 file changed, 20 insertions(+), 6 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c > index a6491f163272..87090af7d776 100644 > --- a/drivers/staging/rtl8723bs/os_dep/recv_linux.c > +++ b/drivers/staging/rtl8723bs/os_dep/recv_linux.c > @@ -35,7 +35,8 @@ void rtw_os_recv_resource_free(struct recv_priv *precvpriv) > > for (i = 0; i < NR_RECVFRAME; i++) { > if (precvframe->u.hdr.pkt) { > - dev_kfree_skb_any(precvframe->u.hdr.pkt);/* free skb by driver */ > + /* free skb by driver */ > + dev_kfree_skb_any(precvframe->u.hdr.pkt); > precvframe->u.hdr.pkt = NULL; > } > precvframe++; > @@ -80,7 +81,10 @@ _pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubframe_Length, u8 > ((!memcmp(sub_skb->data, rtw_rfc1042_header, SNAP_SIZE) && > eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || > !memcmp(sub_skb->data, rtw_bridge_tunnel_header, SNAP_SIZE))) { > - /* remove RFC1042 or Bridge-Tunnel encapsulation and replace EtherType */ > + /* > + * remove RFC1042 or Bridge-Tunnel encapsulation and replace > + * EtherType > + */ > skb_pull(sub_skb, SNAP_SIZE); > memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->src, ETH_ALEN); > memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->dst, ETH_ALEN); > @@ -112,7 +116,10 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, _pkt *pkt, struct rx_pkt > /* DBG_871X("bmcast =%d\n", bmcast); */ > > if (memcmp(pattrib->dst, myid(&padapter->eeprompriv), ETH_ALEN)) { > - /* DBG_871X("not ap psta =%p, addr =%pM\n", psta, pattrib->dst); */ > + /* > + * DBG_871X("not ap psta =%p, addr =%pM\n", > + * psta, pattrib->dst); Again, this is not a long-line comment, it is a code line that is commented out. Remove it in a patch previous to this one please. > + */ > > if (bmcast) { > psta = rtw_get_bcmc_stainfo(padapter); > @@ -124,7 +131,10 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, _pkt *pkt, struct rx_pkt > if (psta) { > struct net_device *pnetdev = (struct net_device*)padapter->pnetdev; > > - /* DBG_871X("directly forwarding to the rtw_xmit_entry\n"); */ > + /* > + * DBG_871X("directly forwarding to the > + * rtw_xmit_entry\n"); Same here. thanks, greg k-h ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] staging: rtl8723bs: os_dep: Correct long line comments 2020-03-20 14:05 ` Greg Kroah-Hartman @ 2020-03-21 2:14 ` R Veera Kumar 2020-03-21 7:35 ` [Outreachy kernel] " Julia Lawall 0 siblings, 1 reply; 8+ messages in thread From: R Veera Kumar @ 2020-03-21 2:14 UTC (permalink / raw) To: Greg Kroah-Hartman; +Cc: outreachy-kernel On Fri, Mar 20, 2020 at 03:05:16PM +0100, Greg Kroah-Hartman wrote: > On Fri, Mar 20, 2020 at 07:08:22AM +0530, R Veera Kumar wrote: > > Correct long line comments to respect 80 character per > > line limit. > > > > diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c > > index a6491f163272..87090af7d776 100644 > > --- a/drivers/staging/rtl8723bs/os_dep/recv_linux.c > > +++ b/drivers/staging/rtl8723bs/os_dep/recv_linux.c > > @@ -35,7 +35,8 @@ void rtw_os_recv_resource_free(struct recv_priv *precvpriv) > > > > if (memcmp(pattrib->dst, myid(&padapter->eeprompriv), ETH_ALEN)) { > > - /* DBG_871X("not ap psta =%p, addr =%pM\n", psta, pattrib->dst); */ > > + /* > > + * DBG_871X("not ap psta =%p, addr =%pM\n", > > + * psta, pattrib->dst); > > Again, this is not a long-line comment, it is a code line that is > commented out. Remove it in a patch previous to this one please. > Okay I understand now that it is not a valid comment describing how it functions. But is not that the developers intention was to keep this to remind him of doing something. Or should he should have kept in his codebase and not here. Also should I create a patch to remove this commented out code lines in the same patch series or a new one. Veera > > + */ > > > > if (bmcast) { > > psta = rtw_get_bcmc_stainfo(padapter); > > @@ -124,7 +131,10 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, _pkt *pkt, struct rx_pkt > > if (psta) { > > struct net_device *pnetdev = (struct net_device*)padapter->pnetdev; > > > > - /* DBG_871X("directly forwarding to the rtw_xmit_entry\n"); */ > > + /* > > + * DBG_871X("directly forwarding to the > > + * rtw_xmit_entry\n"); > > Same here. > > thanks, > > greg k-h ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Outreachy kernel] Re: [PATCH 1/2] staging: rtl8723bs: os_dep: Correct long line comments 2020-03-21 2:14 ` R Veera Kumar @ 2020-03-21 7:35 ` Julia Lawall 0 siblings, 0 replies; 8+ messages in thread From: Julia Lawall @ 2020-03-21 7:35 UTC (permalink / raw) To: R Veera Kumar; +Cc: Greg Kroah-Hartman, outreachy-kernel On Sat, 21 Mar 2020, R Veera Kumar wrote: > On Fri, Mar 20, 2020 at 03:05:16PM +0100, Greg Kroah-Hartman wrote: > > On Fri, Mar 20, 2020 at 07:08:22AM +0530, R Veera Kumar wrote: > > > Correct long line comments to respect 80 character per > > > line limit. > > > > > > diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c > > > index a6491f163272..87090af7d776 100644 > > > --- a/drivers/staging/rtl8723bs/os_dep/recv_linux.c > > > +++ b/drivers/staging/rtl8723bs/os_dep/recv_linux.c > > > @@ -35,7 +35,8 @@ void rtw_os_recv_resource_free(struct recv_priv *precvpriv) > > > > > > if (memcmp(pattrib->dst, myid(&padapter->eeprompriv), ETH_ALEN)) { > > > - /* DBG_871X("not ap psta =%p, addr =%pM\n", psta, pattrib->dst); */ > > > + /* > > > + * DBG_871X("not ap psta =%p, addr =%pM\n", > > > + * psta, pattrib->dst); > > > > Again, this is not a long-line comment, it is a code line that is > > commented out. Remove it in a patch previous to this one please. > > > > Okay I understand now that it is not a valid comment describing how > it functions. > > But is not that the developers intention was to keep this to remind > him of doing something. In general, commented out code is not wanted. It could be found in the git history if needed. You can also use git blame to see how long the code has been there. If it has been there a long time, it seems less likely to be needed. Finally, this is debugging code. If someone needs that in the future, they can easily re-add it, with precisely the information that they are trying to debug for. julia > > Or should he should have kept in his codebase and not here. > > Also should I create a patch to remove this commented out code lines > in the same patch series or a new one. > > Veera > > > > + */ > > > > > > if (bmcast) { > > > psta = rtw_get_bcmc_stainfo(padapter); > > > @@ -124,7 +131,10 @@ void rtw_os_recv_indicate_pkt(struct adapter *padapter, _pkt *pkt, struct rx_pkt > > > if (psta) { > > > struct net_device *pnetdev = (struct net_device*)padapter->pnetdev; > > > > > > - /* DBG_871X("directly forwarding to the rtw_xmit_entry\n"); */ > > > + /* > > > + * DBG_871X("directly forwarding to the > > > + * rtw_xmit_entry\n"); > > > > Same here. > > > > thanks, > > > > greg k-h > > -- > 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 outreachy-kernel+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200321021416.GA569%40tulip.local. > ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] staging: rtl8723bs: os_dep: Remove whitespace characters in code line 2020-03-20 1:38 [PATCH 0/2] Correct long line comments and remove whitespace in code R Veera Kumar 2020-03-20 1:38 ` [PATCH 1/2] staging: rtl8723bs: os_dep: Correct long line comments R Veera Kumar @ 2020-03-20 1:38 ` R Veera Kumar 2020-03-20 14:05 ` Greg Kroah-Hartman 1 sibling, 1 reply; 8+ messages in thread From: R Veera Kumar @ 2020-03-20 1:38 UTC (permalink / raw) To: Greg Kroah-Hartman; +Cc: R Veera Kumar, outreachy-kernel Remove five leading whitespace characters in code line. Signed-off-by: R Veera Kumar <vkor@vkten.in> --- drivers/staging/rtl8723bs/os_dep/recv_linux.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c index 87090af7d776..1502477e48bb 100644 --- a/drivers/staging/rtl8723bs/os_dep/recv_linux.c +++ b/drivers/staging/rtl8723bs/os_dep/recv_linux.c @@ -79,8 +79,8 @@ _pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubframe_Length, u8 if (sub_skb->len >= 8 && ((!memcmp(sub_skb->data, rtw_rfc1042_header, SNAP_SIZE) && - eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || - !memcmp(sub_skb->data, rtw_bridge_tunnel_header, SNAP_SIZE))) { + eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || + !memcmp(sub_skb->data, rtw_bridge_tunnel_header, SNAP_SIZE))) { /* * remove RFC1042 or Bridge-Tunnel encapsulation and replace * EtherType @@ -315,11 +315,11 @@ int rtw_recv_indicatepkt(struct adapter *padapter, union recv_frame *precv_frame _recv_indicatepkt_drop: - /* enqueue back to free_recv_queue */ - rtw_free_recvframe(precv_frame, pfree_recv_queue); + /* enqueue back to free_recv_queue */ + rtw_free_recvframe(precv_frame, pfree_recv_queue); - DBG_COUNTER(padapter->rx_logs.os_indicate_err); - return _FAIL; + DBG_COUNTER(padapter->rx_logs.os_indicate_err); + return _FAIL; } void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl) -- 2.20.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] staging: rtl8723bs: os_dep: Remove whitespace characters in code line 2020-03-20 1:38 ` [PATCH 2/2] staging: rtl8723bs: os_dep: Remove whitespace characters in code line R Veera Kumar @ 2020-03-20 14:05 ` Greg Kroah-Hartman 2020-03-20 16:49 ` R Veera Kumar 0 siblings, 1 reply; 8+ messages in thread From: Greg Kroah-Hartman @ 2020-03-20 14:05 UTC (permalink / raw) To: R Veera Kumar; +Cc: outreachy-kernel On Fri, Mar 20, 2020 at 07:08:23AM +0530, R Veera Kumar wrote: > Remove five leading whitespace characters in code line. > > Signed-off-by: R Veera Kumar <vkor@vkten.in> > --- > drivers/staging/rtl8723bs/os_dep/recv_linux.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c > index 87090af7d776..1502477e48bb 100644 > --- a/drivers/staging/rtl8723bs/os_dep/recv_linux.c > +++ b/drivers/staging/rtl8723bs/os_dep/recv_linux.c > @@ -79,8 +79,8 @@ _pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubframe_Length, u8 > > if (sub_skb->len >= 8 && > ((!memcmp(sub_skb->data, rtw_rfc1042_header, SNAP_SIZE) && > - eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || > - !memcmp(sub_skb->data, rtw_bridge_tunnel_header, SNAP_SIZE))) { > + eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || > + !memcmp(sub_skb->data, rtw_bridge_tunnel_header, SNAP_SIZE))) { No, the original was correct here, checkpatch should not have complained about this. thanks, greg k-h ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] staging: rtl8723bs: os_dep: Remove whitespace characters in code line 2020-03-20 14:05 ` Greg Kroah-Hartman @ 2020-03-20 16:49 ` R Veera Kumar 0 siblings, 0 replies; 8+ messages in thread From: R Veera Kumar @ 2020-03-20 16:49 UTC (permalink / raw) To: outreachy-kernel On Fri, Mar 20, 2020 at 03:05:58PM +0100, Greg Kroah-Hartman wrote: > On Fri, Mar 20, 2020 at 07:08:23AM +0530, R Veera Kumar wrote: > > Remove five leading whitespace characters in code line. > > > > Signed-off-by: R Veera Kumar <vkor@vkten.in> > > --- > > drivers/staging/rtl8723bs/os_dep/recv_linux.c | 12 ++++++------ > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c > > index 87090af7d776..1502477e48bb 100644 > > --- a/drivers/staging/rtl8723bs/os_dep/recv_linux.c > > +++ b/drivers/staging/rtl8723bs/os_dep/recv_linux.c > > @@ -79,8 +79,8 @@ _pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubframe_Length, u8 > > > > if (sub_skb->len >= 8 && > > ((!memcmp(sub_skb->data, rtw_rfc1042_header, SNAP_SIZE) && > > - eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || > > - !memcmp(sub_skb->data, rtw_bridge_tunnel_header, SNAP_SIZE))) { > > + eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || > > + !memcmp(sub_skb->data, rtw_bridge_tunnel_header, SNAP_SIZE))) { > > No, the original was correct here, checkpatch should not have complained > about this. > This is V1 patch. I removed a single white space before "eth_type !=" as definitely it is compound argument code. Please see V2 patch. In which Greg says this is fine. Should final comment by him is to be accepted? Veera > thanks, > > greg k-h ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-03-21 7:35 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-03-20 1:38 [PATCH 0/2] Correct long line comments and remove whitespace in code R Veera Kumar 2020-03-20 1:38 ` [PATCH 1/2] staging: rtl8723bs: os_dep: Correct long line comments R Veera Kumar 2020-03-20 14:05 ` Greg Kroah-Hartman 2020-03-21 2:14 ` R Veera Kumar 2020-03-21 7:35 ` [Outreachy kernel] " Julia Lawall 2020-03-20 1:38 ` [PATCH 2/2] staging: rtl8723bs: os_dep: Remove whitespace characters in code line R Veera Kumar 2020-03-20 14:05 ` Greg Kroah-Hartman 2020-03-20 16:49 ` R Veera Kumar
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.