lkml.org 
[lkml]   [2005]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 6700/6702PXH quirk
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-06 05:39    [W:0.101 / U:3.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site