Re: [PATCH v5 2/2] staging: rtl8192u: remove unneeded bool

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

 



On Fri, 2015-07-17 at 11:35 +0200, Luis de Bethencourt wrote:
> bool Reval is set to match the value of bHalfWirelessN24GMode just to
> this. The value can be returned directly. Removing uneeded bool.

trivia:

> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
[]
> @@ -2043,16 +2043,10 @@ static bool GetNmodeSupportBySecCfg8192(struct net_device *dev) 
>  static bool GetHalfNmodeSupportByAPs819xUsb(struct net_device *dev)
>  {
> -	bool			Reval;
>  	struct r8192_priv *priv = ieee80211_priv(dev);
>  	struct ieee80211_device *ieee = priv->ieee80211;

There doesn't seem to be much value in this temporary.

> -	if (ieee->bHalfWirelessN24GMode)
> -		Reval = true;
> -	else
> -		Reval =  false;
> -
> -	return Reval;
> +	return ieee->bHalfWirelessN24GMode;

	return priv->ieee80211->bHalfWirelessN24GMode;

would work as well.  But no doubt the compiler does the
same thing in any case.


_______________________________________________
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