Re: [PATCH 2/2] staging: vt6656: Remove useless function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 20, 2011 at 01:07:27AM +0000, Marcos Paulo de Souza wrote:
>  /*
>   * Wireless Handler : get protocol name
>   */
> @@ -1936,7 +1921,6 @@ int iwctl_siwmlme(struct net_device *dev,
>  /*
>  static const iw_handler		iwctl_handler[] =
>  {
> -	(iw_handler) iwctl_commit,      // SIOCSIWCOMMIT

Nope.  This doesn't work.  It moves everything in the array to the
wrong position.  It should be replaced with NULL or better yet, the
whole array should be rewritten with like:

static const iw_handler iwctl_handler[] = {
	[SIOCGIWNAME]  = (iw_handler) iwctl_giwname,
	[SIOCGIWRANGE] = (iw_handler) iwctl_giwrange,
	...

The NULLs could be left out then.

>  	(iw_handler) iwctl_giwname,     // SIOCGIWNAME
>  	(iw_handler) NULL,				// SIOCSIWNWID
>  	(iw_handler) NULL,				// SIOCGIWNWID
> @@ -1998,7 +1982,7 @@ static const iw_handler		iwctl_handler[] =
>  
>  static const iw_handler		iwctl_handler[] =
>  {
> -	(iw_handler) iwctl_commit,      // SIOCSIWCOMMIT
> +	(iw_handler) 0,      /* SIOCSIWCOMMIT */

This should be NULL not zero because it's a pointer.  (Style issue,
not a bug).

regards,
dan carpenter

Attachment: signature.asc
Description: Digital signature

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux