Skip to content

Commit 93e3d58

Browse files
John Villalovosgregkh
authored andcommitted
serial: fix missing bit coverage of ASYNC_FLAGS
It seems that currently ASYNC_FLAGS is one bit short of covering all the bits of the ASYNC user flags. In particular it does not cover the ASYNC_AUTOPROBE bit. ASYNCB_LAST_USER and ASYNCB_AUTOPROBE are both equal to 15. Therefore: ASYNC_AUTOPROBE = 1000 0000 0000 0000 ASYNC_FLAGS = 0111 1111 1111 1111 So ASYNC_FLAGS is not covering the ASYNC_AUTOPROBE bit. This patch fixes the issue and with the patch the values will be: ASYNC_AUTOPROBE = 1000 0000 0000 0000 ASYNC_FLAGS = 1111 1111 1111 1111 As a side note, doing a "git grep" I didn't find any use of ASYNC_AUTOPROBE or ASYNCB_AUTOPROBE in the kernel, besides this include file. Signed-off-by: John Villalovos <[email protected]> Cc: Alan Cox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e8dd475 commit 93e3d58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/serial.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ struct serial_uart_config {
151151
#define ASYNC_BUGGY_UART (1U << ASYNCB_BUGGY_UART)
152152
#define ASYNC_AUTOPROBE (1U << ASYNCB_AUTOPROBE)
153153

154-
#define ASYNC_FLAGS ((1U << ASYNCB_LAST_USER) - 1)
154+
#define ASYNC_FLAGS ((1U << (ASYNCB_LAST_USER + 1)) - 1)
155155
#define ASYNC_USR_MASK (ASYNC_SPD_HI|ASYNC_SPD_VHI| \
156156
ASYNC_CALLOUT_NOHUP|ASYNC_SPD_SHI|ASYNC_LOW_LATENCY)
157157
#define ASYNC_SPD_CUST (ASYNC_SPD_HI|ASYNC_SPD_VHI)

0 commit comments

Comments
 (0)