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:	Fri, 15 Nov 2013 20:52:05 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	johannes@...solutions.net
Cc:	netdev@...r.kernel.org, johannes.berg@...el.com
Subject: Re: [PATCH] genetlink: unify registration functions

From: Johannes Berg <johannes@...solutions.net>
Date: Fri, 15 Nov 2013 14:19:08 +0100

> From: Johannes Berg <johannes.berg@...el.com>
> 
> Now that the ops assignment is just two variables rather than a
> long list iteration etc., there's no reason to separately export
> __genl_register_family() and __genl_register_family_with_ops().
> 
> Unify the two functions into __genl_register_family() and make
> genl_register_family_with_ops() call it after assigning the ops.
> 
> Signed-off-by: Johannes Berg <johannes.berg@...el.com>

Looks great, applied.

As a future simplification perhaps we can even elide the array length
argument.  Most pass ARRAY_SIZE(foo) but there is at least one case
(DLM) which passes a constant, which is error prone.

#define genl_register_family_with_ops(family, ops)
	__genl_register_family_with_ops(family, ops, ARRAY_SIZE(ops))

something like that.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ