From: Timur Tabi <redacted>
Date: Thu, 15 Dec 2011 11:12:01 -0600
Andy Fleming wrote:
quoted
Why? Doesn't this just obfuscate things a little, while providing no immediate benefit?
I see code like this frequently:
bus = mdiobus_alloc();
if (bus == NULL)
return -ENOMEM;
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (priv == NULL) {
err = -ENOMEM;
goto out_free;
}
bus->priv = priv;
Where "frequently", all of the mdiobus_alloc() call sites in your patch just
get translated to pass "0" for the private size.
Make the change how I suggested, where mdiobus_alloc() retains it's current
function signature and semantics. Then you can edit drivers as needed rather
than from the beginning.