lkml.org 
[lkml]   [1999]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectI never liked bitfields by some reason.
Date
Now I know why I did not like bitfields. The code below would
need no #ifdef if it used macroses like
#define W3_XCVR_MASK 0x00F00000
or something to that effect...

--- drivers/net/3c59x.c 1999/09/06 01:17:39 1.39
+++ drivers/net/3c59x.c 1999/11/27 05:52:26
@@ -366,10 +369,23 @@
union wn3_config {
int i;
struct w3_config_fields {
+#if defined(__sparc__)
+ int pad25:7;
+ unsigned int autoselect:1;
+ unsigned int xcvr:4;
+ int pad18:2;
+ unsigned int ram_split:2;
+ int pad8:8;
+ unsigned int rom_size:2;
+ unsigned int ram_speed:2;
+ unsigned int ram_width:1;
+ unsigned int ram_size:3;
+#else
unsigned int ram_size:3, ram_width:1, ram_speed:2, rom_size:2;
int pad8:8;
unsigned int ram_split:2, pad18:2, xcvr:4, autoselect:1;
int pad24:7;
+#endif
} u;
};

--Pete

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.090 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site