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]
Date:	Wed, 5 Oct 2011 10:42:15 -0600
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	greg@...ah.com, linux-kernel@...r.kernel.org
Subject: Re: [RFC] drivercore: Add helper macro for platform_driver boilerplate

On Wed, Oct 5, 2011 at 4:02 AM, Mark Brown
<broonie@...nsource.wolfsonmicro.com> wrote:
> On Tue, Oct 04, 2011 at 05:26:55PM -0600, Grant Likely wrote:
>
>> +/* Helper macro for drivers that don't do anything special in module
>> + * init/exit.  This eliminates a lot of boilerplate */
>> +#define module_platform_driver(__platform_driver) \
>> +int __platform_driver##_init(void) \
>> +{ \
>> +     return platform_driver_register(&(__platform_driver)); \
>> +} \
>> +module_init(__platform_driver##_init); \
>
> This looks great but I would prefer it if the function complained if
> something goes wrong - it makes problems a lot more discoverable when
> they crop up.

Yes. As discussed in the other thread, I think that should be added to
the core code, and it can be in a separate patch.  It doesn't belong
in this macro.

g.
--
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