This patch fixes the following sparse warning: drivers/staging/vt6655/ioctl.c:44:12: warning: symbol 'wpa_Result' was not declared. Should it be static? There is no sense to set up all fields of wpa_Result to zero when interface set up (in device_open()), because wpa_Result is used only in code for ioctl 0xff and first lines of this ioctl do the same work. So this patch deletes part of unneeded code (initialization of wpa_Result to zero in device_open()) and declares wpa_Reslult as static to avoid sparse warning. Signed-off-by: Vladimir A. Nazarenko <naszar@xxxxx> --- drivers/staging/vt6655/device_main.c | 8 -------- drivers/staging/vt6655/ioctl.c | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 54e16f4..de5378e 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -1553,9 +1553,6 @@ static int device_open(struct net_device *dev) { struct vnt_private *pDevice = netdev_priv(dev); int i; -#ifdef WPA_SM_Transtatus - extern SWPAResult wpa_Result; -#endif pDevice->rx_buf_sz = PKT_BUF_SZ; if (!device_init_rings(pDevice)) @@ -1567,11 +1564,6 @@ static int device_open(struct net_device *dev) return i; #ifdef WPA_SM_Transtatus - memset(wpa_Result.ifname, 0, sizeof(wpa_Result.ifname)); - wpa_Result.proto = 0; - wpa_Result.key_mgmt = 0; - wpa_Result.eap_type = 0; - wpa_Result.authenticated = false; pDevice->fWPA_Authened = false; #endif pr_debug("call device init rd0 ring\n"); diff --git a/drivers/staging/vt6655/ioctl.c b/drivers/staging/vt6655/ioctl.c index 970e80d..0e36f34 100644 --- a/drivers/staging/vt6655/ioctl.c +++ b/drivers/staging/vt6655/ioctl.c @@ -39,7 +39,7 @@ #include "rf.h" #ifdef WPA_SM_Transtatus -SWPAResult wpa_Result; +static SWPAResult wpa_Result; #endif int private_ioctl(struct vnt_private *pDevice, struct ifreq *rq) -- 2.1.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel