All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8192u: remove blank lines after braces (opening)
@ 2016-04-05 16:07 Nicholas Sim
  2016-04-07 17:59 ` Andy Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Nicholas Sim @ 2016-04-05 16:07 UTC (permalink / raw)
  To: gregkh, devel; +Cc: linux-kernel

Remove unneeded blank lines appearing after opening braces as suggested
by checkpatch.pl

Signed-off-by: Nicholas Sim <nicholassimws@gmail.com>
---
 drivers/staging/rtl8192u/r8192U_core.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 2f506b8..21d5693 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -323,7 +323,6 @@ void write_nic_byte(struct net_device *dev, int indx, u8 data)
 
 void write_nic_word(struct net_device *dev, int indx, u16 data)
 {
-
 	int status;
 
 	struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
@@ -347,7 +346,6 @@ void write_nic_word(struct net_device *dev, int indx, u16 data)
 
 void write_nic_dword(struct net_device *dev, int indx, u32 data)
 {
-
 	int status;
 
 	struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
@@ -733,7 +731,6 @@ void rtl8192_update_msr(struct net_device *dev)
 	 * master (see the create BSS/IBSS func)
 	 */
 	if (priv->ieee80211->state == IEEE80211_LINKED) {
-
 		if (priv->ieee80211->iw_mode == IW_MODE_INFRA)
 			msr |= (MSR_LINK_MANAGED << MSR_LINK_SHIFT);
 		else if (priv->ieee80211->iw_mode == IW_MODE_ADHOC)
@@ -768,7 +765,6 @@ static void rtl8192_rx_isr(struct urb *urb);
 
 static u32 get_rxpacket_shiftbytes_819xusb(struct ieee80211_rx_stats *pstats)
 {
-
 	return (sizeof(rx_desc_819x_usb) + pstats->RxDrvInfoSize
 		+ pstats->RxBufShift);
 }
@@ -1267,7 +1263,6 @@ static void rtl8192_update_cap(struct net_device *dev, u16 cap)
 }
 static void rtl8192_net_update(struct net_device *dev)
 {
-
 	struct r8192_priv *priv = ieee80211_priv(dev);
 	struct ieee80211_network *net;
 	u16 BcnTimeCfg = 0, BcnCW = 6, BcnIFS = 0xf;
@@ -1725,7 +1720,6 @@ static short rtl8192_usb_initendpoints(struct net_device *dev)
 
 #ifndef JACKSON_NEW_RX
 	for (i = 0; i < (MAX_RX_URB + 1); i++) {
-
 		priv->rx_urb[i] = usb_alloc_urb(0, GFP_KERNEL);
 
 		priv->rx_urb[i]->transfer_buffer =
@@ -2658,7 +2652,6 @@ static short rtl8192_get_channel_map(struct net_device *dev)
 
 static short rtl8192_init(struct net_device *dev)
 {
-
 	struct r8192_priv *priv = ieee80211_priv(dev);
 
 	memset(&(priv->stats), 0, sizeof(struct Stats));
@@ -3007,7 +3000,6 @@ static bool rtl8192_adapter_start(struct net_device *dev)
 						     bMaskByte2);
 
 			for (i = 0; i < CCKTxBBGainTableLength; i++) {
-
 				if (TempCCk == priv->cck_txbbgain_table[i].ccktxbb_valuearray[0]) {
 					priv->cck_present_attentuation_20Mdefault = (u8)i;
 					break;
@@ -3228,7 +3220,6 @@ static void CamRestoreAllEntry(struct net_device *dev)
 
 	if ((priv->ieee80211->pairwise_key_type == KEY_TYPE_WEP40) ||
 	    (priv->ieee80211->pairwise_key_type == KEY_TYPE_WEP104)) {
-
 		for (EntryId = 0; EntryId < 4; EntryId++) {
 			MacAddr = CAM_CONST_ADDR[EntryId];
 			setKey(dev, EntryId, EntryId,
@@ -3237,7 +3228,6 @@ static void CamRestoreAllEntry(struct net_device *dev)
 		}
 
 	} else if (priv->ieee80211->pairwise_key_type == KEY_TYPE_TKIP) {
-
 		if (priv->ieee80211->iw_mode == IW_MODE_ADHOC)
 			setKey(dev, 4, 0, priv->ieee80211->pairwise_key_type,
 			       (u8 *)dev->dev_addr, 0, NULL);
@@ -3245,7 +3235,6 @@ static void CamRestoreAllEntry(struct net_device *dev)
 			setKey(dev, 4, 0, priv->ieee80211->pairwise_key_type,
 			       MacAddr, 0, NULL);
 	} else if (priv->ieee80211->pairwise_key_type == KEY_TYPE_CCMP) {
-
 		if (priv->ieee80211->iw_mode == IW_MODE_ADHOC)
 			setKey(dev, 4, 0, priv->ieee80211->pairwise_key_type,
 			       (u8 *)dev->dev_addr, 0, NULL);
@@ -3446,7 +3435,6 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
 	/* for AP roaming */
 	if (priv->ieee80211->state == IEEE80211_LINKED &&
 	    priv->ieee80211->iw_mode == IW_MODE_INFRA) {
-
 		rtl819x_update_rxcounts(priv, &TotalRxBcnNum, &TotalRxDataNum);
 		if ((TotalRxBcnNum + TotalRxDataNum) == 0) {
 #ifdef TODO
@@ -4865,7 +4853,6 @@ static void rtl8192_rx_cmd(struct sk_buff *skb)
 	};
 
 	if ((skb->len >= (20 + sizeof(rx_desc_819x_usb))) && (skb->len < RX_URB_SIZE)) {
-
 		query_rx_cmdpkt_desc_status(skb, &stats);
 		/* prfd->queue_id = 1; */
 
@@ -5000,7 +4987,6 @@ fail:
  */
 static void rtl8192_cancel_deferred_work(struct r8192_priv *priv)
 {
-
 	cancel_work_sync(&priv->reset_wq);
 	cancel_delayed_work(&priv->watch_dog_wq);
 	cancel_delayed_work(&priv->update_beacon_wq);
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: rtl8192u: remove blank lines after braces (opening)
  2016-04-05 16:07 [PATCH] staging: rtl8192u: remove blank lines after braces (opening) Nicholas Sim
@ 2016-04-07 17:59 ` Andy Shevchenko
  2016-04-07 18:04   ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2016-04-07 17:59 UTC (permalink / raw)
  To: Nicholas Sim; +Cc: Greg Kroah-Hartman, devel, linux-kernel

On Tue, Apr 5, 2016 at 7:07 PM, Nicholas Sim <nicholassimws@gmail.com> wrote:
> Remove unneeded blank lines appearing after opening braces as suggested
> by checkpatch.pl
>

You have to combine this with the rest so called 'indentation' fixes,
e.g. +- empty lines, tabs vs. spaces, etc.

P.S. By the way. are they first patches you are trying to push to kernel?

> Signed-off-by: Nicholas Sim <nicholassimws@gmail.com>
> ---
>  drivers/staging/rtl8192u/r8192U_core.c | 14 --------------
>  1 file changed, 14 deletions(-)
>
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> index 2f506b8..21d5693 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -323,7 +323,6 @@ void write_nic_byte(struct net_device *dev, int indx, u8 data)
>
>  void write_nic_word(struct net_device *dev, int indx, u16 data)
>  {
> -
>         int status;
>
>         struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
> @@ -347,7 +346,6 @@ void write_nic_word(struct net_device *dev, int indx, u16 data)
>
>  void write_nic_dword(struct net_device *dev, int indx, u32 data)
>  {
> -
>         int status;
>
>         struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
> @@ -733,7 +731,6 @@ void rtl8192_update_msr(struct net_device *dev)
>          * master (see the create BSS/IBSS func)
>          */
>         if (priv->ieee80211->state == IEEE80211_LINKED) {
> -
>                 if (priv->ieee80211->iw_mode == IW_MODE_INFRA)
>                         msr |= (MSR_LINK_MANAGED << MSR_LINK_SHIFT);
>                 else if (priv->ieee80211->iw_mode == IW_MODE_ADHOC)
> @@ -768,7 +765,6 @@ static void rtl8192_rx_isr(struct urb *urb);
>
>  static u32 get_rxpacket_shiftbytes_819xusb(struct ieee80211_rx_stats *pstats)
>  {
> -
>         return (sizeof(rx_desc_819x_usb) + pstats->RxDrvInfoSize
>                 + pstats->RxBufShift);
>  }
> @@ -1267,7 +1263,6 @@ static void rtl8192_update_cap(struct net_device *dev, u16 cap)
>  }
>  static void rtl8192_net_update(struct net_device *dev)
>  {
> -
>         struct r8192_priv *priv = ieee80211_priv(dev);
>         struct ieee80211_network *net;
>         u16 BcnTimeCfg = 0, BcnCW = 6, BcnIFS = 0xf;
> @@ -1725,7 +1720,6 @@ static short rtl8192_usb_initendpoints(struct net_device *dev)
>
>  #ifndef JACKSON_NEW_RX
>         for (i = 0; i < (MAX_RX_URB + 1); i++) {
> -
>                 priv->rx_urb[i] = usb_alloc_urb(0, GFP_KERNEL);
>
>                 priv->rx_urb[i]->transfer_buffer =
> @@ -2658,7 +2652,6 @@ static short rtl8192_get_channel_map(struct net_device *dev)
>
>  static short rtl8192_init(struct net_device *dev)
>  {
> -
>         struct r8192_priv *priv = ieee80211_priv(dev);
>
>         memset(&(priv->stats), 0, sizeof(struct Stats));
> @@ -3007,7 +3000,6 @@ static bool rtl8192_adapter_start(struct net_device *dev)
>                                                      bMaskByte2);
>
>                         for (i = 0; i < CCKTxBBGainTableLength; i++) {
> -
>                                 if (TempCCk == priv->cck_txbbgain_table[i].ccktxbb_valuearray[0]) {
>                                         priv->cck_present_attentuation_20Mdefault = (u8)i;
>                                         break;
> @@ -3228,7 +3220,6 @@ static void CamRestoreAllEntry(struct net_device *dev)
>
>         if ((priv->ieee80211->pairwise_key_type == KEY_TYPE_WEP40) ||
>             (priv->ieee80211->pairwise_key_type == KEY_TYPE_WEP104)) {
> -
>                 for (EntryId = 0; EntryId < 4; EntryId++) {
>                         MacAddr = CAM_CONST_ADDR[EntryId];
>                         setKey(dev, EntryId, EntryId,
> @@ -3237,7 +3228,6 @@ static void CamRestoreAllEntry(struct net_device *dev)
>                 }
>
>         } else if (priv->ieee80211->pairwise_key_type == KEY_TYPE_TKIP) {
> -
>                 if (priv->ieee80211->iw_mode == IW_MODE_ADHOC)
>                         setKey(dev, 4, 0, priv->ieee80211->pairwise_key_type,
>                                (u8 *)dev->dev_addr, 0, NULL);
> @@ -3245,7 +3235,6 @@ static void CamRestoreAllEntry(struct net_device *dev)
>                         setKey(dev, 4, 0, priv->ieee80211->pairwise_key_type,
>                                MacAddr, 0, NULL);
>         } else if (priv->ieee80211->pairwise_key_type == KEY_TYPE_CCMP) {
> -
>                 if (priv->ieee80211->iw_mode == IW_MODE_ADHOC)
>                         setKey(dev, 4, 0, priv->ieee80211->pairwise_key_type,
>                                (u8 *)dev->dev_addr, 0, NULL);
> @@ -3446,7 +3435,6 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
>         /* for AP roaming */
>         if (priv->ieee80211->state == IEEE80211_LINKED &&
>             priv->ieee80211->iw_mode == IW_MODE_INFRA) {
> -
>                 rtl819x_update_rxcounts(priv, &TotalRxBcnNum, &TotalRxDataNum);
>                 if ((TotalRxBcnNum + TotalRxDataNum) == 0) {
>  #ifdef TODO
> @@ -4865,7 +4853,6 @@ static void rtl8192_rx_cmd(struct sk_buff *skb)
>         };
>
>         if ((skb->len >= (20 + sizeof(rx_desc_819x_usb))) && (skb->len < RX_URB_SIZE)) {
> -
>                 query_rx_cmdpkt_desc_status(skb, &stats);
>                 /* prfd->queue_id = 1; */
>
> @@ -5000,7 +4987,6 @@ fail:
>   */
>  static void rtl8192_cancel_deferred_work(struct r8192_priv *priv)
>  {
> -
>         cancel_work_sync(&priv->reset_wq);
>         cancel_delayed_work(&priv->watch_dog_wq);
>         cancel_delayed_work(&priv->update_beacon_wq);
> --
> 2.4.3
>



-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: rtl8192u: remove blank lines after braces (opening)
  2016-04-07 17:59 ` Andy Shevchenko
@ 2016-04-07 18:04   ` Joe Perches
  2016-04-07 18:06     ` Andy Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2016-04-07 18:04 UTC (permalink / raw)
  To: Andy Shevchenko, Nicholas Sim; +Cc: Greg Kroah-Hartman, devel, linux-kernel

On Thu, 2016-04-07 at 20:59 +0300, Andy Shevchenko wrote:
> On Tue, Apr 5, 2016 at 7:07 PM, Nicholas Sim <nicholassimws@gmail.com> wrote:
> > 
> > Remove unneeded blank lines appearing after opening braces as suggested
> > by checkpatch.pl
> > 
> You have to combine this with the rest so called 'indentation' fixes,
> e.g. +- empty lines, tabs vs. spaces, etc.

Actually, patches that do single things like removing
undesired blank lines are easier to review if separate
from patches that change horizontal whitespace.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: rtl8192u: remove blank lines after braces (opening)
  2016-04-07 18:04   ` Joe Perches
@ 2016-04-07 18:06     ` Andy Shevchenko
  2016-04-07 18:11       ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2016-04-07 18:06 UTC (permalink / raw)
  To: Joe Perches; +Cc: Nicholas Sim, Greg Kroah-Hartman, devel, linux-kernel

On Thu, Apr 7, 2016 at 9:04 PM, Joe Perches <joe@perches.com> wrote:
> On Thu, 2016-04-07 at 20:59 +0300, Andy Shevchenko wrote:
>> On Tue, Apr 5, 2016 at 7:07 PM, Nicholas Sim <nicholassimws@gmail.com> wrote:
>> >
>> > Remove unneeded blank lines appearing after opening braces as suggested
>> > by checkpatch.pl
>> >
>> You have to combine this with the rest so called 'indentation' fixes,
>> e.g. +- empty lines, tabs vs. spaces, etc.
>
> Actually, patches that do single things like removing
> undesired blank lines are easier to review if separate
> from patches that change horizontal whitespace.
>

Okay, but I think you at least agree that +- empty lines can be easily combined.


-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: rtl8192u: remove blank lines after braces (opening)
  2016-04-07 18:06     ` Andy Shevchenko
@ 2016-04-07 18:11       ` Joe Perches
  0 siblings, 0 replies; 5+ messages in thread
From: Joe Perches @ 2016-04-07 18:11 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Nicholas Sim, Greg Kroah-Hartman, devel, linux-kernel

On Thu, 2016-04-07 at 21:06 +0300, Andy Shevchenko wrote:
> On Thu, Apr 7, 2016 at 9:04 PM, Joe Perches <joe@perches.com> wrote:
> > On Thu, 2016-04-07 at 20:59 +0300, Andy Shevchenko wrote:
> > > On Tue, Apr 5, 2016 at 7:07 PM, Nicholas Sim  wrote:
> > > > 
> > > > Remove unneeded blank lines appearing after opening braces as suggested
> > > > by checkpatch.pl
> > > > 
> > > You have to combine this with the rest so called 'indentation' fixes,
> > > e.g. +- empty lines, tabs vs. spaces, etc.
> > Actually, patches that do single things like removing
> > undesired blank lines are easier to review if separate
> > from patches that change horizontal whitespace.
> > 
> Okay, but I think you at least agree that +- empty lines can be easily combined.

Not really, but it's not important enough to me to care much
either way.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-07 18:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-05 16:07 [PATCH] staging: rtl8192u: remove blank lines after braces (opening) Nicholas Sim
2016-04-07 17:59 ` Andy Shevchenko
2016-04-07 18:04   ` Joe Perches
2016-04-07 18:06     ` Andy Shevchenko
2016-04-07 18:11       ` Joe Perches

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.