[PATCH] staging: rtl8712: rtl871x_xmit.c: Fix some CHECK and WARNING

2019-07-15 Thread christianluciano . m
From: Christian Luciano Moreno 

Fix: line over 80 characters
 space unnecesary after cast
 alignment match open parenthesis
 comparison to NULL
Those warnings and check were reported by checkpatch.

Signed-off-by: Christian Luciano Moreno 
---
 drivers/staging/rtl8712/rtl871x_xmit.c | 100 -
 1 file changed, 50 insertions(+), 50 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c 
b/drivers/staging/rtl8712/rtl871x_xmit.c
index f6fe8ea12961..716a0eebdcbd 100644
--- a/drivers/staging/rtl8712/rtl871x_xmit.c
+++ b/drivers/staging/rtl8712/rtl871x_xmit.c
@@ -22,7 +22,6 @@
 #include "osdep_intf.h"
 #include "usb_ops.h"
 
-
 static const u8 P802_1H_OUI[P80211_OUI_LEN] = {0x00, 0x00, 0xf8};
 static const u8 RFC1042_OUI[P80211_OUI_LEN] = {0x00, 0x00, 0x00};
 static void init_hwxmits(struct hw_xmit *phwxmit, sint entry);
@@ -39,7 +38,7 @@ static void _init_txservq(struct tx_servq *ptxservq)
 void _r8712_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv)
 {
memset((unsigned char *)psta_xmitpriv, 0,
-sizeof(struct sta_xmit_priv));
+  sizeof(struct sta_xmit_priv));
spin_lock_init(&psta_xmitpriv->lock);
_init_txservq(&psta_xmitpriv->be_q);
_init_txservq(&psta_xmitpriv->bk_q);
@@ -71,19 +70,21 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
_init_queue(&pxmitpriv->apsd_queue);
_init_queue(&pxmitpriv->free_xmit_queue);
/*
-* Please allocate memory with the sz = (struct xmit_frame) * 
NR_XMITFRAME,
+* Please allocate memory with the
+* sz = (struct xmit_frame) * NR_XMITFRAME,
 * 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);
+   kmalloc(NR_XMITFRAME * sizeof(struct xmit_frame) + 4,
+   GFP_ATOMIC);
if (!pxmitpriv->pallocated_frame_buf) {
pxmitpriv->pxmit_frame_buf = NULL;
return _FAIL;
}
pxmitpriv->pxmit_frame_buf = pxmitpriv->pallocated_frame_buf + 4 -
-   ((addr_t) (pxmitpriv->pallocated_frame_buf) & 3);
-   pxframe = (struct xmit_frame *) pxmitpriv->pxmit_frame_buf;
+   ((addr_t)(pxmitpriv->pallocated_frame_buf) & 3);
+   pxframe = (struct xmit_frame *)pxmitpriv->pxmit_frame_buf;
for (i = 0; i < NR_XMITFRAME; i++) {
INIT_LIST_HEAD(&(pxframe->list));
pxframe->padapter = padapter;
@@ -92,7 +93,7 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
pxframe->buf_addr = NULL;
pxframe->pxmitbuf = NULL;
list_add_tail(&(pxframe->list),
-&(pxmitpriv->free_xmit_queue.queue));
+ &(pxmitpriv->free_xmit_queue.queue));
pxframe++;
}
pxmitpriv->free_xmitframe_cnt = NR_XMITFRAME;
@@ -126,16 +127,16 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmitbuf;
for (i = 0; i < NR_XMITBUFF; i++) {
INIT_LIST_HEAD(&pxmitbuf->list);
-   pxmitbuf->pallocated_buf = kmalloc(MAX_XMITBUF_SZ + 
XMITBUF_ALIGN_SZ,
-  GFP_ATOMIC);
+   pxmitbuf->pallocated_buf =
+   kmalloc(MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ, GFP_ATOMIC);
if (!pxmitbuf->pallocated_buf)
return _FAIL;
pxmitbuf->pbuf = pxmitbuf->pallocated_buf + XMITBUF_ALIGN_SZ -
-((addr_t) (pxmitbuf->pallocated_buf) &
+((addr_t)(pxmitbuf->pallocated_buf) &
 (XMITBUF_ALIGN_SZ - 1));
r8712_xmit_resource_alloc(padapter, pxmitbuf);
list_add_tail(&pxmitbuf->list,
-&(pxmitpriv->free_xmitbuf_queue.queue));
+ &(pxmitpriv->free_xmitbuf_queue.queue));
pxmitbuf++;
}
pxmitpriv->free_xmitbuf_cnt = NR_XMITBUFF;
@@ -143,8 +144,8 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
alloc_hwxmits(padapter);
init_hwxmits(pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry);
tasklet_init(&pxmitpriv->xmit_tasklet,
-   (void(*)(unsigned long))r8712_xmit_bh,
-   (unsigned long)padapter);
+(void(*)(unsigned long))r8712_xmit_bh,
+(unsigned long)padapter);
return _SUCCESS;
 }
 
@@ -156,7 +157,7 @@ void _free_xmit_priv(struct xmit_priv *pxmitpriv)
pxmitpriv->pxmit_frame_buf;
struct xmit_buf *pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmitbuf;
 
-   if (px

Re: [PATCH] staging: rtl8712: rtl871x_xmit.c: Fix some CHECK and WARNING

2019-07-15 Thread Greg KH
On Mon, Jul 15, 2019 at 02:17:04PM -0300, christianlucian...@gmail.com wrote:
> From: Christian Luciano Moreno 
> 
> Fix: line over 80 characters
>  space unnecesary after cast
>  alignment match open parenthesis
>  comparison to NULL
> Those warnings and check were reported by checkpatch.
> 
> Signed-off-by: Christian Luciano Moreno 
> ---
>  drivers/staging/rtl8712/rtl871x_xmit.c | 100 -
>  1 file changed, 50 insertions(+), 50 deletions(-)

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch did many different things all at once, making it difficult
  to review.  All Linux kernel patches need to only do one thing at a
  time.  If you need to do multiple things (such as clean up all coding
  style issues in a file/driver), do it in a sequence of patches, each
  one doing only one thing.  This will make it easier to review the
  patches to ensure that they are correct, and to help alleviate any
  merge issues that larger patches can cause.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel