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: <3ae72650809241203o41b62a10m31377887d44fd05e@mail.gmail.com>
Date:	Wed, 24 Sep 2008 12:03:39 -0700
From:	"Kay Sievers" <kay.sievers@...y.org>
To:	"Drew Moseley" <dmoseley@...sta.com>
Cc:	ambx1@....rr.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Create PNP device attributes via dev_attrs field of struct device

On Wed, Sep 24, 2008 at 10:22, Drew Moseley <dmoseley@...sta.com> wrote:
> Kay Sievers wrote:
>>
>> Any reason not to assign it statically to pnp_bus_type at in
>> drivers/pnp/driver.c?

> Not really but since everything in the dev_attrs array is statically
> defined in interface.c it was simpler to implement it this way.  To
> assign it in driver.c, the array can be made non-static and an extern
> added in driver.c, or the array definition can be moved to driver.c and
> all the set and show functions be made non-static.  Is there a preference?

Yeah, it looks weird to mangle the bus_type values from a device
routine, and set the same value again and again with every device
creation. Just declare the array non-static, if moving the code around
between files does not allow a static declaration.

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