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: <adaskubdk8t.fsf@cisco.com>
Date:	Tue, 15 Jul 2008 12:23:46 -0700
From:	Roland Dreier <rdreier@...co.com>
To:	Yevgeny Petrilin <yevgenyp@...lanox.co.il>
Cc:	jeff@...zik.org, netdev@...r.kernel.org,
	Liran Liss <liranl@...lanox.co.il>, tziporet@...lanox.co.il
Subject: Re: [PATCH RFC 01/10] mlx4_en: Include file

 > +/*
 > + * Useful macros
 > + */
 > +
 > +#define ROUNDUP_LOG2(x)		ilog2(roundup_pow_of_two(x))

<linux/log2.h> calls this order_base_2()

 > +#define XNOR(x, y)		(!(x) == !(y))

You only use this once, and I think it would be much clearer to just
open-code this there -- I don't think "XNOR" is sufficiently
self-documenting.

 > +#define MIN(a, b)		((a) < (b) ? (a) : (b))
 > +#define MAX(a, b)		((a) > (b) ? (a) : (b))

Don't worry -- the min()/max() macros in <linux/kernel.h> won't wear out
from overuse.

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