All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 2/2] Staging: rtl8192u: Replace types
       [not found] <cover.1426181718.git.ksenija.stanojevic@gmail.com>
@ 2015-03-12 17:36 ` Ksenija Stanojevic
  2015-03-16 14:55   ` [Outreachy kernel] " Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Ksenija Stanojevic @ 2015-03-12 17:36 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Ksenija Stanojevic, ksenija.stanojevic

This patch replaces types made by typedefs in r8192U_cmdpkt.h by struct
definitions. Also where ever struct was added line was aligned and
doesn't exceed 80 character mark and unnecessary tabs were removed.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
---
v2: change commit message.

 drivers/staging/rtl8192u/r819xU_cmdpkt.c | 35 ++++++++++++++++----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.c b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
index 545f49e..d75f671 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.c
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
@@ -26,7 +26,7 @@
 #include "r8192U.h"
 #include "r819xU_cmdpkt.h"
 
-rt_status SendTxCommandPacket(struct net_device *dev, void *pData, u32 DataLen)
+enum rt_status SendTxCommandPacket(struct net_device *dev, void *pData, u32 DataLen)
 {
 	struct r8192_priv   *priv = ieee80211_priv(dev);
 	struct sk_buff	    *skb;
@@ -77,7 +77,8 @@ rt_status SendTxCommandPacket(struct net_device *dev, void *pData, u32 DataLen)
  *  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)
+static void cmpk_count_txstatistic(struct net_device *dev,
+				   struct cmpk_txfb *pstx_fb)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
 #ifdef ENABLE_PS
@@ -162,7 +163,7 @@ static void cmpk_count_txstatistic(struct net_device *dev, cmpk_txfb_t *pstx_fb)
 static void cmpk_handle_tx_feedback(struct net_device *dev, u8 *pmsg)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
-	cmpk_txfb_t		rx_tx_fb;
+	struct cmpk_txfb rx_tx_fb;
 
 	priv->stats.txfeedback++;
 
@@ -171,7 +172,7 @@ static void cmpk_handle_tx_feedback(struct net_device *dev, u8 *pmsg)
 	   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));
+	memcpy((u8 *)&rx_tx_fb, pmsg, sizeof(struct cmpk_txfb));
 	/* 2. Use tx feedback info to count TX statistics. */
 	cmpk_count_txstatistic(dev, &rx_tx_fb);
 	/* Comment previous method for TX statistic function. */
@@ -227,7 +228,7 @@ static void cmdpkt_beacontimerinterrupt_819xusb(struct net_device *dev)
  *---------------------------------------------------------------------------*/
 static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
 {
-	cmpk_intr_sta_t		rx_intr_status;	/* */
+	struct cmpk_intr_sta rx_intr_status;	/* */
 	struct r8192_priv *priv = ieee80211_priv(dev);
 
 	DMESG("---> cmpk_Handle_Interrupt_Status()\n");
@@ -237,7 +238,7 @@ static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
 	   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)) {
+	if (rx_intr_status.length != (sizeof(struct cmpk_intr_sta) - 2)) {
 		DMESG("cmpk_Handle_Interrupt_Status: wrong length!\n");
 		return;
 	}
@@ -293,7 +294,7 @@ static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
  *---------------------------------------------------------------------------*/
 static void cmpk_handle_query_config_rx(struct net_device *dev, u8 *pmsg)
 {
-	cmpk_query_cfg_t	rx_query_cfg;
+	struct cmpk_set_cfg rx_query_cfg;
 
 
 	/* 1. Extract TX feedback info from RFD to temp structure buffer. */
@@ -331,7 +332,7 @@ static void cmpk_handle_query_config_rx(struct net_device *dev, u8 *pmsg)
  *
  *---------------------------------------------------------------------------*/
 static void cmpk_count_tx_status(struct net_device *dev,
-				 cmpk_tx_status_t *pstx_status)
+				 struct cmpk_tx_status *pstx_status)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
 
@@ -395,9 +396,9 @@ static void cmpk_count_tx_status(struct net_device *dev,
  *---------------------------------------------------------------------------*/
 static void cmpk_handle_tx_status(struct net_device *dev, u8 *pmsg)
 {
-	cmpk_tx_status_t	rx_tx_sts;
+	struct cmpk_tx_status rx_tx_sts;
 
-	memcpy((void *)&rx_tx_sts, (void *)pmsg, sizeof(cmpk_tx_status_t));
+	memcpy((void *)&rx_tx_sts, (void *)pmsg, sizeof(struct cmpk_tx_status));
 	/* 2. Use tx feedback info to count TX statistics. */
 	cmpk_count_tx_status(dev, &rx_tx_sts);
 
@@ -422,9 +423,9 @@ static void cmpk_handle_tx_status(struct net_device *dev, u8 *pmsg)
  *---------------------------------------------------------------------------*/
 static void cmpk_handle_tx_rate_history(struct net_device *dev, u8 *pmsg)
 {
-	cmpk_tx_rahis_t	*ptxrate;
+	struct cmpk_tx_rahis *ptxrate;
 	u8		i, j;
-	u16		length = sizeof(cmpk_tx_rahis_t);
+	u16		length = sizeof(struct cmpk_tx_rahis);
 	u32		*ptemp;
 	struct r8192_priv *priv = ieee80211_priv(dev);
 
@@ -452,7 +453,7 @@ static void cmpk_handle_tx_rate_history(struct net_device *dev, u8 *pmsg)
 		ptemp[i] = (temp1 << 16) | temp2;
 	}
 
-	ptxrate = (cmpk_tx_rahis_t *)pmsg;
+	ptxrate = (struct cmpk_tx_rahis *)pmsg;
 
 	if (ptxrate == NULL)
 		return;
@@ -504,7 +505,7 @@ u32 cmpk_message_handle_rx(struct net_device *dev,
 	/* 0. Check inpt arguments. If is is a command queue message or
 	   pointer is null. */
 	if (pstats == NULL)
-		return 0;	/* This is not a command packet. */
+		return U32_FALSE;	/* This is not a command packet. */
 
 	/* 1. Read received command packet message length from RFD. */
 	total_length = pstats->Length;
@@ -532,7 +533,7 @@ u32 cmpk_message_handle_rx(struct net_device *dev,
 
 		case RX_INTERRUPT_STATUS:
 			cmpk_handle_interrupt_status(dev, pcmd_buff);
-			cmd_length = sizeof(cmpk_intr_sta_t);
+			cmd_length = sizeof(struct cmpk_intr_sta);
 			break;
 
 		case BOTH_QUERY_CONFIG:
@@ -560,12 +561,12 @@ u32 cmpk_message_handle_rx(struct net_device *dev,
 
 			RT_TRACE(COMP_ERR, "---->%s():unknown CMD Element\n",
 				 __func__);
-			return 1;	/* This is a command packet. */
+			return U32_TRUE;	/* This is a command packet. */
 		}
 
 		total_length -= cmd_length;
 		pcmd_buff    += cmd_length;
 	}
-	return	1;	/* This is a command packet. */
+	return	U32_TRUE;	/* This is a command packet. */
 
 }
-- 
1.9.1



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

* Re: [Outreachy kernel] [PATCH v2 2/2] Staging: rtl8192u: Replace types
  2015-03-12 17:36 ` [PATCH v2 2/2] Staging: rtl8192u: Replace types Ksenija Stanojevic
@ 2015-03-16 14:55   ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2015-03-16 14:55 UTC (permalink / raw)
  To: Ksenija Stanojevic; +Cc: outreachy-kernel, ksenija.stanojevic

On Thu, Mar 12, 2015 at 06:36:49PM +0100, Ksenija Stanojevic wrote:
> This patch replaces types made by typedefs in r8192U_cmdpkt.h by struct
> definitions. Also where ever struct was added line was aligned and
> doesn't exceed 80 character mark and unnecessary tabs were removed.
> 
> Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
> ---
> v2: change commit message.
> 
>  drivers/staging/rtl8192u/r819xU_cmdpkt.c | 35 ++++++++++++++++----------------
>  1 file changed, 18 insertions(+), 17 deletions(-)

This requires your previous patch, which would have broken the build,
you can't do that either :(


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

end of thread, other threads:[~2015-03-16 14:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1426181718.git.ksenija.stanojevic@gmail.com>
2015-03-12 17:36 ` [PATCH v2 2/2] Staging: rtl8192u: Replace types Ksenija Stanojevic
2015-03-16 14:55   ` [Outreachy kernel] " Greg KH

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.