tty: serial: fsl_lpuart: adjust buffer length to the intended size
authorShenwei Wang <shenwei.wang@nxp.com>
Mon, 10 Apr 2023 19:55:55 +0000 (14:55 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Apr 2023 11:42:30 +0000 (13:42 +0200)
commitf73fd750552524b06b5d77ebfdd106ccc8fcac61
tree3737eb93dffc0e1f1d471935d61cd6e583dde199
parent9e4f2a8004213339e9d837d891a59cc80e082966
tty: serial: fsl_lpuart: adjust buffer length to the intended size

Based on the fls function definition provided below, we should not
subtract 1 to obtain the correct buffer length:

fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.

Fixes: 5887ad43ee02 ("tty: serial: fsl_lpuart: Use cyclic DMA for Rx")
Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Link: https://lore.kernel.org/r/20230410195555.1003900-1-shenwei.wang@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/fsl_lpuart.c