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  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]
Date:	Sun, 2 Nov 2008 14:55:46 +0100
From:	"Kay Sievers" <>
To:	"Dominik Brodowski" <>,
	"Kay Sievers" <>,
	linux-kernel <>,
	"Greg KH" <>
Subject: Re: pcmcia: struct device - replace bus_id with dev_name(), dev_set_name()

On Sun, Nov 2, 2008 at 13:13, Dominik Brodowski
<> wrote:
> On Sat, Nov 01, 2008 at 11:46:06AM +0100, Kay Sievers wrote:
>> From: Kay Sievers <>
>> Subject: pcmcia: struct device - replace bus_id with dev_name(), dev_set_name()
>> Cc: Dominik Brodowski <>
>> Acked-by: Greg Kroah-Hartman <>
>> Signed-Off-By: Kay Sievers <>
> is this to go in via -pcmcia or via -driver-core?

Would be great if this goes through -pcmcia, and show up in -next
soon, so we can continue to address the rest of the tree in -next,
after the patches are merged from the subsystem trees.

>> diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
>> index c68c5d3..5d0e60e 100644
>> --- a/drivers/pcmcia/cs.c
>> +++ b/drivers/pcmcia/cs.c
>> @@ -226,7 +226,7 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
>>       /* set proper values in socket->dev */
>>       dev_set_drvdata(&socket->dev, socket);
>>       socket->dev.class = &pcmcia_socket_class;
>> -     snprintf(socket->dev.bus_id, BUS_ID_SIZE, "pcmcia_socket%u", socket->sock);
>> +     dev_set_name(&socket->dev, "pcmcia_socket%u", socket->sock);
> In other places, you check for !dev_name() afterwards -- why not here?

The name is used in the line just below setting it, which is why we
need to check that it is not NULL. The other case, like in almost all
other cases, the unlikely event of failing to set the name is handled
by a failing call to device_register().

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists