From: Sergio Paracuellos Date: Thu, 19 Apr 2018 05:07:59 +0000 (+0200) Subject: staging: ks7010: change if-else condition assignment to use ternary operator X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9dbeb16aab70af79ab853e5237d23c7a24b8d820;p=openwrt%2Fstaging%2Fblogic.git staging: ks7010: change if-else condition assignment to use ternary operator This commit changes an if-else block used to just assign a variable to use a ternary operator to do the same improving readability. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c index 1f2e9f3e2f85..6a0ec9c66603 100644 --- a/drivers/staging/ks7010/ks_wlan_net.c +++ b/drivers/staging/ks7010/ks_wlan_net.c @@ -673,10 +673,7 @@ static int ks_wlan_get_rate(struct net_device *dev, ks_wlan_update_phy_information(priv); vwrq->value = ((priv->current_rate) & RATE_MASK) * 500000; - if (priv->reg.tx_rate == TX_RATE_FIXED) - vwrq->fixed = 1; - else - vwrq->fixed = 0; + vwrq->fixed = (priv->reg.tx_rate == TX_RATE_FIXED) ? 1 : 0; return 0; }