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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 24 Jan 2015 23:35:40 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	linux@...musvillemoes.dk
Cc:	jcliburn@...il.com, chris.snook@...il.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] atheros/atlx: Simplify bit manipulations

From: Rasmus Villemoes <linux@...musvillemoes.dk>
Date: Fri, 23 Jan 2015 12:06:52 +0100

> The code 'if (foo & X) foo &= ~X;' is semantically equivalent to
> simply 'foo &= ~X;', but gcc generates about four instructions for the
> former, one for the latter. Similarly, if X consists of a single bit,
> 'if (!(foo & X)) X |= X;' can be replaced by 'foo |= X;'.
> 
> In the atl2 case, gcc does know how to merge the new adjacent
> operations, so altogether this gives a nice little code size
> reduction of about 80 bytes.
> 
> Signed-off-by: Rasmus Villemoes <linux@...musvillemoes.dk>

I agree with the feedback given that these open-coded sequences should
be replaced with the appropriate PCI helpers instead of edited
further.
--
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