summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/sta_event.c
diff options
context:
space:
mode:
authorBing Zhao <bzhao@marvell.com>2012-08-07 16:08:08 -0700
committerJohn W. Linville <linville@tuxdriver.com>2012-08-10 15:26:59 -0400
commit8dd4372e2a462081b92b38af18accb427fa2d554 (patch)
treeaa6339f353458d0a26e467cf43e2a53ebd45fd75 /drivers/net/wireless/mwifiex/sta_event.c
parent450e9038ee65e3246b2a942669fc79001466f9be (diff)
downloadtalos-obmc-linux-8dd4372e2a462081b92b38af18accb427fa2d554.tar.gz
talos-obmc-linux-8dd4372e2a462081b92b38af18accb427fa2d554.zip
mwifiex: fix powerpc64-linux- compilation warnings
These warnings can be detected by using powerpc64-linux toolchain (gcc-4.6.3-nolibc). CC [M] drivers/net/wireless/mwifiex/sta_event.o drivers/net/wireless/mwifiex/sta_event.c: In function 'mwifiex_process_sta_event': drivers/net/wireless/mwifiex/sta_event.c:388:4: warning: comparison of distinct pointer types lacks a cast [enabled by default] CC [M] drivers/net/wireless/mwifiex/uap_event.o drivers/net/wireless/mwifiex/uap_event.c: In function 'mwifiex_process_uap_event': drivers/net/wireless/mwifiex/uap_event.c:258:11: warning: comparison of distinct pointer types lacks a cast [enabled by default] Use min_t() instead of min() to fix the warnings. Reported-by: Fengguang Wu <fengguang.wu@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/sta_event.c')
-rw-r--r--drivers/net/wireless/mwifiex/sta_event.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_event.c b/drivers/net/wireless/mwifiex/sta_event.c
index 2aad148db5c3..4758d3064887 100644
--- a/drivers/net/wireless/mwifiex/sta_event.c
+++ b/drivers/net/wireless/mwifiex/sta_event.c
@@ -186,6 +186,7 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)
struct mwifiex_adapter *adapter = priv->adapter;
int ret = 0;
u32 eventcause = adapter->event_cause;
+ u16 ctrl;
switch (eventcause) {
case EVENT_DUMMY_HOST_WAKEUP_SIGNAL:
@@ -382,11 +383,11 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)
adapter->event_body);
break;
case EVENT_AMSDU_AGGR_CTRL:
- dev_dbg(adapter->dev, "event: AMSDU_AGGR_CTRL %d\n",
- *(u16 *) adapter->event_body);
+ ctrl = le16_to_cpu(*(__le16 *)adapter->event_body);
+ dev_dbg(adapter->dev, "event: AMSDU_AGGR_CTRL %d\n", ctrl);
+
adapter->tx_buf_size =
- min(adapter->curr_tx_buf_size,
- le16_to_cpu(*(__le16 *) adapter->event_body));
+ min_t(u16, adapter->curr_tx_buf_size, ctrl);
dev_dbg(adapter->dev, "event: tx_buf_size %d\n",
adapter->tx_buf_size);
break;
OpenPOWER on IntegriCloud