On Thu, Oct 09, 2014 at 12:17:06AM +1100, Vladimir A. Nazarenko wrote: > 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 Is this defined by the build system? If not, just delete all the code in the driver that is #ifdef by it please. If it is enabled, then I think you just changed the logic of the code here :( thanks, greg k-h _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel