mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
BACKPORT: tty: serial: qcom-geni-serial: drop the return value from handle_rx
The return value of the handle_rx() callback is never checked. Drop it.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20221229155030.418800-12-brgl@bgdev.pl
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 370629635
Change-Id: I41a50a0d933243fa03502c5fda997bd53ae14080
(cherry picked from commit 0626afe57b)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
This commit is contained in:
committed by
Treehugger Robot
parent
a88673be7e
commit
3ebd383e35
@@ -115,7 +115,7 @@ struct qcom_geni_serial_port {
|
|||||||
u32 rx_fifo_depth;
|
u32 rx_fifo_depth;
|
||||||
bool setup;
|
bool setup;
|
||||||
unsigned long clk_rate;
|
unsigned long clk_rate;
|
||||||
int (*handle_rx)(struct uart_port *uport, u32 bytes, bool drop);
|
void (*handle_rx)(struct uart_port *uport, u32 bytes, bool drop);
|
||||||
unsigned int baud;
|
unsigned int baud;
|
||||||
void *rx_fifo;
|
void *rx_fifo;
|
||||||
u32 loopback;
|
u32 loopback;
|
||||||
@@ -503,7 +503,7 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s,
|
|||||||
spin_unlock_irqrestore(&uport->lock, flags);
|
spin_unlock_irqrestore(&uport->lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int handle_rx_console(struct uart_port *uport, u32 bytes, bool drop)
|
static void handle_rx_console(struct uart_port *uport, u32 bytes, bool drop)
|
||||||
{
|
{
|
||||||
u32 i;
|
u32 i;
|
||||||
unsigned char buf[sizeof(u32)];
|
unsigned char buf[sizeof(u32)];
|
||||||
@@ -538,16 +538,14 @@ static int handle_rx_console(struct uart_port *uport, u32 bytes, bool drop)
|
|||||||
}
|
}
|
||||||
if (!drop)
|
if (!drop)
|
||||||
tty_flip_buffer_push(tport);
|
tty_flip_buffer_push(tport);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static int handle_rx_console(struct uart_port *uport, u32 bytes, bool drop)
|
static void handle_rx_console(struct uart_port *uport, u32 bytes, bool drop)
|
||||||
{
|
{
|
||||||
return -EPERM;
|
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_SERIAL_QCOM_GENI_CONSOLE */
|
#endif /* CONFIG_SERIAL_QCOM_GENI_CONSOLE */
|
||||||
|
|
||||||
static int handle_rx_uart(struct uart_port *uport, u32 bytes, bool drop)
|
static void handle_rx_uart(struct uart_port *uport, u32 bytes, bool drop)
|
||||||
{
|
{
|
||||||
struct tty_port *tport;
|
struct tty_port *tport;
|
||||||
struct qcom_geni_serial_port *port = to_dev_port(uport);
|
struct qcom_geni_serial_port *port = to_dev_port(uport);
|
||||||
@@ -558,7 +556,7 @@ static int handle_rx_uart(struct uart_port *uport, u32 bytes, bool drop)
|
|||||||
tport = &uport->state->port;
|
tport = &uport->state->port;
|
||||||
ioread32_rep(uport->membase + SE_GENI_RX_FIFOn, port->rx_fifo, words);
|
ioread32_rep(uport->membase + SE_GENI_RX_FIFOn, port->rx_fifo, words);
|
||||||
if (drop)
|
if (drop)
|
||||||
return 0;
|
return;
|
||||||
|
|
||||||
ret = tty_insert_flip_string(tport, port->rx_fifo, bytes);
|
ret = tty_insert_flip_string(tport, port->rx_fifo, bytes);
|
||||||
if (ret != bytes) {
|
if (ret != bytes) {
|
||||||
@@ -568,7 +566,6 @@ static int handle_rx_uart(struct uart_port *uport, u32 bytes, bool drop)
|
|||||||
}
|
}
|
||||||
uport->icount.rx += ret;
|
uport->icount.rx += ret;
|
||||||
tty_flip_buffer_push(tport);
|
tty_flip_buffer_push(tport);
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int qcom_geni_serial_tx_empty(struct uart_port *uport)
|
static unsigned int qcom_geni_serial_tx_empty(struct uart_port *uport)
|
||||||
|
|||||||
Reference in New Issue
Block a user