All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] Staging: rtl8192u: r819xU_firmware: removed commented out variable
@ 2015-02-20  5:54 Tolga Ceylan
  2015-02-20  5:54 ` [PATCH 2/4] Staging: rtl8192u: r819xU_firmware: removed commented out assert Tolga Ceylan
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Tolga Ceylan @ 2015-02-20  5:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Roxana Blaj, Ana Rey, Rui Miguel Silva,
	Joe Perches, Chaitra Ramaiah, devel, linux-kernel, tolga.ceylan

Removed commented out variable

Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_firmware.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c
index c230be2..9d0067e 100644
--- a/drivers/staging/rtl8192u/r819xU_firmware.c
+++ b/drivers/staging/rtl8192u/r819xU_firmware.c
@@ -37,7 +37,6 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address,
 	bool		    rt_status = true;
 	u16		    frag_threshold;
 	u16		    frag_length, frag_offset = 0;
-	//u16		    total_size;
 	int		    i;
 
 	rt_firmware	    *pfirmware = priv->pFirmware;
-- 
2.3.0


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

* [PATCH 2/4] Staging: rtl8192u: r819xU_firmware: removed commented out assert
  2015-02-20  5:54 [PATCH 1/4] Staging: rtl8192u: r819xU_firmware: removed commented out variable Tolga Ceylan
@ 2015-02-20  5:54 ` Tolga Ceylan
  2015-02-20  5:54 ` [PATCH 3/4] Staging: rtl9182u: r819xU_firmware: Replaced C99 comments with C89 Tolga Ceylan
  2015-02-20  5:54 ` [PATCH 4/4] Staging: rtl8192u: r819xU_firmware: added space after comma Tolga Ceylan
  2 siblings, 0 replies; 9+ messages in thread
From: Tolga Ceylan @ 2015-02-20  5:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Roxana Blaj, Ana Rey, Rui Miguel Silva,
	Joe Perches, Chaitra Ramaiah, devel, linux-kernel, tolga.ceylan

Removed an assert that was commented out. The comment provides
no documentation value as rt_status is properly handled.

Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_firmware.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c
index 9d0067e..6a818c4 100644
--- a/drivers/staging/rtl8192u/r819xU_firmware.c
+++ b/drivers/staging/rtl8192u/r819xU_firmware.c
@@ -329,8 +329,6 @@ bool init_firmware(struct net_device *dev)
 	}
 
 	RT_TRACE(COMP_FIRMWARE, "Firmware Download Success\n");
-	//assert(pfirmware->firmware_status == FW_STATUS_5_READY, ("Firmware Download Fail\n"));
-
 	return rt_status;
 
 download_firmware_fail:
-- 
2.3.0


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

* [PATCH 3/4] Staging: rtl9182u: r819xU_firmware: Replaced C99 comments with C89
  2015-02-20  5:54 [PATCH 1/4] Staging: rtl8192u: r819xU_firmware: removed commented out variable Tolga Ceylan
  2015-02-20  5:54 ` [PATCH 2/4] Staging: rtl8192u: r819xU_firmware: removed commented out assert Tolga Ceylan
@ 2015-02-20  5:54 ` Tolga Ceylan
  2015-02-20  5:54 ` [PATCH 4/4] Staging: rtl8192u: r819xU_firmware: added space after comma Tolga Ceylan
  2 siblings, 0 replies; 9+ messages in thread
From: Tolga Ceylan @ 2015-02-20  5:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Roxana Blaj, Ana Rey, Rui Miguel Silva,
	Joe Perches, Chaitra Ramaiah, devel, linux-kernel, tolga.ceylan

Replaced C99 comments with C89.

Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_firmware.c | 33 +++++++++++++++---------------
 1 file changed, 17 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c
index 6a818c4..e7b2f33 100644
--- a/drivers/staging/rtl8192u/r819xU_firmware.c
+++ b/drivers/staging/rtl8192u/r819xU_firmware.c
@@ -47,7 +47,7 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address,
 	u8		    index;
 
 	firmware_init_param(dev);
-	//Fragmentation might be required
+	/* Fragmentation might be required */
 	frag_threshold = pfirmware->cmdpacket_frag_thresold;
 	do {
 		if ((buffer_len - frag_offset) > frag_threshold) {
@@ -106,19 +106,20 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address,
 
 }
 
-//-----------------------------------------------------------------------------
-// Procedure:    Check whether main code is download OK. If OK, turn on CPU
-//
-// Description:   CPU register locates in different page against general register.
-//			    Switch to CPU register in the begin and switch back before return
-//
-//
-// Arguments:   The pointer of the adapter
-//
-// Returns:
-//        NDIS_STATUS_FAILURE - the following initialization process should be terminated
-//        NDIS_STATUS_SUCCESS - if firmware initialization process success
-//-----------------------------------------------------------------------------
+/*
+ * Procedure:	Check whether main code is download OK. If OK, turn on CPU
+ *
+ * Description:	CPU register locates in different page against general register.
+ *	    Switch to CPU register in the begin and switch back before return
+ *
+ *
+ * Arguments:   The pointer of the adapter
+ *
+ * Returns:
+ *        NDIS_STATUS_FAILURE - the following initialization process should
+ *				be terminated
+ *        NDIS_STATUS_SUCCESS - if firmware initialization process success
+ */
 static bool CPUcheck_maincodeok_turnonCPU(struct net_device *dev)
 {
 	bool		rt_status = true;
@@ -221,7 +222,7 @@ bool init_firmware(struct net_device *dev)
 		/* it is called by reset */
 		rst_opt = OPT_SYSTEM_RESET;
 		starting_state = FW_INIT_STEP0_BOOT;
-		// TODO: system reset
+		/* TODO: system reset */
 
 	} else if (pfirmware->firmware_status == FW_STATUS_5_READY) {
 		/* it is called by Initialize */
@@ -290,7 +291,7 @@ bool init_firmware(struct net_device *dev)
 			 * will set polling bit when firmware code is also configured
 			 */
 			pfirmware->firmware_status = FW_STATUS_1_MOVE_BOOT_CODE;
-			//mdelay(1000);
+			/* mdelay(1000); */
 			/*
 			 * To initialize IMEM, CPU move code  from 0x80000080,
 			 * hence, we send 0x80 byte packet
-- 
2.3.0


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

* [PATCH 4/4] Staging: rtl8192u: r819xU_firmware: added space after comma
  2015-02-20  5:54 [PATCH 1/4] Staging: rtl8192u: r819xU_firmware: removed commented out variable Tolga Ceylan
  2015-02-20  5:54 ` [PATCH 2/4] Staging: rtl8192u: r819xU_firmware: removed commented out assert Tolga Ceylan
  2015-02-20  5:54 ` [PATCH 3/4] Staging: rtl9182u: r819xU_firmware: Replaced C99 comments with C89 Tolga Ceylan
@ 2015-02-20  5:54 ` Tolga Ceylan
  2015-02-20  7:30   ` Joe Perches
  2015-03-07  0:57   ` Greg Kroah-Hartman
  2 siblings, 2 replies; 9+ messages in thread
From: Tolga Ceylan @ 2015-02-20  5:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Roxana Blaj, Ana Rey, Rui Miguel Silva,
	Joe Perches, Chaitra Ramaiah, devel, linux-kernel, tolga.ceylan

Resolved space required after that ',' errors reported by checkpatch.

Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_firmware.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c
index e7b2f33..8e7fe82 100644
--- a/drivers/staging/rtl8192u/r819xU_firmware.c
+++ b/drivers/staging/rtl8192u/r819xU_firmware.c
@@ -66,7 +66,7 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address,
 		skb  = dev_alloc_skb(USB_HWDESC_HEADER_LEN + frag_length + 4);
 		if (!skb)
 			return false;
-		memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev));
+		memcpy((unsigned char *)(skb->cb), &dev, sizeof(dev));
 		tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
 		tcb_desc->queue_index = TXCMD_QUEUE;
 		tcb_desc->bCmdOrInit = DESC_PACKET_TYPE_INIT;
@@ -91,7 +91,7 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address,
 		if (!priv->ieee80211->check_nic_enough_desc(dev, index) ||
 		       (!skb_queue_empty(&priv->ieee80211->skb_waitQ[index])) ||
 		       (priv->ieee80211->queue_stop)) {
-			RT_TRACE(COMP_FIRMWARE,"=====================================================> tx full!\n");
+			RT_TRACE(COMP_FIRMWARE, "=====================================================> tx full!\n");
 			skb_queue_tail(&priv->ieee80211->skb_waitQ[tcb_desc->queue_index], skb);
 		} else {
 			priv->ieee80211->softmac_hard_start_xmit(skb, dev);
@@ -242,7 +242,8 @@ bool init_firmware(struct net_device *dev)
 		 * or read image file from array. Default load from IMG file
 		 */
 		if (rst_opt == OPT_SYSTEM_RESET) {
-			rc = request_firmware(&fw_entry, fw_name[init_step],&priv->udev->dev);
+			rc = request_firmware(&fw_entry, fw_name[init_step],
+					      &priv->udev->dev);
 			if (rc < 0) {
 				RT_TRACE(COMP_ERR, "request firmware fail!\n");
 				goto download_firmware_fail;
@@ -254,12 +255,14 @@ bool init_firmware(struct net_device *dev)
 			}
 
 			if (init_step != FW_INIT_STEP1_MAIN) {
-				memcpy(pfirmware->firmware_buf,fw_entry->data,fw_entry->size);
+				memcpy(pfirmware->firmware_buf, fw_entry->data,
+				       fw_entry->size);
 				mapped_file = pfirmware->firmware_buf;
 				file_length = fw_entry->size;
 			} else {
 				memset(pfirmware->firmware_buf, 0, 128);
-				memcpy(&pfirmware->firmware_buf[128],fw_entry->data,fw_entry->size);
+				memcpy(&pfirmware->firmware_buf[128],
+				       fw_entry->data, fw_entry->size);
 				mapped_file = pfirmware->firmware_buf;
 				file_length = fw_entry->size + 128;
 			}
@@ -319,7 +322,9 @@ bool init_firmware(struct net_device *dev)
 
 			rt_status = CPUcheck_firmware_ready(dev);
 			if (rt_status != TRUE) {
-				RT_TRACE(COMP_ERR, "CPUcheck_firmware_ready fail(%d)!\n",rt_status);
+				RT_TRACE(COMP_ERR,
+					 "CPUcheck_firmware_ready fail(%d)!\n",
+					 rt_status);
 				goto download_firmware_fail;
 			}
 
-- 
2.3.0


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

* Re: [PATCH 4/4] Staging: rtl8192u: r819xU_firmware: added space after comma
  2015-02-20  5:54 ` [PATCH 4/4] Staging: rtl8192u: r819xU_firmware: added space after comma Tolga Ceylan
@ 2015-02-20  7:30   ` Joe Perches
  2015-02-20 19:47     ` Tolga Ceylan
  2015-03-07  0:57   ` Greg Kroah-Hartman
  1 sibling, 1 reply; 9+ messages in thread
From: Joe Perches @ 2015-02-20  7:30 UTC (permalink / raw)
  To: Tolga Ceylan
  Cc: Greg Kroah-Hartman, Roxana Blaj, Ana Rey, Rui Miguel Silva,
	Chaitra Ramaiah, devel, linux-kernel, Larry Finger

On Thu, 2015-02-19 at 21:54 -0800, Tolga Ceylan wrote:
> Resolved space required after that ',' errors reported by checkpatch.

trivia:

> diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c
[]
> @@ -66,7 +66,7 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address,
>  		skb  = dev_alloc_skb(USB_HWDESC_HEADER_LEN + frag_length + 4);
>  		if (!skb)
>  			return false;
> -		memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev));
> +		memcpy((unsigned char *)(skb->cb), &dev, sizeof(dev));


Might as well remove the unnecessary cast too:

		memcpy(skb->cb, &dev, sizeof(dev));

but it might be better to avoid the memcpy and use an assign

	*(struct net_device *)skb->cb = dev;


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

* Re: [PATCH 4/4] Staging: rtl8192u: r819xU_firmware: added space after comma
  2015-02-20  7:30   ` Joe Perches
@ 2015-02-20 19:47     ` Tolga Ceylan
  2015-02-21  0:31       ` Tolga Ceylan
  0 siblings, 1 reply; 9+ messages in thread
From: Tolga Ceylan @ 2015-02-20 19:47 UTC (permalink / raw)
  To: Joe Perches
  Cc: Greg Kroah-Hartman, Roxana Blaj, Ana Rey, Rui Miguel Silva,
	Chaitra Ramaiah, devel, linux-kernel, Larry Finger

On Thu, Feb 19, 2015 at 11:30 PM, Joe Perches <joe@perches.com> wrote:
>
> Might as well remove the unnecessary cast too:
>
>                 memcpy(skb->cb, &dev, sizeof(dev));
>
> but it might be better to avoid the memcpy and use an assign
>
>         *(struct net_device *)skb->cb = dev;
>

I'll submit another patch for the memcpy change.

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

* Re: [PATCH 4/4] Staging: rtl8192u: r819xU_firmware: added space after comma
  2015-02-20 19:47     ` Tolga Ceylan
@ 2015-02-21  0:31       ` Tolga Ceylan
  2015-02-21  1:59         ` Joe Perches
  0 siblings, 1 reply; 9+ messages in thread
From: Tolga Ceylan @ 2015-02-21  0:31 UTC (permalink / raw)
  To: Joe Perches
  Cc: Greg Kroah-Hartman, Roxana Blaj, Ana Rey, Rui Miguel Silva,
	Chaitra Ramaiah, devel, linux-kernel, Larry Finger

On Fri, Feb 20, 2015 at 11:47 AM, Tolga Ceylan <tolga.ceylan@gmail.com> wrote:
> On Thu, Feb 19, 2015 at 11:30 PM, Joe Perches <joe@perches.com> wrote:
>>
>> Might as well remove the unnecessary cast too:
>>
>>                 memcpy(skb->cb, &dev, sizeof(dev));
>>
>> but it might be better to avoid the memcpy and use an assign
>>
>>         *(struct net_device *)skb->cb = dev;
>>
>

Should I sent a new set of patches (including memcpy change)?
Or reply to the series with a single memcpy change patch?

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

* Re: [PATCH 4/4] Staging: rtl8192u: r819xU_firmware: added space after comma
  2015-02-21  0:31       ` Tolga Ceylan
@ 2015-02-21  1:59         ` Joe Perches
  0 siblings, 0 replies; 9+ messages in thread
From: Joe Perches @ 2015-02-21  1:59 UTC (permalink / raw)
  To: Tolga Ceylan
  Cc: Greg Kroah-Hartman, Roxana Blaj, Ana Rey, Rui Miguel Silva,
	Chaitra Ramaiah, devel, linux-kernel, Larry Finger

On Fri, 2015-02-20 at 16:31 -0800, Tolga Ceylan wrote:
> On Fri, Feb 20, 2015 at 11:47 AM, Tolga Ceylan <tolga.ceylan@gmail.com> wrote:
> > On Thu, Feb 19, 2015 at 11:30 PM, Joe Perches <joe@perches.com> wrote:
> >> Might as well remove the unnecessary cast too:
> >>                 memcpy(skb->cb, &dev, sizeof(dev));
> >> but it might be better to avoid the memcpy and use an assign
> >>         *(struct net_device *)skb->cb = dev;
[]
> Should I sent a new set of patches (including memcpy change)?
> Or reply to the series with a single memcpy change patch?

Let Larry Finger decide if he wants the
patches at all first.



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

* Re: [PATCH 4/4] Staging: rtl8192u: r819xU_firmware: added space after comma
  2015-02-20  5:54 ` [PATCH 4/4] Staging: rtl8192u: r819xU_firmware: added space after comma Tolga Ceylan
  2015-02-20  7:30   ` Joe Perches
@ 2015-03-07  0:57   ` Greg Kroah-Hartman
  1 sibling, 0 replies; 9+ messages in thread
From: Greg Kroah-Hartman @ 2015-03-07  0:57 UTC (permalink / raw)
  To: Tolga Ceylan
  Cc: Roxana Blaj, Ana Rey, Rui Miguel Silva, Joe Perches,
	Chaitra Ramaiah, devel, linux-kernel

On Thu, Feb 19, 2015 at 09:54:11PM -0800, Tolga Ceylan wrote:
> Resolved space required after that ',' errors reported by checkpatch.
> 
> Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com>
> ---
>  drivers/staging/rtl8192u/r819xU_firmware.c | 17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)

This patch doesn't apply to my tree for some reason :(

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

end of thread, other threads:[~2015-03-07 11:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-20  5:54 [PATCH 1/4] Staging: rtl8192u: r819xU_firmware: removed commented out variable Tolga Ceylan
2015-02-20  5:54 ` [PATCH 2/4] Staging: rtl8192u: r819xU_firmware: removed commented out assert Tolga Ceylan
2015-02-20  5:54 ` [PATCH 3/4] Staging: rtl9182u: r819xU_firmware: Replaced C99 comments with C89 Tolga Ceylan
2015-02-20  5:54 ` [PATCH 4/4] Staging: rtl8192u: r819xU_firmware: added space after comma Tolga Ceylan
2015-02-20  7:30   ` Joe Perches
2015-02-20 19:47     ` Tolga Ceylan
2015-02-21  0:31       ` Tolga Ceylan
2015-02-21  1:59         ` Joe Perches
2015-03-07  0:57   ` Greg Kroah-Hartman

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.