* [PATCH] libertas: trim overly long debug statement
@ 2008-01-28 16:25 Holger Schurig
2008-01-28 16:38 ` Dan Williams
0 siblings, 1 reply; 5+ messages in thread
From: Holger Schurig @ 2008-01-28 16:25 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, libertas-dev, Dan Williams
see subject
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Index: wireless-2.6/drivers/net/wireless/libertas/cmd.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/cmd.c 2008-01-22 12:47:50.000000000 +0100
+++ wireless-2.6/drivers/net/wireless/libertas/cmd.c 2008-01-22 16:36:02.000000000 +0100
@@ -1182,9 +1182,9 @@ static void lbs_submit_command(struct lb
command == CMD_802_11_AUTHENTICATE)
timeo = 10 * HZ;
- lbs_deb_host("DNLD_CMD: command 0x%04x, seq %d, size %d, jiffies %lu\n",
+ lbs_deb_cmd("DNLD_CMD: command 0x%04x, seq %d, size %d, jiffies %lu\n",
command, le16_to_cpu(cmd->seqnum), cmdsize, jiffies);
- lbs_deb_hex(LBS_DEB_HOST, "DNLD_CMD", (void *) cmdnode->cmdbuf, cmdsize);
+ lbs_deb_hex(LBS_DEB_CMD, "DNLD_CMD", (void *) cmdnode->cmdbuf, cmdsize);
ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) cmd, cmdsize);
@@ -1193,9 +1193,7 @@ static void lbs_submit_command(struct lb
/* Let the timer kick in and retry, and potentially reset
the whole thing if the condition persists */
timeo = HZ;
- } else
- lbs_deb_cmd("DNLD_CMD: sent command 0x%04x, jiffies %lu\n",
- command, jiffies);
+ }
/* Setup the timer after transmit command */
mod_timer(&priv->command_timer, jiffies + timeo);
@@ -1214,7 +1212,7 @@ static int lbs_cmd_mac_control(struct lb
cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mac_control) + S_DS_GEN);
mac->action = cpu_to_le16(priv->currentpacketfilter);
- lbs_deb_cmd("MAC_CONTROL: action 0x%x, size %d\n",
+ lbs_deb_cmd("MAC_CONTROL: action 0x%04x, size %d\n",
le16_to_cpu(mac->action), le16_to_cpu(cmd->size));
lbs_deb_leave(LBS_DEB_CMD);
@@ -2068,15 +2066,15 @@ int lbs_cmd_copyback(struct lbs_private
struct cmd_header *buf = (void *)extra;
uint16_t copy_len;
- lbs_deb_enter(LBS_DEB_CMD);
+ //lbs_deb_enter(LBS_DEB_CMD);
copy_len = min(le16_to_cpu(buf->size), le16_to_cpu(resp->size));
- lbs_deb_cmd("Copying back %u bytes; command response was %u bytes, "
- "copy back buffer was %u bytes\n", copy_len,
- le16_to_cpu(resp->size), le16_to_cpu(buf->size));
+ //lbs_deb_cmd("copying %u bytes; respsize %u, "
+ // "bufsize %u\n", copy_len,
+ // le16_to_cpu(resp->size), le16_to_cpu(buf->size));
memcpy(buf, resp, copy_len);
- lbs_deb_leave(LBS_DEB_CMD);
+ //lbs_deb_leave(LBS_DEB_CMD);
return 0;
}
EXPORT_SYMBOL_GPL(lbs_cmd_copyback);
Index: wireless-2.6/drivers/net/wireless/libertas/cmdresp.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/cmdresp.c 2008-01-22 14:38:34.000000000 +0100
+++ wireless-2.6/drivers/net/wireless/libertas/cmdresp.c 2008-01-22 16:43:54.000000000 +0100
@@ -509,9 +509,9 @@ int lbs_process_rx_command(struct lbs_pr
respcmd = le16_to_cpu(resp->command);
result = le16_to_cpu(resp->result);
- lbs_deb_host("CMD_RESP: response 0x%04x, seq %d, size %d, jiffies %lu\n",
+ lbs_deb_cmd("CMD_RESP: response 0x%04x, seq %d, size %d, jiffies %lu\n",
respcmd, le16_to_cpu(resp->seqnum), priv->upld_len, jiffies);
- lbs_deb_hex(LBS_DEB_HOST, "CMD_RESP", (void *) resp, priv->upld_len);
+ lbs_deb_hex(LBS_DEB_CMD, "CMD_RESP", (void *) resp, priv->upld_len);
if (resp->seqnum != resp->seqnum) {
lbs_pr_info("Received CMD_RESP with invalid sequence %d (expected %d)\n",
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] libertas: trim overly long debug statement
2008-01-28 16:25 [PATCH] libertas: trim overly long debug statement Holger Schurig
@ 2008-01-28 16:38 ` Dan Williams
2008-01-29 7:28 ` Holger Schurig
2008-01-29 8:14 ` [PATCH, take 2] " Holger Schurig
0 siblings, 2 replies; 5+ messages in thread
From: Dan Williams @ 2008-01-28 16:38 UTC (permalink / raw)
To: Holger Schurig; +Cc: John W. Linville, linux-wireless, libertas-dev
On Mon, 2008-01-28 at 17:25 +0100, Holger Schurig wrote:
> see subject
>
> Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
>
> Index: wireless-2.6/drivers/net/wireless/libertas/cmd.c
> ===================================================================
> --- wireless-2.6.orig/drivers/net/wireless/libertas/cmd.c 2008-01-22 12:47:50.000000000 +0100
> +++ wireless-2.6/drivers/net/wireless/libertas/cmd.c 2008-01-22 16:36:02.000000000 +0100
> @@ -1182,9 +1182,9 @@ static void lbs_submit_command(struct lb
> command == CMD_802_11_AUTHENTICATE)
> timeo = 10 * HZ;
>
> - lbs_deb_host("DNLD_CMD: command 0x%04x, seq %d, size %d, jiffies %lu\n",
> + lbs_deb_cmd("DNLD_CMD: command 0x%04x, seq %d, size %d, jiffies %lu\n",
> command, le16_to_cpu(cmd->seqnum), cmdsize, jiffies);
> - lbs_deb_hex(LBS_DEB_HOST, "DNLD_CMD", (void *) cmdnode->cmdbuf, cmdsize);
> + lbs_deb_hex(LBS_DEB_CMD, "DNLD_CMD", (void *) cmdnode->cmdbuf, cmdsize);
>
> ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) cmd, cmdsize);
>
> @@ -1193,9 +1193,7 @@ static void lbs_submit_command(struct lb
> /* Let the timer kick in and retry, and potentially reset
> the whole thing if the condition persists */
> timeo = HZ;
> - } else
> - lbs_deb_cmd("DNLD_CMD: sent command 0x%04x, jiffies %lu\n",
> - command, jiffies);
> + }
>
> /* Setup the timer after transmit command */
> mod_timer(&priv->command_timer, jiffies + timeo);
> @@ -1214,7 +1212,7 @@ static int lbs_cmd_mac_control(struct lb
> cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mac_control) + S_DS_GEN);
> mac->action = cpu_to_le16(priv->currentpacketfilter);
>
> - lbs_deb_cmd("MAC_CONTROL: action 0x%x, size %d\n",
> + lbs_deb_cmd("MAC_CONTROL: action 0x%04x, size %d\n",
> le16_to_cpu(mac->action), le16_to_cpu(cmd->size));
>
> lbs_deb_leave(LBS_DEB_CMD);
> @@ -2068,15 +2066,15 @@ int lbs_cmd_copyback(struct lbs_private
> struct cmd_header *buf = (void *)extra;
> uint16_t copy_len;
>
> - lbs_deb_enter(LBS_DEB_CMD);
> + //lbs_deb_enter(LBS_DEB_CMD);
>
> copy_len = min(le16_to_cpu(buf->size), le16_to_cpu(resp->size));
> - lbs_deb_cmd("Copying back %u bytes; command response was %u bytes, "
> - "copy back buffer was %u bytes\n", copy_len,
> - le16_to_cpu(resp->size), le16_to_cpu(buf->size));
> + //lbs_deb_cmd("copying %u bytes; respsize %u, "
> + // "bufsize %u\n", copy_len,
> + // le16_to_cpu(resp->size), le16_to_cpu(buf->size));
> memcpy(buf, resp, copy_len);
>
> - lbs_deb_leave(LBS_DEB_CMD);
> + //lbs_deb_leave(LBS_DEB_CMD);
> return 0;
> }
If you want to kill them, let's remove them. // also doesn't conform to
the kernel style. I'd say just take the debug bits out for now.
Dan
> EXPORT_SYMBOL_GPL(lbs_cmd_copyback);
> Index: wireless-2.6/drivers/net/wireless/libertas/cmdresp.c
> ===================================================================
> --- wireless-2.6.orig/drivers/net/wireless/libertas/cmdresp.c 2008-01-22 14:38:34.000000000 +0100
> +++ wireless-2.6/drivers/net/wireless/libertas/cmdresp.c 2008-01-22 16:43:54.000000000 +0100
> @@ -509,9 +509,9 @@ int lbs_process_rx_command(struct lbs_pr
> respcmd = le16_to_cpu(resp->command);
> result = le16_to_cpu(resp->result);
>
> - lbs_deb_host("CMD_RESP: response 0x%04x, seq %d, size %d, jiffies %lu\n",
> + lbs_deb_cmd("CMD_RESP: response 0x%04x, seq %d, size %d, jiffies %lu\n",
> respcmd, le16_to_cpu(resp->seqnum), priv->upld_len, jiffies);
> - lbs_deb_hex(LBS_DEB_HOST, "CMD_RESP", (void *) resp, priv->upld_len);
> + lbs_deb_hex(LBS_DEB_CMD, "CMD_RESP", (void *) resp, priv->upld_len);
>
> if (resp->seqnum != resp->seqnum) {
> lbs_pr_info("Received CMD_RESP with invalid sequence %d (expected %d)\n",
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] libertas: trim overly long debug statement
2008-01-28 16:38 ` Dan Williams
@ 2008-01-29 7:28 ` Holger Schurig
2008-01-29 8:14 ` [PATCH, take 2] " Holger Schurig
1 sibling, 0 replies; 5+ messages in thread
From: Holger Schurig @ 2008-01-29 7:28 UTC (permalink / raw)
To: Dan Williams; +Cc: John W. Linville, linux-wireless, libertas-dev
> If you want to kill them, let's remove them. // also doesn't
> conform to the kernel style. I'd say just take the debug bits
> out for now.
Yeah. This "//"-style happens when one becomes too confident and
don't use checkpatch.pl.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH, take 2] libertas: trim overly long debug statement
2008-01-28 16:38 ` Dan Williams
2008-01-29 7:28 ` Holger Schurig
@ 2008-01-29 8:14 ` Holger Schurig
2008-01-29 13:33 ` Dan Williams
1 sibling, 1 reply; 5+ messages in thread
From: Holger Schurig @ 2008-01-29 8:14 UTC (permalink / raw)
To: linux-wireless; +Cc: Dan Williams, John W. Linville, libertas-dev
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
---
This time even checkpatch.pl clean. :-)
Index: wireless-2.6/drivers/net/wireless/libertas/cmd.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/cmd.c 2008-01-29 10:11:33.000000000 +0100
+++ wireless-2.6/drivers/net/wireless/libertas/cmd.c 2008-01-29 10:11:59.000000000 +0100
@@ -1182,9 +1182,9 @@ static void lbs_submit_command(struct lb
command == CMD_802_11_AUTHENTICATE)
timeo = 10 * HZ;
- lbs_deb_host("DNLD_CMD: command 0x%04x, seq %d, size %d, jiffies %lu\n",
+ lbs_deb_cmd("DNLD_CMD: command 0x%04x, seq %d, size %d, jiffies %lu\n",
command, le16_to_cpu(cmd->seqnum), cmdsize, jiffies);
- lbs_deb_hex(LBS_DEB_HOST, "DNLD_CMD", (void *) cmdnode->cmdbuf, cmdsize);
+ lbs_deb_hex(LBS_DEB_CMD, "DNLD_CMD", (void *) cmdnode->cmdbuf, cmdsize);
ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) cmd, cmdsize);
@@ -1193,9 +1193,7 @@ static void lbs_submit_command(struct lb
/* Let the timer kick in and retry, and potentially reset
the whole thing if the condition persists */
timeo = HZ;
- } else
- lbs_deb_cmd("DNLD_CMD: sent command 0x%04x, jiffies %lu\n",
- command, jiffies);
+ }
/* Setup the timer after transmit command */
mod_timer(&priv->command_timer, jiffies + timeo);
@@ -1214,7 +1212,7 @@ static int lbs_cmd_mac_control(struct lb
cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mac_control) + S_DS_GEN);
mac->action = cpu_to_le16(priv->currentpacketfilter);
- lbs_deb_cmd("MAC_CONTROL: action 0x%x, size %d\n",
+ lbs_deb_cmd("MAC_CONTROL: action 0x%04x, size %d\n",
le16_to_cpu(mac->action), le16_to_cpu(cmd->size));
lbs_deb_leave(LBS_DEB_CMD);
@@ -1766,9 +1764,9 @@ int lbs_execute_next_command(struct lbs_
unsigned long flags;
int ret = 0;
- // Debug group is LBS_DEB_THREAD and not LBS_DEB_HOST, because the
- // only caller to us is lbs_thread() and we get even when a
- // data packet is received
+ /* Debug group is LBS_DEB_THREAD and not LBS_DEB_HOST, because the
+ * only caller to us is lbs_thread() and we get even when a
+ * data packet is received */
lbs_deb_enter(LBS_DEB_THREAD);
spin_lock_irqsave(&priv->driver_lock, flags);
@@ -2068,15 +2066,8 @@ int lbs_cmd_copyback(struct lbs_private
struct cmd_header *buf = (void *)extra;
uint16_t copy_len;
- lbs_deb_enter(LBS_DEB_CMD);
-
copy_len = min(le16_to_cpu(buf->size), le16_to_cpu(resp->size));
- lbs_deb_cmd("Copying back %u bytes; command response was %u bytes, "
- "copy back buffer was %u bytes\n", copy_len,
- le16_to_cpu(resp->size), le16_to_cpu(buf->size));
memcpy(buf, resp, copy_len);
-
- lbs_deb_leave(LBS_DEB_CMD);
return 0;
}
EXPORT_SYMBOL_GPL(lbs_cmd_copyback);
Index: wireless-2.6/drivers/net/wireless/libertas/cmdresp.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/libertas/cmdresp.c 2008-01-29 10:11:33.000000000 +0100
+++ wireless-2.6/drivers/net/wireless/libertas/cmdresp.c 2008-01-29 10:11:33.000000000 +0100
@@ -509,9 +509,9 @@ int lbs_process_rx_command(struct lbs_pr
respcmd = le16_to_cpu(resp->command);
result = le16_to_cpu(resp->result);
- lbs_deb_host("CMD_RESP: response 0x%04x, seq %d, size %d, jiffies %lu\n",
+ lbs_deb_cmd("CMD_RESP: response 0x%04x, seq %d, size %d, jiffies %lu\n",
respcmd, le16_to_cpu(resp->seqnum), priv->upld_len, jiffies);
- lbs_deb_hex(LBS_DEB_HOST, "CMD_RESP", (void *) resp, priv->upld_len);
+ lbs_deb_hex(LBS_DEB_CMD, "CMD_RESP", (void *) resp, priv->upld_len);
if (resp->seqnum != resp->seqnum) {
lbs_pr_info("Received CMD_RESP with invalid sequence %d (expected %d)\n",
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH, take 2] libertas: trim overly long debug statement
2008-01-29 8:14 ` [PATCH, take 2] " Holger Schurig
@ 2008-01-29 13:33 ` Dan Williams
0 siblings, 0 replies; 5+ messages in thread
From: Dan Williams @ 2008-01-29 13:33 UTC (permalink / raw)
To: Holger Schurig; +Cc: linux-wireless, John W. Linville, libertas-dev
On Tue, 2008-01-29 at 09:14 +0100, Holger Schurig wrote:
> Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
> ---
>
> This time even checkpatch.pl clean. :-)
>
> Index: wireless-2.6/drivers/net/wireless/libertas/cmd.c
> ===================================================================
> --- wireless-2.6.orig/drivers/net/wireless/libertas/cmd.c 2008-01-29 10:11:33.000000000 +0100
> +++ wireless-2.6/drivers/net/wireless/libertas/cmd.c 2008-01-29 10:11:59.000000000 +0100
> @@ -1182,9 +1182,9 @@ static void lbs_submit_command(struct lb
> command == CMD_802_11_AUTHENTICATE)
> timeo = 10 * HZ;
>
> - lbs_deb_host("DNLD_CMD: command 0x%04x, seq %d, size %d, jiffies %lu\n",
> + lbs_deb_cmd("DNLD_CMD: command 0x%04x, seq %d, size %d, jiffies %lu\n",
> command, le16_to_cpu(cmd->seqnum), cmdsize, jiffies);
> - lbs_deb_hex(LBS_DEB_HOST, "DNLD_CMD", (void *) cmdnode->cmdbuf, cmdsize);
> + lbs_deb_hex(LBS_DEB_CMD, "DNLD_CMD", (void *) cmdnode->cmdbuf, cmdsize);
>
> ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) cmd, cmdsize);
>
> @@ -1193,9 +1193,7 @@ static void lbs_submit_command(struct lb
> /* Let the timer kick in and retry, and potentially reset
> the whole thing if the condition persists */
> timeo = HZ;
> - } else
> - lbs_deb_cmd("DNLD_CMD: sent command 0x%04x, jiffies %lu\n",
> - command, jiffies);
> + }
>
> /* Setup the timer after transmit command */
> mod_timer(&priv->command_timer, jiffies + timeo);
> @@ -1214,7 +1212,7 @@ static int lbs_cmd_mac_control(struct lb
> cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mac_control) + S_DS_GEN);
> mac->action = cpu_to_le16(priv->currentpacketfilter);
>
> - lbs_deb_cmd("MAC_CONTROL: action 0x%x, size %d\n",
> + lbs_deb_cmd("MAC_CONTROL: action 0x%04x, size %d\n",
> le16_to_cpu(mac->action), le16_to_cpu(cmd->size));
>
> lbs_deb_leave(LBS_DEB_CMD);
> @@ -1766,9 +1764,9 @@ int lbs_execute_next_command(struct lbs_
> unsigned long flags;
> int ret = 0;
>
> - // Debug group is LBS_DEB_THREAD and not LBS_DEB_HOST, because the
> - // only caller to us is lbs_thread() and we get even when a
> - // data packet is received
> + /* Debug group is LBS_DEB_THREAD and not LBS_DEB_HOST, because the
> + * only caller to us is lbs_thread() and we get even when a
> + * data packet is received */
> lbs_deb_enter(LBS_DEB_THREAD);
>
> spin_lock_irqsave(&priv->driver_lock, flags);
> @@ -2068,15 +2066,8 @@ int lbs_cmd_copyback(struct lbs_private
> struct cmd_header *buf = (void *)extra;
> uint16_t copy_len;
>
> - lbs_deb_enter(LBS_DEB_CMD);
> -
> copy_len = min(le16_to_cpu(buf->size), le16_to_cpu(resp->size));
> - lbs_deb_cmd("Copying back %u bytes; command response was %u bytes, "
> - "copy back buffer was %u bytes\n", copy_len,
> - le16_to_cpu(resp->size), le16_to_cpu(buf->size));
> memcpy(buf, resp, copy_len);
> -
> - lbs_deb_leave(LBS_DEB_CMD);
> return 0;
> }
> EXPORT_SYMBOL_GPL(lbs_cmd_copyback);
> Index: wireless-2.6/drivers/net/wireless/libertas/cmdresp.c
> ===================================================================
> --- wireless-2.6.orig/drivers/net/wireless/libertas/cmdresp.c 2008-01-29 10:11:33.000000000 +0100
> +++ wireless-2.6/drivers/net/wireless/libertas/cmdresp.c 2008-01-29 10:11:33.000000000 +0100
> @@ -509,9 +509,9 @@ int lbs_process_rx_command(struct lbs_pr
> respcmd = le16_to_cpu(resp->command);
> result = le16_to_cpu(resp->result);
>
> - lbs_deb_host("CMD_RESP: response 0x%04x, seq %d, size %d, jiffies %lu\n",
> + lbs_deb_cmd("CMD_RESP: response 0x%04x, seq %d, size %d, jiffies %lu\n",
> respcmd, le16_to_cpu(resp->seqnum), priv->upld_len, jiffies);
> - lbs_deb_hex(LBS_DEB_HOST, "CMD_RESP", (void *) resp, priv->upld_len);
> + lbs_deb_hex(LBS_DEB_CMD, "CMD_RESP", (void *) resp, priv->upld_len);
>
> if (resp->seqnum != resp->seqnum) {
> lbs_pr_info("Received CMD_RESP with invalid sequence %d (expected %d)\n",
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-01-29 13:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-28 16:25 [PATCH] libertas: trim overly long debug statement Holger Schurig
2008-01-28 16:38 ` Dan Williams
2008-01-29 7:28 ` Holger Schurig
2008-01-29 8:14 ` [PATCH, take 2] " Holger Schurig
2008-01-29 13:33 ` Dan Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).