Commit 50d94eac authored by Ding-Chi Wang's avatar Ding-Chi Wang Committed by Greg Kroah-Hartman

staging: rtl8712: checkpatch: Avoid multiple line dereferences

"WARNING: Avoid multiple line dereference - prefer 'poid_par_priv->information_buf_len'"
"WARNING: Avoid multiple line dereference - prefer 'padapter->registrypriv.dev_network.Configuration'"
"WARNING: Avoid multiple line dereference - prefer 'Adapter->mppriv.workparam.io_value'"
Signed-off-by: default avatarDing-Chi Wang <dcwang.tw@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 217d31c4
...@@ -282,8 +282,7 @@ uint oid_rt_get_total_rx_bytes_hdl(struct oid_par_priv ...@@ -282,8 +282,7 @@ uint oid_rt_get_total_rx_bytes_hdl(struct oid_par_priv
if (poid_par_priv->information_buf_len >= sizeof(u32)) { if (poid_par_priv->information_buf_len >= sizeof(u32)) {
*(u32 *)poid_par_priv->information_buf = *(u32 *)poid_par_priv->information_buf =
padapter->recvpriv.rx_bytes; padapter->recvpriv.rx_bytes;
*poid_par_priv->bytes_rw = poid_par_priv-> *poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
information_buf_len;
} else { } else {
return RNDIS_STATUS_INVALID_LENGTH; return RNDIS_STATUS_INVALID_LENGTH;
} }
...@@ -325,8 +324,7 @@ uint oid_rt_get_channel_hdl(struct oid_par_priv *poid_par_priv) ...@@ -325,8 +324,7 @@ uint oid_rt_get_channel_hdl(struct oid_par_priv *poid_par_priv)
check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))
pnic_Config = &pmlmepriv->cur_network.network.Configuration; pnic_Config = &pmlmepriv->cur_network.network.Configuration;
else else
pnic_Config = &padapter->registrypriv.dev_network. pnic_Config = &padapter->registrypriv.dev_network.Configuration;
Configuration;
channelnum = pnic_Config->DSConfig; channelnum = pnic_Config->DSConfig;
*(u32 *)poid_par_priv->information_buf = channelnum; *(u32 *)poid_par_priv->information_buf = channelnum;
*poid_par_priv->bytes_rw = poid_par_priv->information_buf_len; *poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
...@@ -483,8 +481,8 @@ uint oid_rt_pro_rf_read_registry_hdl(struct oid_par_priv *poid_par_priv) ...@@ -483,8 +481,8 @@ uint oid_rt_pro_rf_read_registry_hdl(struct oid_par_priv *poid_par_priv)
*/ */
if (!r8712_getrfreg_cmd(Adapter, if (!r8712_getrfreg_cmd(Adapter,
*(unsigned char *)poid_par_priv->information_buf, *(unsigned char *)poid_par_priv->information_buf,
(unsigned char *)&Adapter->mppriv.workparam. (unsigned char *)&Adapter->mppriv.workparam.io_value
io_value)) ))
status = RNDIS_STATUS_NOT_ACCEPTED; status = RNDIS_STATUS_NOT_ACCEPTED;
} }
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment