[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070724232621.GB11350@ifup.org>
Date: Tue, 24 Jul 2007 16:26:21 -0700
From: Brandon Philips <bphilips@...e.de>
To: Al Viro <viro@....linux.org.uk>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH 1/2][RFC] Update net core to use devres.
On 00:09 Wed 25 Jul 2007, Al Viro wrote:
> On Tue, Jul 24, 2007 at 11:51:34PM +0100, Al Viro wrote:
> > On Tue, Jul 24, 2007 at 03:39:52PM -0700, bphilips@...e.de wrote:
> > > * netdev_pci_remove_one() can replace simple pci device remove
> > > functions
> > >
> > > * devm_alloc_netdev() is like alloc_netdev but allocates memory using devres.
> > > alloc_netdev() can be removed once all drivers use devres.
> >
> > Ewwww... What the hell for? To make sure that we have struct device
> > for everything, whether we need it or not? Have you actually read
> > through drivers/net? I mean, _really_ read through it, looking for
> > ugly cases...
> >
> > I've done just that several times and I'm sorry, but I would classify
> > that project as hopeless. It's way, _way_ more diverse than SATA...
>
> Actually, it's even worse - net_device itself simply *cannot* be
> dealt with that way. Its lifetime can indefinitely exceed that
> of underlying e.g. PCI device.
Could you point me to an example you have in mind?
I quickly searched through a handful of the PCI device drivers and
couldn't find an example where the .remove function didn't do something
to the tune of:
unregister_netdev(dev);
... various un-allocs and cleanup ...
free_netdev(dev)
...
return;
Thank You,
Brandon
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists