Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1534733

Re: [PATCH] stmmac: simplify flag assignment

From Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Newsgroups linux.kernel
Subject Re: [PATCH] stmmac: simplify flag assignment
Date 2016-12-02 09:30 +0100
Message-ID <sJRoe-1bm-9@gated-at.bofh.it> (permalink)
References <sGDrr-3NA-9@gated-at.bofh.it> <sGY2X-lZ-25@gated-at.bofh.it> <sH4UG-57A-27@gated-at.bofh.it> <sJbyF-5yf-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


+ Alex

On 11/30/2016 12:44 PM, Pavel Machek wrote:
>
> Simplify flag assignment.
>
> Signed-off-by: Pavel Machek <pavel@denx.de>
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index ed20668..0b706a7 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -2771,12 +2771,8 @@ static netdev_features_t stmmac_fix_features(struct net_device *dev,
>  		features &= ~NETIF_F_CSUM_MASK;
>
>  	/* Disable tso if asked by ethtool */
> -	if ((priv->plat->tso_en) && (priv->dma_cap.tsoen)) {
> -		if (features & NETIF_F_TSO)
> -			priv->tso = true;
> -		else
> -			priv->tso = false;
> -	}
> +	if ((priv->plat->tso_en) && (priv->dma_cap.tsoen))
> +		priv->tso = !!(features & NETIF_F_TSO);
>
>  	return features;
>  }
>
>

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] stmmac: simplify flag assignment Pavel Machek <pavel@ucw.cz> - 2016-11-30 12:50 +0100
  Re: [PATCH] stmmac: simplify flag assignment David Miller <davem@davemloft.net> - 2016-12-01 21:30 +0100
    stmmac: turn coalescing / NAPI off in stmmac Pavel Machek <pavel@ucw.cz> - 2016-12-01 23:50 +0100
      Re: stmmac: turn coalescing / NAPI off in stmmac Giuseppe CAVALLARO <peppe.cavallaro@st.com> - 2016-12-02 09:50 +0100
        Re: stmmac: turn coalescing / NAPI off in stmmac Pavel Machek <pavel@ucw.cz> - 2016-12-02 11:50 +0100
          Re: stmmac: turn coalescing / NAPI off in stmmac Giuseppe CAVALLARO <peppe.cavallaro@st.com> - 2016-12-02 17:10 +0100
            Re: stmmac: turn coalescing / NAPI off in stmmac Pavel Machek <pavel@ucw.cz> - 2016-12-05 12:50 +0100
  Re: [PATCH] stmmac: simplify flag assignment Giuseppe CAVALLARO <peppe.cavallaro@st.com> - 2016-12-02 09:30 +0100

csiph-web