Thread (24 messages) flat view 24 messages, 13 authors, 2011-06-16

RE: [PATCH net-next 1/2] wireless: Remove casts of void *

From: Bing Zhao <hidden>
Date: 2011-06-14 08:46:05
Also in: linux-wireless, lkml

quoted
diff --git a/drivers/net/wireless/mwifiex/11n.c b/drivers/net/wireless/mwifiex/11n.c
@@ -191,7 +191,7 @@ int mwifiex_ret_11n_cfg(struct host_cmd_ds_command *resp, void *data_buf)
       struct host_cmd_ds_11n_cfg *htcfg = &resp->params.htcfg;

       if (data_buf) {
-               tx_cfg = (struct mwifiex_ds_11n_tx_cfg *) data_buf;
+               tx_cfg = data_buf;
I think pretty useless.  tx_cfg is a struct mwifiex_ds_11n_tx_cfg *.
True, but IMHO, this documents, particularly in a random snippet like
this, what's going on. Arguably though, a better fix would be to move
the cast to the place where this function is called.
Hi Julian,

Thanks for your comment. We will work on this.

Regards,
Bing
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help