Thread (5 messages) flat view 5 messages, 2 authors, 2016-11-29

Re: [PATCH net-next v2 2/2] net: phy: bcm7xxx: Plug in support for reading PHY error counters

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2016-11-29 03:20:32

Le 11/28/16 à 18:50, Andrew Lunn a écrit :
quoted
+struct bcm7xxx_phy_priv {
+	u64	*stats;
+};
quoted
+static int bcm7xxx_28nm_probe(struct phy_device *phydev)
+{
+	struct bcm7xxx_phy_priv *priv;
+
+	priv = devm_kzalloc(&phydev->mdio.dev, sizeof(*priv), GFP_KERNEL);
+	if (!priv)
+		return -ENOMEM;
+
+	phydev->priv = priv;
+
+	priv->stats = devm_kzalloc(&phydev->mdio.dev,
+				   bcm_phy_get_sset_count(phydev), GFP_KERNEL);
Hi Florian

Should there be a * sizeof(u64) in there?
It should thanks for noticing!
-- 
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help