[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4799CE68.5020305@s5r6.in-berlin.de>
Date: Fri, 25 Jan 2008 12:56:24 +0100
From: Stefan Richter <stefanr@...6.in-berlin.de>
To: Jan Engelhardt <jengelh@...putergmbh.de>
CC: Greg Kroah-Hartman <gregkh@...e.de>, linux-kernel@...r.kernel.org,
Frank Seidel <fseidel@...e.de>,
Jiri Slaby <jirislaby@...il.com>
Subject: Re: [PATCH 012/196] nozomi driver
On 1/25/2008 9:31 AM, Jan Engelhardt wrote:
> On Jan 24 2008 23:09, Greg Kroah-Hartman wrote:
>>+#ifdef __BIG_ENDIAN
>>+/* Big endian */
>>+
>>+struct toggles {
>>+ unsigned enabled:5; /*
>>+ * Toggle fields are valid if enabled is 0,
>>+ * else A-channels must always be used.
>>+ */
>>+ unsigned diag_dl:1;
>>+ unsigned mdm_dl:1;
>>+ unsigned mdm_ul:1;
>>+} __attribute__ ((packed));
>
> Probably just me, unsigned int is a good bit more explicit.
> The driver may also use a combined struct with
> BIG_ENDIAN_BITFIELD/LITTLE_ENDIAN_BIGFIELD (see e.g. linux/ip.h).
I've been told we don't do bitfields anymore in on-the-wire data,
on-disk data, userspace ABIs, etc. because their layout is compiler
dependent in the end.
--
Stefan Richter
-=====-==--- ---= ==--=
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists