Re: [PATCH] eliminate pci_dev name

Linus Torvalds (torvalds@transmeta.com)
Thu, 14 Nov 2002 11:22:23 -0800 (PST)


On Thu, 14 Nov 2002, Matthew Wilcox wrote:
>
> Sure, I can do that. That leads me to think that maybe we should
> delete name from struct device and just use the one in struct kobject
> (which is already a mere 16 bytes). But if we're going to go as far
> down as the kobject... that has a dentry. And dentrys have names.
> So how about eliminating that too and just creating a dentry with the
> almost infinitely long name?

I like your thinking, but the "pci->name" is really just a descrition, and
what should maybe be in the kobject is the "address", which is
"pci->slotname". The two are quite fundamentally different (ie nobody
should depend on "name" being unique or constant anything like that, while
"slotname" is really a bus-level address (*)).

Linus

(*) "slotname" is also not unique in general, it's only unique _within_
_that_ _bus_. With multiple PCI buses, for example, you can have two
devices with the same slotname, if they are on separate segments.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/