Remove cast on void pointers. C programming language guarantees
the conversion from void pointer to any other pointer type.
Coccinelle patch:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T *)x)->f
|
- (T *)
e
)
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- priv = (struct wilc_priv *)user_void;
wiphy = priv->dev->ieee80211_ptr->wiphy;
for (i = 0; i < last_scanned_cnt; i++) {
wiphy = priv->dev->ieee80211_ptr->wiphy;
for (i = 0; i < last_scanned_cnt; i++) {
struct ieee80211_channel *channel;
struct cfg80211_bss *bss = NULL;
struct ieee80211_channel *channel;
struct cfg80211_bss *bss = NULL;
- priv = (struct wilc_priv *)user_void;
if (priv->bCfgScanning) {
if (scan_event == SCAN_EVENT_NETWORK_FOUND) {
wiphy = priv->dev->ieee80211_ptr->wiphy;
if (priv->bCfgScanning) {
if (scan_event == SCAN_EVENT_NETWORK_FOUND) {
wiphy = priv->dev->ieee80211_ptr->wiphy;
- priv = (struct wilc_priv *)pUserVoid;
dev = priv->dev;
vif = netdev_priv(dev);
wl = vif->wilc;
dev = priv->dev;
vif = netdev_priv(dev);
wl = vif->wilc;
static void WILC_WFI_mgmt_tx_complete(void *priv, int status)
{
static void WILC_WFI_mgmt_tx_complete(void *priv, int status)
{
- struct p2p_mgmt_data *pv_data = (struct p2p_mgmt_data *)priv;
+ struct p2p_mgmt_data *pv_data = priv;
{
struct wilc_priv *priv;
{
struct wilc_priv *priv;
- priv = (struct wilc_priv *)pUserVoid;
priv->bInP2PlistenState = true;
priv->bInP2PlistenState = true;
{
struct wilc_priv *priv;
{
struct wilc_priv *priv;
- priv = (struct wilc_priv *)pUserVoid;
if (u32SessionID == priv->strRemainOnChanParams.u32ListenSessionID) {
priv->bInP2PlistenState = false;
if (u32SessionID == priv->strRemainOnChanParams.u32ListenSessionID) {
priv->bInP2PlistenState = false;