lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ac3eb2510811070033m108d8ed5t499c20ee02b2618f@mail.gmail.com>
Date:	Fri, 7 Nov 2008 09:33:16 +0100
From:	"Kay Sievers" <kay.sievers@...y.org>
To:	"David Miller" <davem@...emloft.net>
Cc:	wli@...omorphy.com, greg@...ah.com, linux-kernel@...r.kernel.org
Subject: Re: sparc: struct device - replace bus_id with dev_name(), dev_set_name()

On Fri, Nov 7, 2008 at 08:35, David Miller <davem@...emloft.net> wrote:
> From: Kay Sievers <kay.sievers@...y.org>
> Date: Fri, 07 Nov 2008 01:43:59 +0100
>
>> --- a/arch/sparc/kernel/of_device.c
>> +++ b/arch/sparc/kernel/of_device.c
>> @@ -563,9 +563,9 @@ build_resources:
>>       op->dev.parent = parent;
>>       op->dev.bus = &of_platform_bus_type;
>>       if (!parent)
>> -             strcpy(op->dev.bus_id, "root");
>> +             dev_set_name(&op->dev, "root");
>>       else
>> -             sprintf(op->dev.bus_id, "%08x", dp->node);
>> +             dev_set_name(&op->dev, "%08x", dp->node);
>>
>>       if (of_device_register(op)) {
>>               printk("%s: Could not register of device.\n",
>
> This part is OK.
>
>> --- a/arch/sparc64/kernel/vio.c
>> +++ b/arch/sparc64/kernel/vio.c
>> @@ -224,7 +224,7 @@ static struct vio_dev *vio_create_one(st
>>       if (!strcmp(type, "domain-services-port"))
>>               bus_id_name = "ds";
>>
>> -     if (strlen(bus_id_name) >= BUS_ID_SIZE - 4) {
>> +     if (strlen(bus_id_name) >= 20 - 4) {
>>               printk(KERN_ERR "VIO: bus_id_name [%s] is too long.\n",
>>                      bus_id_name);
>>               return NULL;
>>
>>
>
> But I don't like this.
>
> Could you please keep the macro around until everything is converted?
> Then you can remove the test entirely.
>
> Leaving it with just constants there is inviting confusion, no matter
> how short amount of time it will be there.

I can add a SPARC_BUS_ID_SIZE, to that file, or in a sparc header, but
the core will not provide any such value, and have to, go to catch all
remaining occurrences across the tree. Where should I add it?

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ