mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Derek Robson <robsonde@gmail.com>
To: gregkh@linuxfoundation.org, robsonde@gmail.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 04/25] Staging: rtl8192u: r819xU_cmdpkt.c - style fix
Date: Sat, 11 Feb 2017 22:53:33 +1300	[thread overview]
Message-ID: <e8619c69fada94cd4e5d821ef9c48049ee4c0782.1486804834.git.robsonde@gmail.com> (raw)
In-Reply-To: <cover.1486804834.git.robsonde@gmail.com>

Fixed style of block comments
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_cmdpkt.c | 99 +++++++++++++++++++-------------
 1 file changed, 60 insertions(+), 39 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.c b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
index 1168d133522e..671391a9cbf3 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.c
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
@@ -34,7 +34,8 @@ rt_status SendTxCommandPacket(struct net_device *dev, void *pData, u32 DataLen)
 	unsigned char	    *ptr_buf;
 
 	/* Get TCB and local buffer from common pool.
-	   (It is shared by CmdQ, MgntQ, and USB coalesce DataQ) */
+	 *  (It is shared by CmdQ, MgntQ, and USB coalesce DataQ)
+	 */
 	skb  = dev_alloc_skb(USB_HWDESC_HEADER_LEN + DataLen + 4);
 	if (!skb)
 		return RT_STATUS_FAILURE;
@@ -76,7 +77,8 @@ rt_status SendTxCommandPacket(struct net_device *dev, void *pData, u32 DataLen)
  *  When		Who	Remark
  *  05/12/2008		amy	Create Version 0 porting from windows code.
  *
- *---------------------------------------------------------------------------*/
+ *---------------------------------------------------------------------------
+ */
 static void cmpk_count_txstatistic(struct net_device *dev, cmpk_txfb_t *pstx_fb)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
@@ -87,8 +89,9 @@ static void cmpk_count_txstatistic(struct net_device *dev, cmpk_txfb_t *pstx_fb)
 					  (pu1Byte)(&rtState));
 
 	/* When RF is off, we should not count the packet for hw/sw synchronize
-	   reason, ie. there may be a duration while sw switch is changed and
-	   hw switch is being changed. */
+	 *  reason, ie. there may be a duration while sw switch is changed and
+	 *  hw switch is being changed.
+	 */
 	if (rtState == eRfOff)
 		return;
 #endif
@@ -98,8 +101,9 @@ static void cmpk_count_txstatistic(struct net_device *dev, cmpk_txfb_t *pstx_fb)
 		return;
 #endif
 	/* We can not know the packet length and transmit type:
-	   broadcast or uni or multicast. So the relative statistics
-	   must be collected in tx feedback info. */
+	 * broadcast or uni or multicast. So the relative statistics
+	 * must be collected in tx feedback info.
+	 */
 	if (pstx_fb->tok) {
 		priv->stats.txfeedbackok++;
 		priv->stats.txoktotal++;
@@ -155,7 +159,8 @@ static void cmpk_count_txstatistic(struct net_device *dev, cmpk_txfb_t *pstx_fb)
  *  When		Who	Remark
  *  05/08/2008		amy	Create Version 0 porting from windows code.
  *
- *---------------------------------------------------------------------------*/
+ *---------------------------------------------------------------------------
+ */
 static void cmpk_handle_tx_feedback(struct net_device *dev, u8 *pmsg)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
@@ -163,18 +168,19 @@ static void cmpk_handle_tx_feedback(struct net_device *dev, u8 *pmsg)
 
 	priv->stats.txfeedback++;
 
-	/* 1. Extract TX feedback info from RFD to temp structure buffer. */
-	/* It seems that FW use big endian(MIPS) and DRV use little endian in
-	   windows OS. So we have to read the content byte by byte or transfer
-	   endian type before copy the message copy. */
-	/* Use pointer to transfer structure memory. */
-	memcpy((u8 *)&rx_tx_fb, pmsg, sizeof(cmpk_txfb_t));
-	/* 2. Use tx feedback info to count TX statistics. */
-	cmpk_count_txstatistic(dev, &rx_tx_fb);
-	/* Comment previous method for TX statistic function. */
-	/* Collect info TX feedback packet to fill TCB. */
-	/* We can not know the packet length and transmit type: broadcast or uni
-	   or multicast. */
+	/* 1. Extract TX feedback info from RFD to temp structure buffer.
+	 *    It seems that FW use big endian(MIPS) and DRV use little endian in
+	 *    windows OS. So we have to read the content byte by byte or transfer
+	 *    endian type before copy the message copy.
+	 *    Use pointer to transfer structure memory.
+	 *    memcpy((u8 *)&rx_tx_fb, pmsg, sizeof(cmpk_txfb_t));
+	 * 2. Use tx feedback info to count TX statistics.
+	 *    cmpk_count_txstatistic(dev, &rx_tx_fb);
+	 *    Comment previous method for TX statistic function.
+	 *    Collect info TX feedback packet to fill TCB.
+	 *    We can not know the packet length and transmit type: broadcast or uni
+	 *    or multicast.
+	 */
 }
 
 static void cmdpkt_beacontimerinterrupt_819xusb(struct net_device *dev)
@@ -215,7 +221,8 @@ static void cmdpkt_beacontimerinterrupt_819xusb(struct net_device *dev)
  *  When		Who	Remark
  *  05/12/2008		amy	Add this for rtl8192 porting from windows code.
  *
- *---------------------------------------------------------------------------*/
+ *---------------------------------------------------------------------------
+ */
 static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
 {
 	cmpk_intr_sta_t		rx_intr_status;	/* */
@@ -225,8 +232,9 @@ static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
 
 	/* 1. Extract TX feedback info from RFD to temp structure buffer. */
 	/* It seems that FW use big endian(MIPS) and DRV use little endian in
-	   windows OS. So we have to read the content byte by byte or transfer
-	   endian type before copy the message copy. */
+	 * windows OS. So we have to read the content byte by byte or transfer
+	 * endian type before copy the message copy.
+	 */
 	rx_intr_status.length = pmsg[1];
 	if (rx_intr_status.length != (sizeof(cmpk_intr_sta_t) - 2)) {
 		DMESG("cmpk_Handle_Interrupt_Status: wrong length!\n");
@@ -276,15 +284,17 @@ static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
  *  When		Who	Remark
  *  05/12/2008		amy	Create Version 0 porting from windows code.
  *
- *---------------------------------------------------------------------------*/
+ *---------------------------------------------------------------------------
+ */
 static void cmpk_handle_query_config_rx(struct net_device *dev, u8 *pmsg)
 {
 	cmpk_query_cfg_t	rx_query_cfg;
 
 	/* 1. Extract TX feedback info from RFD to temp structure buffer. */
 	/* It seems that FW use big endian(MIPS) and DRV use little endian in
-	   windows OS. So we have to read the content byte by byte or transfer
-	   endian type before copy the message copy. */
+	 * windows OS. So we have to read the content byte by byte or transfer
+	 * endian type before copy the message copy.
+	 */
 	rx_query_cfg.cfg_action		= (pmsg[4] & 0x80000000) >> 31;
 	rx_query_cfg.cfg_type		= (pmsg[4] & 0x60) >> 5;
 	rx_query_cfg.cfg_size		= (pmsg[4] & 0x18) >> 3;
@@ -312,7 +322,8 @@ static void cmpk_handle_query_config_rx(struct net_device *dev, u8 *pmsg)
  *	When		Who	Remark
  *	05/12/2008	amy	Create Version 0 porting from windows code.
  *
- *---------------------------------------------------------------------------*/
+ *---------------------------------------------------------------------------
+ */
 static void cmpk_count_tx_status(struct net_device *dev,
 				 cmpk_tx_status_t *pstx_status)
 {
@@ -326,8 +337,9 @@ static void cmpk_count_tx_status(struct net_device *dev,
 					  (pu1Byte)(&rtState));
 
 	/* When RF is off, we should not count the packet for hw/sw synchronize
-	   reason, ie. there may be a duration while sw switch is changed and
-	   hw switch is being changed. */
+	 * reason, ie. there may be a duration while sw switch is changed and
+	 * hw switch is being changed.
+	 */
 	if (rtState == eRfOff)
 		return;
 #endif
@@ -373,7 +385,8 @@ static void cmpk_count_tx_status(struct net_device *dev,
  *	When		Who	Remark
  *	05/12/2008	amy	Create Version 0 porting from windows code.
  *
- *---------------------------------------------------------------------------*/
+ *---------------------------------------------------------------------------
+ */
 static void cmpk_handle_tx_status(struct net_device *dev, u8 *pmsg)
 {
 	cmpk_tx_status_t	rx_tx_sts;
@@ -398,7 +411,8 @@ static void cmpk_handle_tx_status(struct net_device *dev, u8 *pmsg)
  *	When		Who	Remark
  *	05/12/2008	amy	Create Version 0 porting from windows code.
  *
- *---------------------------------------------------------------------------*/
+ *---------------------------------------------------------------------------
+ */
 static void cmpk_handle_tx_rate_history(struct net_device *dev, u8 *pmsg)
 {
 	cmpk_tx_rahis_t	*ptxrate;
@@ -412,8 +426,9 @@ static void cmpk_handle_tx_rate_history(struct net_device *dev, u8 *pmsg)
 					  (pu1Byte)(&rtState));
 
 	/* When RF is off, we should not count the packet for hw/sw synchronize
-	   reason, ie. there may be a duration while sw switch is changed and
-	   hw switch is being changed. */
+	 * reason, ie. there may be a duration while sw switch is changed and
+	 * hw switch is being changed.
+	 */
 	if (rtState == eRfOff)
 		return;
 #endif
@@ -421,7 +436,8 @@ static void cmpk_handle_tx_rate_history(struct net_device *dev, u8 *pmsg)
 	ptemp = (u32 *)pmsg;
 
 	/* Do endian transfer to word alignment(16 bits) for windows system.
-	   You must do different endian transfer for linux and MAC OS */
+	 * You must do different endian transfer for linux and MAC OS
+	 */
 	for (i = 0; i < (length/4); i++) {
 		u16	 temp1, temp2;
 
@@ -468,7 +484,8 @@ static void cmpk_handle_tx_rate_history(struct net_device *dev, u8 *pmsg)
  *  When		Who	Remark
  *  05/06/2008		amy	Create Version 0 porting from windows code.
  *
- *---------------------------------------------------------------------------*/
+ *---------------------------------------------------------------------------
+ */
 u32 cmpk_message_handle_rx(struct net_device *dev,
 			   struct ieee80211_rx_stats *pstats)
 {
@@ -478,7 +495,8 @@ u32 cmpk_message_handle_rx(struct net_device *dev,
 	u8			*pcmd_buff;
 
 	/* 0. Check inpt arguments. If is is a command queue message or
-	   pointer is null. */
+	 *  pointer is null.
+	 */
 	if (pstats == NULL)
 		return 0;	/* This is not a command packet. */
 
@@ -492,10 +510,12 @@ u32 cmpk_message_handle_rx(struct net_device *dev,
 	element_id = pcmd_buff[0];
 
 	/* 4. Check every received command packet content according to different
-	      element type. Because FW may aggregate RX command packet to
-	      minimize transmit time between DRV and FW.*/
+	 *    element type. Because FW may aggregate RX command packet to
+	 *    minimize transmit time between DRV and FW.
+	 */
 	/* Add a counter to prevent the lock in the loop from being held too
-	   long */
+	 * long
+	 */
 	while (total_length > 0 && exe_cnt++ < 100) {
 		/* We support aggregation of different cmd in the same packet */
 		element_id = pcmd_buff[0];
@@ -523,7 +543,8 @@ u32 cmpk_message_handle_rx(struct net_device *dev,
 
 		case RX_TX_PER_PKT_FEEDBACK:
 			/* You must at lease add a switch case element here,
-			   Otherwise, we will jump to default case. */
+			 * Otherwise, we will jump to default case.
+			 */
 			cmd_length = CMPK_RX_TX_FB_SIZE;
 			break;
 
-- 
2.11.1

  parent reply	other threads:[~2017-02-11  9:54 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-11  9:52 [PATCH 00/25] Staging: rtl8192u - fixed block comments Derek Robson
2017-02-11  9:52 ` [PATCH 01/25] Staging: rtl8192u: r819xU_phy.c - style fix Derek Robson
2017-02-11  9:52 ` [PATCH 02/25] Staging: rtl8192u: r819xU_firmware.c " Derek Robson
2017-02-11  9:53 ` [PATCH 03/25] Staging: rtl8192u: r819xU_cmdpkt.h " Derek Robson
2017-02-11  9:53 ` Derek Robson [this message]
2017-02-12 12:39   ` [PATCH 04/25] Staging: rtl8192u: r819xU_cmdpkt.c " Greg KH
2017-02-11  9:53 ` [PATCH 05/25] Staging: rtl8192u: r8192U_hw.h " Derek Robson
2017-02-11  9:54 ` [PATCH 06/25] Staging: rtl8192u: r8192U_dm.c " Derek Robson
2017-02-11  9:54 ` [PATCH 07/25] Staging: rtl8192u: r8192U_core.c " Derek Robson
2017-02-11  9:54 ` [PATCH 08/25] Staging: rtl8192u: r8192U.h " Derek Robson
2017-02-11  9:55 ` [PATCH 09/25] Staging: rtl8192u: r8190_rtl8256.h " Derek Robson
2017-02-11  9:55 ` [PATCH 10/25] Staging: rtl8192u: r8190_rtl8256.c " Derek Robson
2017-02-11  9:55 ` [PATCH 11/25] Staging: rtl8192u: r8180_93cx6.c " Derek Robson
2017-02-11  9:55 ` [PATCH 12/25] Staging: rtl8192u: ieee80211: ieee80211_crypt_wep.c " Derek Robson
2017-02-11  9:56 ` [PATCH 13/25] Staging: rtl8192u: ieee80211: rtl819x_TSProc.c " Derek Robson
2017-02-11  9:56 ` [PATCH 14/25] Staging: rtl8192u: ieee80211: ieee80211_softmac.c " Derek Robson
2017-02-11  9:56 ` [PATCH 15/25] Staging: rtl8192u: ieee80211: ieee80211_module.c " Derek Robson
2017-02-11  9:56 ` [PATCH 16/25] Staging: rtl8192u: ieee80211: rtl819x_HTProc.c " Derek Robson
2017-02-11  9:57 ` [PATCH 17/25] Staging: rtl8192u: ieee80211: rtl819x_BAProc.c " Derek Robson
2017-02-11  9:57 ` [PATCH 18/25] Staging: rtl8192u: ieee80211: rtl819x_HT.h " Derek Robson
2017-02-12 12:31   ` Greg KH
2017-02-11  9:57 ` [PATCH 19/25] Staging: rtl8192u: ieee80211: rtl819x_BA.h " Derek Robson
2017-02-11  9:57 ` [PATCH 20/25] Staging: rtl8192u: ieee80211: ieee80211_wx.c " Derek Robson
2017-02-11  9:58 ` [PATCH 21/25] Staging: rtl8192u: ieee80211: ieee80211_tx.c " Derek Robson
2017-02-11  9:58 ` [PATCH 22/25] Staging: rtl8192u: ieee80211: ieee80211_rx.c " Derek Robson
2017-02-11  9:58 ` [PATCH 23/25] Staging: rtl8192u: ieee80211: ieee80211_crypt.h " Derek Robson
2017-02-11  9:59 ` [PATCH 24/25] Staging: rtl8192u: ieee80211: ieee80211_crypt.c " Derek Robson
2017-02-11  9:59 ` [PATCH 25/25] Staging: rtl8192u: ieee80211: ieee80211.h " Derek Robson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e8619c69fada94cd4e5d821ef9c48049ee4c0782.1486804834.git.robsonde@gmail.com \
    --to=robsonde@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®