Re: virtio: struct device - replace bus_id with dev_name(), dev_set_name()

Kay Sievers
2008-11-06T06:29:15Z

On Thu, Nov 6, 2008 at 04:45, Rusty Russell <rusty@rustcorp.com.au> wrote:
> On Friday 31 October 2008 06:10:22 Kay Sievers wrote:
>> This patch is part of a larger patch series which will remove
>> the "char bus_id[20]" name string from struct device. The device
>> name is managed in the kobject anyway, and without any size
>> limitation, and just needlessly copied into "struct device".
>
> OK, I've applied this patch.

Thanks!

> I'm curious how you're going to handle out-of-memory conditions?

If the name can't be set, the following call to device_register() will
fail, and should be handled by the caller. Just like today when we
allocate the kobject name in device_register(). After the core has
switched over, the name allocation will only happen a few lines
earlier, it should not behave different otherwise. Is that what you
mean?

Thanks,
Kay