Re: [PATCH 1/4] rtl8192u: remove space between function name and '(' in r8192U_core.c

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

 



On Thu, May 23, 2013 at 05:14:46AM +0300, Xenia Ragiadakou wrote:
> This patch fixes the following checkpatch warning:
> WARNING: space prohibited between function name and
> open parenthesis '('
> 
> Signed-off-by: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
> ---
>  drivers/staging/rtl8192u/r8192U_core.c |   10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> index 21905a3..b8eee94 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -25,8 +25,8 @@
>   */
>  
>  #ifndef CONFIG_FORCE_HARD_FLOAT
> -double __floatsidf (int i) { return i; }
> -unsigned int __fixunsdfsi (double d) { return d; }
> +double __floatsidf(int i) { return i; }
> +unsigned int __fixunsdfsi(double d) { return d; }
>  double __adddf3(double a, double b) { return a+b; }
>  double __addsf3(float a, float b) { return a+b; }
>  double __subdf3(double a, double b) { return a-b; }
> @@ -917,7 +917,7 @@ void rtl8192_set_rxconf(struct net_device *dev)
>  	rxconf = rxconf | RCR_AM;
>  	//rxconf = rxconf | RCR_ACF;
>  
> -	if (dev->flags & IFF_PROMISC) {DMESG ("NIC in promisc mode"); }
> +	if (dev->flags & IFF_PROMISC) {DMESG("NIC in promisc mode"); }

This should look like:

	if (dev->flags & IFF_PROMISC)
		DMESG("NIC in promisc mode");

The rules are:
1) Don't put the everything on one line.
2) Don't use curly braces for one line condition true statetments.

>  
>  	if (priv->ieee80211->iw_mode == IW_MODE_MONITOR || \
>  	   dev->flags & IFF_PROMISC){
> @@ -2369,7 +2369,7 @@ static int rtl8192_qos_handle_probe_response(struct r8192_priv *priv,
>  			network->qos_data.old_param_count =
>  				network->qos_data.param_count;
>  			queue_work(priv->priv_wq, &priv->qos_activate);
> -			RT_TRACE (COMP_QOS, "QoS parameters change call "
> +			RT_TRACE(COMP_QOS, "QoS parameters change call "
>  					"qos_activate\n");

This one should look like:

			RT_TRACE(COMP_QOS,
				 "QoS parameters change call qos_activate\n");

The rule is don't break string literals into multiple lines (unless
there is a special reason).  Make sure the parameters line up
nicely.

regards,
dan carpenter

_______________________________________________
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