tty: Fix width of unsigned long bitfield padding

Commit c545b66c69,
'tty: Serialize tcflow() with other tty flow control changes' and
commit 99416322dd,
'tty: Workaround Alpha non-atomic byte storage in tty_struct' work around
compiler bugs and non-atomic storage on multiple arches by padding
bitfields out to the declared type which is unsigned long. However, the
width varies by arch.

Pad bitfields to actual width of unsigned long (which is BITS_PER_LONG).

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Peter Hurley 2014-09-24 06:26:21 -04:00 committed by Greg Kroah-Hartman
parent 99416322dd
commit cc952e7017

View file

@ -264,11 +264,11 @@ struct tty_struct {
struct winsize winsize; /* winsize_mutex */ struct winsize winsize; /* winsize_mutex */
unsigned long stopped:1, /* flow_lock */ unsigned long stopped:1, /* flow_lock */
flow_stopped:1, flow_stopped:1,
unused:62; unused:BITS_PER_LONG - 2;
int hw_stopped; int hw_stopped;
unsigned long ctrl_status:8, /* ctrl_lock */ unsigned long ctrl_status:8, /* ctrl_lock */
packet:1, packet:1,
unused_ctrl:55; unused_ctrl:BITS_PER_LONG - 9;
unsigned int receive_room; /* Bytes free for queue */ unsigned int receive_room; /* Bytes free for queue */
int flow_change; int flow_change;