devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch -next] net: calxedaxgmac: fix condition in xgmac_set_features()
@ 2013-04-25  7:44 Dan Carpenter
  2013-04-25  7:50 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-04-25  7:44 UTC (permalink / raw)
  To: Grant Likely
  Cc: Rob Herring, David S. Miller, Eric Dumazet, Fabio Estevam,
	Jiri Pirko, netdev, devicetree-discuss, kernel-janitors

The "changed" variable should be a 64 bit type, otherwise it can't store
all the features.  The way the code is now the test for whether
NETIF_F_RXCSUM changed is always false and we return immediately.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/ethernet/calxeda/xgmac.c b/drivers/net/ethernet/calxeda/xgmac.c
index 791e5ff..4a1f2fa 100644
--- a/drivers/net/ethernet/calxeda/xgmac.c
+++ b/drivers/net/ethernet/calxeda/xgmac.c
@@ -1482,7 +1482,7 @@ static int xgmac_set_features(struct net_device *dev, netdev_features_t features
 	u32 ctrl;
 	struct xgmac_priv *priv = netdev_priv(dev);
 	void __iomem *ioaddr = priv->base;
-	u32 changed = dev->features ^ features;
+	netdev_features_t changed = dev->features ^ features;
 
 	if (!(changed & NETIF_F_RXCSUM))
 		return 0;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch -next] net: calxedaxgmac: fix condition in xgmac_set_features()
  2013-04-25  7:44 [patch -next] net: calxedaxgmac: fix condition in xgmac_set_features() Dan Carpenter
@ 2013-04-25  7:50 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-04-25  7:50 UTC (permalink / raw)
  To: dan.carpenter
  Cc: grant.likely, rob.herring, edumazet, fabio.estevam, jiri, netdev,
	devicetree-discuss, kernel-janitors

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 25 Apr 2013 10:44:20 +0300

> The "changed" variable should be a 64 bit type, otherwise it can't store
> all the features.  The way the code is now the test for whether
> NETIF_F_RXCSUM changed is always false and we return immediately.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied, thanks Dan.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-25  7:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-25  7:44 [patch -next] net: calxedaxgmac: fix condition in xgmac_set_features() Dan Carpenter
2013-04-25  7:50 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).