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

From: Bing Zhao
Date: Tue Jun 14 2011 - 04:46:07 EST


>> 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--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/