On Thu, 10 Jan 2019 17:57:22 +0100 Cornelia Huck <coh...@redhat.com> wrote:
> > I thought the same. They could also be made unsigned long or > > unsigned long long to increase the number of child devices that can be > > plugged in before having to deal with exceeding the index value. > > Making them unsigned long long would push the problem out far enough to > be irrelevant in practice. Not sure if we care about fixing it > completely, though. My intuition says that INT_MAX hotplug's on a bus is already an 'academic' thing. The rationale behind asking about unsigned is that I would consider something like 'child[-42]' weird. My intuition was that this is something that the community considers not important enough to invest in. If we don't want to leave it as is, I would prefer some proper fix (explicit limit on the number of hotplug operations, or scanning for the first free one). Regards, Halil