Thread (80 messages) 80 messages, 8 authors, 2013-01-17
STALE4891d

[PATCH v5 03/14] KVM: ARM: Initial skeleton to compile KVM support

From: Rusty Russell <hidden>
Date: 2013-01-16 02:56:01
Also in: kvm

Christoffer Dall [off-list ref] writes:
On Mon, Jan 14, 2013 at 11:24 AM, Russell King - ARM Linux
[off-list ref] wrote:
quoted
On Tue, Jan 08, 2013 at 01:38:55PM -0500, Christoffer Dall wrote:
quoted
+     /* -ENOENT for unknown features, -EINVAL for invalid combinations. */
+     for (i = 0; i < sizeof(init->features)*8; i++) {
+             if (init->features[i / 32] & (1 << (i % 32))) {
Isn't this an open-coded version of test_bit() ?
indeed, nicely spotted:
BTW, I wrote it that was out of excessive paranoia: it's a userspace
API, and test_bit() won't be right on 64 bit BE systems.

Cheers,
Rusty.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help