summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/cmdevt.c
diff options
context:
space:
mode:
authorBing Zhao <bzhao@marvell.com>2012-10-05 13:57:48 -0700
committerJohn W. Linville <linville@tuxdriver.com>2012-10-19 15:53:16 -0400
commitf575f65897e84018ee7163407ca5514272e11223 (patch)
tree54f6a74a57bc7c44dcdf7f388d8e91981d2ad848 /drivers/net/wireless/mwifiex/cmdevt.c
parent7a66205a218c4b22ced8b3326ab925136b160b01 (diff)
downloadop-kernel-dev-f575f65897e84018ee7163407ca5514272e11223.zip
op-kernel-dev-f575f65897e84018ee7163407ca5514272e11223.tar.gz
mwifiex: use sizeof(array) to print_hex_dump_bytes
DBG_CMD_NUM is the number of commands, not the actual bytes of data for printing. Also remove the duplicated DBG_CMD_NUM definition. Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/cmdevt.c')
-rw-r--r--drivers/net/wireless/mwifiex/cmdevt.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c
index 8d46510..6627f9c 100644
--- a/drivers/net/wireless/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/mwifiex/cmdevt.c
@@ -918,20 +918,23 @@ mwifiex_cmd_timeout_func(unsigned long function_context)
dev_err(adapter->dev, "last_cmd_index = %d\n",
adapter->dbg.last_cmd_index);
print_hex_dump_bytes("last_cmd_id: ", DUMP_PREFIX_OFFSET,
- adapter->dbg.last_cmd_id, DBG_CMD_NUM);
+ adapter->dbg.last_cmd_id,
+ sizeof(adapter->dbg.last_cmd_id));
print_hex_dump_bytes("last_cmd_act: ", DUMP_PREFIX_OFFSET,
- adapter->dbg.last_cmd_act, DBG_CMD_NUM);
+ adapter->dbg.last_cmd_act,
+ sizeof(adapter->dbg.last_cmd_act));
dev_err(adapter->dev, "last_cmd_resp_index = %d\n",
adapter->dbg.last_cmd_resp_index);
print_hex_dump_bytes("last_cmd_resp_id: ", DUMP_PREFIX_OFFSET,
adapter->dbg.last_cmd_resp_id,
- DBG_CMD_NUM);
+ sizeof(adapter->dbg.last_cmd_resp_id));
dev_err(adapter->dev, "last_event_index = %d\n",
adapter->dbg.last_event_index);
print_hex_dump_bytes("last_event: ", DUMP_PREFIX_OFFSET,
- adapter->dbg.last_event, DBG_CMD_NUM);
+ adapter->dbg.last_event,
+ sizeof(adapter->dbg.last_event));
dev_err(adapter->dev, "data_sent=%d cmd_sent=%d\n",
adapter->data_sent, adapter->cmd_sent);
OpenPOWER on IntegriCloud