android_kernel_motorola_sm6225/drivers/char/pcmcia
Joe Perches 9fe8074b82 TTY: synclink: Convert + to | for bit operations
Dan Carpenter noticed a missing set of parentheses
around a multiple field addition.

https://lkml.org/lkml/2013/1/27/166

His original commit message:

There is a kind of precedence problem here, but it doesn't affect how
the code works because ->serial_signals is unsigned char.  We want to
clear two flags here.

#define SerialSignal_RTS            0x20     /* Request to Send */
#define SerialSignal_DTR            0x80     /* Data Terminal Ready */

Without the parenthesis then it does:

	info->serial_signals &= 0x5f;

With the parenthesis it does:

	info->serial_signals &= 0xffffff5f;

info->serial_signals is an unsigned char so the two statements are
equivalent, but it's cleaner to add the parenthesis.  In other dtr_rts()
functions the parenthesis are there so this makes it more consistent.

Other changes:

Convert all + uses to | for these bit operations.

Reorder the multiple fields for consistency.
Update the comments too.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-30 00:09:58 -05:00
..
cm4000_cs.c pcmcia: Convert pcmcia_device_id declarations to const 2011-05-06 07:46:22 +02:00
cm4040_cs.c pcmcia: Convert pcmcia_device_id declarations to const 2011-05-06 07:46:22 +02:00
cm4040_cs.h [PATCH] New Omnikey Cardman 4040 driver 2005-11-13 18:14:10 -08:00
Kconfig tty: Added a CONFIG_TTY option to allow removal of TTY 2013-01-18 16:15:27 -08:00
Makefile tty: forgot to remove ipwireless from drivers/char/pcmcia/Makefile 2011-02-25 09:53:41 -08:00
synclink_cs.c TTY: synclink: Convert + to | for bit operations 2013-01-30 00:09:58 -05:00