Skip to contentSkip to conversation

Patchlet 2.6 iucv

PATCH Pete Zaitcev 1 participant 1 message Feb 3, 2004

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

Hi, Martin,

it seems that someone misused container_of. Spotted by Al Viro. Please pass to whoever is responsible for IUCV.

-- Pete

drivers/s390/net/netiucv.c +1 -2
@@ -1258,8 +1258,7 @@
 buffer_write (struct device *dev, const char *buf, size_t count)
 {
 	struct netiucv_priv *priv = dev->driver_data;
-	struct net_device *ndev =
-		container_of((void *)priv, struct net_device, priv);
+	struct net_device *ndev = priv->conn->netdev;
 	char         *e;
 	int          bs1;
 	char         tmp[CTRL_BUFSIZE];