Skip to content

Commit cb86a33

Browse files
Vamshi Gajjelagregkh
authored andcommitted
serial: core: Update uart_poll_timeout() function to return unsigned long
The function uart_fifo_timeout() returns an unsigned long value, which is the number of jiffies. Therefore, change the variable timeout in the function uart_poll_timeout() from int to unsigned long. Change the return type of the function uart_poll_timeout() from int to unsigned long to be consistent with the type of timeout values. Signed-off-by: Vamshi Gajjela <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 43f012d commit cb86a33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/linux/serial_core.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,9 +852,9 @@ static inline unsigned long uart_fifo_timeout(struct uart_port *port)
852852
}
853853

854854
/* Base timer interval for polling */
855-
static inline int uart_poll_timeout(struct uart_port *port)
855+
static inline unsigned long uart_poll_timeout(struct uart_port *port)
856856
{
857-
int timeout = uart_fifo_timeout(port);
857+
unsigned long timeout = uart_fifo_timeout(port);
858858

859859
return timeout > 6 ? (timeout / 2 - 2) : 1;
860860
}

0 commit comments

Comments
 (0)