Re: [PATCH] Staging: ks7010: ks_wlan_ioctl.h: Fix coding style error

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

 



On Sun, Mar 12, 2017 at 06:32:27PM +0530, Manoj Sawai wrote:
> Fixes a checkpatch error which occurs on almost every line.
> 
> "ERROR: Macros with complex values should be enclosed in parentheses"
> 
> Couple of other warnings about using spaces instead of tab are also
> fixed since they are in the same line as the error.
> 
> Signed-off-by: Manoj Sawai <mas@xxxxxxxxxxxx>
> ---
>  drivers/staging/ks7010/ks_wlan_ioctl.h | 52 +++++++++++++++++-----------------
>  1 file changed, 26 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h b/drivers/staging/ks7010/ks_wlan_ioctl.h
> index 8e62b10effd6..5eea324a2bdc 100644
> --- a/drivers/staging/ks7010/ks_wlan_ioctl.h
> +++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
> @@ -1,6 +1,6 @@
>  /*
>   *   Driver for KeyStream 11b/g wireless LAN
> - *   
> + *

Why did you change this line?

>   *   Copyright (c) 2005-2008 KeyStream Corp.
>   *   Copyright (C) 2009 Renesas Technology Corp.
>   *
> @@ -18,38 +18,38 @@
>  /*					SIOCIWFIRSTPRIV + 0 */
>  /* former KS_WLAN_GET_DRIVER_VERSION	SIOCIWFIRSTPRIV + 1 */
>  /*					SIOCIWFIRSTPRIV + 2 */
> -#define KS_WLAN_GET_FIRM_VERSION	SIOCIWFIRSTPRIV + 3
> +#define KS_WLAN_GET_FIRM_VERSION	(SIOCIWFIRSTPRIV + 3)

Is that really a complex macro?

Why not also change the commented out ones?

>  #ifdef WPS
> -#define KS_WLAN_SET_WPS_ENABLE 		SIOCIWFIRSTPRIV + 4
> -#define KS_WLAN_GET_WPS_ENABLE 		SIOCIWFIRSTPRIV + 5
> -#define KS_WLAN_SET_WPS_PROBE_REQ	SIOCIWFIRSTPRIV + 6
> +#define KS_WLAN_SET_WPS_ENABLE		(SIOCIWFIRSTPRIV + 4)
> +#define KS_WLAN_GET_WPS_ENABLE		(SIOCIWFIRSTPRIV + 5)
> +#define KS_WLAN_SET_WPS_PROBE_REQ	(SIOCIWFIRSTPRIV + 6)
>  #endif
> -#define KS_WLAN_GET_EEPROM_CKSUM	SIOCIWFIRSTPRIV + 7
> -#define KS_WLAN_SET_PREAMBLE		SIOCIWFIRSTPRIV + 8
> -#define KS_WLAN_GET_PREAMBLE		SIOCIWFIRSTPRIV + 9
> -#define KS_WLAN_SET_POWER_SAVE		SIOCIWFIRSTPRIV + 10
> -#define KS_WLAN_GET_POWER_SAVE		SIOCIWFIRSTPRIV + 11
> -#define KS_WLAN_SET_SCAN_TYPE		SIOCIWFIRSTPRIV + 12
> -#define KS_WLAN_GET_SCAN_TYPE		SIOCIWFIRSTPRIV + 13
> -#define KS_WLAN_SET_RX_GAIN		SIOCIWFIRSTPRIV + 14
> -#define KS_WLAN_GET_RX_GAIN		SIOCIWFIRSTPRIV + 15
> -#define KS_WLAN_HOSTT			SIOCIWFIRSTPRIV + 16	/* unused */
> +#define KS_WLAN_GET_EEPROM_CKSUM	(SIOCIWFIRSTPRIV + 7)
> +#define KS_WLAN_SET_PREAMBLE		(SIOCIWFIRSTPRIV + 8)
> +#define KS_WLAN_GET_PREAMBLE		(SIOCIWFIRSTPRIV + 9)
> +#define KS_WLAN_SET_POWER_SAVE		(SIOCIWFIRSTPRIV + 10)
> +#define KS_WLAN_GET_POWER_SAVE		(SIOCIWFIRSTPRIV + 11)
> +#define KS_WLAN_SET_SCAN_TYPE		(SIOCIWFIRSTPRIV + 12)
> +#define KS_WLAN_GET_SCAN_TYPE		(SIOCIWFIRSTPRIV + 13)
> +#define KS_WLAN_SET_RX_GAIN		(SIOCIWFIRSTPRIV + 14)
> +#define KS_WLAN_GET_RX_GAIN		(SIOCIWFIRSTPRIV + 15)
> +#define KS_WLAN_HOSTT			(SIOCIWFIRSTPRIV + 16)	/* unused */
>  //#define KS_WLAN_SET_REGION            SIOCIWFIRSTPRIV + 17
> -#define KS_WLAN_SET_BEACON_LOST		SIOCIWFIRSTPRIV + 18
> -#define KS_WLAN_GET_BEACON_LOST		SIOCIWFIRSTPRIV + 19
> +#define KS_WLAN_SET_BEACON_LOST		(SIOCIWFIRSTPRIV + 18)
> +#define KS_WLAN_GET_BEACON_LOST		(SIOCIWFIRSTPRIV + 19)
>  
> -#define KS_WLAN_SET_TX_GAIN		SIOCIWFIRSTPRIV + 20
> -#define KS_WLAN_GET_TX_GAIN		SIOCIWFIRSTPRIV + 21
> +#define KS_WLAN_SET_TX_GAIN		(SIOCIWFIRSTPRIV + 20)
> +#define KS_WLAN_GET_TX_GAIN		(SIOCIWFIRSTPRIV + 21)
>  
>  /* for KS7010 */
> -#define KS_WLAN_SET_PHY_TYPE		SIOCIWFIRSTPRIV + 22
> -#define KS_WLAN_GET_PHY_TYPE		SIOCIWFIRSTPRIV + 23
> -#define KS_WLAN_SET_CTS_MODE		SIOCIWFIRSTPRIV + 24
> -#define KS_WLAN_GET_CTS_MODE		SIOCIWFIRSTPRIV + 25
> +#define KS_WLAN_SET_PHY_TYPE		(SIOCIWFIRSTPRIV + 22)
> +#define KS_WLAN_GET_PHY_TYPE		(SIOCIWFIRSTPRIV + 23)
> +#define KS_WLAN_SET_CTS_MODE		(SIOCIWFIRSTPRIV + 24)
> +#define KS_WLAN_GET_CTS_MODE		(SIOCIWFIRSTPRIV + 25)
>  /*					SIOCIWFIRSTPRIV + 26 */
>  /*					SIOCIWFIRSTPRIV + 27 */
> -#define KS_WLAN_SET_SLEEP_MODE		SIOCIWFIRSTPRIV + 28	/* sleep mode */
> -#define KS_WLAN_GET_SLEEP_MODE		SIOCIWFIRSTPRIV + 29	/* sleep mode */
> +#define KS_WLAN_SET_SLEEP_MODE		(SIOCIWFIRSTPRIV + 28)	/* sleep mode */
> +#define KS_WLAN_GET_SLEEP_MODE		(SIOCIWFIRSTPRIV + 29)	/* sleep mode */
>  /*					SIOCIWFIRSTPRIV + 30 */
>  /*					SIOCIWFIRSTPRIV + 31 */
>  
> @@ -60,7 +60,7 @@
>  
>  int ks_wlan_read_config_file(struct ks_wlan_private *priv);
>  int ks_wlan_setup_parameter(struct ks_wlan_private *priv,
> -		             unsigned int commit_flag);
> +			    unsigned int commit_flag);

What is this change for?

Please only do one type of thing at a time.

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-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