[lkml]   [2005]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] 6700/6702PXH quirk
From: Zach Brown <>
Date: Mon, 08 Aug 2005 10:42:37 -0700

> if (!foo->enabled)
> if (!(foo->flags & FOO_FLAG_ENABLED)

You can hide the "complexity" of the second line behind
macros. And this is what is done in most places.

Alternatively, you can use the existing bitops interfaces,
and in that case you define bit numbers only then use the
bitops.h interfaces to do all the work (probably the __set_bit()
et al. non-atomic variants in this case).

Really, I think it's worth it. I absolutely refuse to put sets of
boolean states into C bitfields or even worse integer members.
Just define a u32 bitmask and be done with it.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-08-08 19:48    [W:0.089 / U:1.116 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site