* [PATCH 1/2] staging: rtl8712: line over 80 characters.
@ 2019-03-09 21:23 Bhagyashri Dighole
2019-03-09 21:37 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 2+ messages in thread
From: Bhagyashri Dighole @ 2019-03-09 21:23 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Outreachy
Fix coding style issues, which solves checkpatch.pl warning:
"WARNING: line over 80 characters".
Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com>
---
drivers/staging/rtl8712/hal_init.c | 3 ++-
drivers/staging/rtl8712/ieee80211.c | 3 ++-
drivers/staging/rtl8712/ieee80211.h | 3 ++-
drivers/staging/rtl8712/rtl871x_xmit.c | 8 ++++----
4 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c
index 4c6519c..401f0e4 100644
--- a/drivers/staging/rtl8712/hal_init.c
+++ b/drivers/staging/rtl8712/hal_init.c
@@ -100,7 +100,8 @@ static void fill_fwpriv(struct _adapter *padapter, struct fw_priv *pfwpriv)
pfwpriv->rf_config = RTL8712_RFC_1T2R;
}
pfwpriv->mp_mode = (pregpriv->mp_mode == 1) ? 1 : 0;
- pfwpriv->vcs_type = pregpriv->vrtl_carrier_sense; /* 0:off 1:on 2:auto */
+ /* 0:off 1:on 2:auto */
+ pfwpriv->vcs_type = pregpriv->vrtl_carrier_sense;
pfwpriv->vcs_mode = pregpriv->vcs_type; /* 1:RTS/CTS 2:CTS to self */
/* default enable turbo_mode */
pfwpriv->turbo_mode = ((pregpriv->wifi_test == 1) ? 0 : 1);
diff --git a/drivers/staging/rtl8712/ieee80211.c b/drivers/staging/rtl8712/ieee80211.c
index 2eae11d..4cca739 100644
--- a/drivers/staging/rtl8712/ieee80211.c
+++ b/drivers/staging/rtl8712/ieee80211.c
@@ -238,7 +238,8 @@ unsigned char *r8712_get_wpa_ie(unsigned char *pie, uint *wpa_ie_len, int limit)
return NULL;
}
-unsigned char *r8712_get_wpa2_ie(unsigned char *pie, uint *rsn_ie_len, int limit)
+unsigned char *r8712_get_wpa2_ie(unsigned char *pie, uint *rsn_ie_len,
+ int limit)
{
return r8712_get_ie(pie, _WPA2_IE_ID_, rsn_ie_len, limit);
}
diff --git a/drivers/staging/rtl8712/ieee80211.h b/drivers/staging/rtl8712/ieee80211.h
index 1470771d..8098f69 100644
--- a/drivers/staging/rtl8712/ieee80211.h
+++ b/drivers/staging/rtl8712/ieee80211.h
@@ -728,7 +728,8 @@ struct registry_priv;
u8 *r8712_set_ie(u8 *pbuf, sint index, uint len, u8 *source, uint *frlen);
u8 *r8712_get_ie(u8 *pbuf, sint index, uint *len, sint limit);
-unsigned char *r8712_get_wpa_ie(unsigned char *pie, uint *rsn_ie_len, int limit);
+unsigned char *r8712_get_wpa_ie(unsigned char *pie, uint *rsn_ie_len,
+ int limit);
unsigned char *r8712_get_wpa2_ie(unsigned char *pie, uint *rsn_ie_len,
int limit);
int r8712_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher,
diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c b/drivers/staging/rtl8712/rtl871x_xmit.c
index 94c2a48..4060c55 100644
--- a/drivers/staging/rtl8712/rtl871x_xmit.c
+++ b/drivers/staging/rtl8712/rtl871x_xmit.c
@@ -75,8 +75,8 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
* and initialize free_xmit_frame below.
* Please also apply free_txobj to link_up all the xmit_frames...
*/
- pxmitpriv->pallocated_frame_buf = kmalloc(NR_XMITFRAME * sizeof(struct xmit_frame) + 4,
- GFP_ATOMIC);
+ pxmitpriv->pallocated_frame_buf = kmalloc(NR_XMITFRAME * sizeof(struct xmit_frame) +
+ 4, GFP_ATOMIC);
if (!pxmitpriv->pallocated_frame_buf) {
pxmitpriv->pxmit_frame_buf = NULL;
return _FAIL;
@@ -114,8 +114,8 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
/*init xmit_buf*/
_init_queue(&pxmitpriv->free_xmitbuf_queue);
_init_queue(&pxmitpriv->pending_xmitbuf_queue);
- pxmitpriv->pallocated_xmitbuf = kmalloc(NR_XMITBUFF * sizeof(struct xmit_buf) + 4,
- GFP_ATOMIC);
+ pxmitpriv->pallocated_xmitbuf = kmalloc(NR_XMITBUFF * sizeof(struct xmit_buf) +
+ 4, GFP_ATOMIC);
if (!pxmitpriv->pallocated_xmitbuf) {
kfree(pxmitpriv->pallocated_frame_buf);
pxmitpriv->pallocated_frame_buf = NULL;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Outreachy kernel] [PATCH 1/2] staging: rtl8712: line over 80 characters.
2019-03-09 21:23 [PATCH 1/2] staging: rtl8712: line over 80 characters Bhagyashri Dighole
@ 2019-03-09 21:37 ` Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2019-03-09 21:37 UTC (permalink / raw)
To: Bhagyashri Dighole; +Cc: Greg Kroah-Hartman, Outreachy
On Sun, 10 Mar 2019, Bhagyashri Dighole wrote:
> Fix coding style issues, which solves checkpatch.pl warning:
> "WARNING: line over 80 characters".
>
> Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com>
> ---
> drivers/staging/rtl8712/hal_init.c | 3 ++-
> drivers/staging/rtl8712/ieee80211.c | 3 ++-
> drivers/staging/rtl8712/ieee80211.h | 3 ++-
> drivers/staging/rtl8712/rtl871x_xmit.c | 8 ++++----
> 4 files changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c
> index 4c6519c..401f0e4 100644
> --- a/drivers/staging/rtl8712/hal_init.c
> +++ b/drivers/staging/rtl8712/hal_init.c
> @@ -100,7 +100,8 @@ static void fill_fwpriv(struct _adapter *padapter, struct fw_priv *pfwpriv)
> pfwpriv->rf_config = RTL8712_RFC_1T2R;
> }
> pfwpriv->mp_mode = (pregpriv->mp_mode == 1) ? 1 : 0;
> - pfwpriv->vcs_type = pregpriv->vrtl_carrier_sense; /* 0:off 1:on 2:auto */
> + /* 0:off 1:on 2:auto */
> + pfwpriv->vcs_type = pregpriv->vrtl_carrier_sense;
> pfwpriv->vcs_mode = pregpriv->vcs_type; /* 1:RTS/CTS 2:CTS to self */
> /* default enable turbo_mode */
> pfwpriv->turbo_mode = ((pregpriv->wifi_test == 1) ? 0 : 1);
> diff --git a/drivers/staging/rtl8712/ieee80211.c b/drivers/staging/rtl8712/ieee80211.c
> index 2eae11d..4cca739 100644
> --- a/drivers/staging/rtl8712/ieee80211.c
> +++ b/drivers/staging/rtl8712/ieee80211.c
> @@ -238,7 +238,8 @@ unsigned char *r8712_get_wpa_ie(unsigned char *pie, uint *wpa_ie_len, int limit)
> return NULL;
> }
>
> -unsigned char *r8712_get_wpa2_ie(unsigned char *pie, uint *rsn_ie_len, int limit)
> +unsigned char *r8712_get_wpa2_ie(unsigned char *pie, uint *rsn_ie_len,
> + int limit)
> {
> return r8712_get_ie(pie, _WPA2_IE_ID_, rsn_ie_len, limit);
> }
> diff --git a/drivers/staging/rtl8712/ieee80211.h b/drivers/staging/rtl8712/ieee80211.h
> index 1470771d..8098f69 100644
> --- a/drivers/staging/rtl8712/ieee80211.h
> +++ b/drivers/staging/rtl8712/ieee80211.h
> @@ -728,7 +728,8 @@ struct registry_priv;
>
> u8 *r8712_set_ie(u8 *pbuf, sint index, uint len, u8 *source, uint *frlen);
> u8 *r8712_get_ie(u8 *pbuf, sint index, uint *len, sint limit);
> -unsigned char *r8712_get_wpa_ie(unsigned char *pie, uint *rsn_ie_len, int limit);
> +unsigned char *r8712_get_wpa_ie(unsigned char *pie, uint *rsn_ie_len,
> + int limit);
> unsigned char *r8712_get_wpa2_ie(unsigned char *pie, uint *rsn_ie_len,
> int limit);
> int r8712_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher,
> diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c b/drivers/staging/rtl8712/rtl871x_xmit.c
> index 94c2a48..4060c55 100644
> --- a/drivers/staging/rtl8712/rtl871x_xmit.c
> +++ b/drivers/staging/rtl8712/rtl871x_xmit.c
> @@ -75,8 +75,8 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
> * and initialize free_xmit_frame below.
> * Please also apply free_txobj to link_up all the xmit_frames...
> */
> - pxmitpriv->pallocated_frame_buf = kmalloc(NR_XMITFRAME * sizeof(struct xmit_frame) + 4,
> - GFP_ATOMIC);
> + pxmitpriv->pallocated_frame_buf = kmalloc(NR_XMITFRAME * sizeof(struct xmit_frame) +
> + 4, GFP_ATOMIC);
Don't break up an expression like this, It looks like 4 is a separate
argument.
Try putting the kmalloc on the next line.
julia
> if (!pxmitpriv->pallocated_frame_buf) {
> pxmitpriv->pxmit_frame_buf = NULL;
> return _FAIL;
> @@ -114,8 +114,8 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
> /*init xmit_buf*/
> _init_queue(&pxmitpriv->free_xmitbuf_queue);
> _init_queue(&pxmitpriv->pending_xmitbuf_queue);
> - pxmitpriv->pallocated_xmitbuf = kmalloc(NR_XMITBUFF * sizeof(struct xmit_buf) + 4,
> - GFP_ATOMIC);
> + pxmitpriv->pallocated_xmitbuf = kmalloc(NR_XMITBUFF * sizeof(struct xmit_buf) +
> + 4, GFP_ATOMIC);
> if (!pxmitpriv->pallocated_xmitbuf) {
> kfree(pxmitpriv->pallocated_frame_buf);
> pxmitpriv->pallocated_frame_buf = NULL;
> --
> 2.7.4
>
> --
> 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 post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190309212302.GA22031%40bhagyashri-Lenovo-G570.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-09 21:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-09 21:23 [PATCH 1/2] staging: rtl8712: line over 80 characters Bhagyashri Dighole
2019-03-09 21:37 ` [Outreachy kernel] " Julia Lawall
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.