Re: [PATCH] 6700/6702PXH quirk
From: Jeff Garzik
Date: Fri Aug 05 2005 - 22:36:58 EST
On Fri, Aug 05, 2005 at 03:57:12PM -0700, Greg KH wrote:
> Anyway, Jeff is right, add another bit field.
The updated patch, which adds a new bitfield, looks OK to me.
However...
<pedantic>
FWIW, compilers generate AWFUL code for bitfields. Bitfields are
really tough to do optimally, whereas bit flags ["unsigned int flags &
bitmask"] are the familiar ints and longs that the compiler is well
tuned to optimize.
Additionally, though it is not the case with struct pci_dev, bitfields
cause endian headaches (see the LITTLE_ENDIAN_BITFIELD ifdefs).
Bit flags are -far- superior in every case. Avoid bitfields like the plague.
</pedantic>
I wouldn't mind seeing a janitor remove all bitfields from struct pci_dev,
and any other kernel structure that uses the evil constructs.
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/