* [PATCH 1/2] serial: qcom_geni: Fix variable naming
2023-01-23 17:38 [PATCH 0/2] serial: fix recently introduced problems in tty-next Ilpo Järvinen
@ 2023-01-23 17:38 ` Ilpo Järvinen
2023-01-23 17:38 ` [PATCH 2/2] serial: liteuart: Correct error rollback Ilpo Järvinen
2023-01-23 17:50 ` [PATCH 0/2] serial: fix recently introduced problems in tty-next Greg Kroah-Hartman
2 siblings, 0 replies; 5+ messages in thread
From: Ilpo Järvinen @ 2023-01-23 17:38 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-serial, Jiri Slaby, Andy Gross,
Bjorn Andersson, Konrad Dybcio, linux-arm-msm, linux-kernel
Cc: Ilpo Järvinen
Commit 2aaa43c70778 ("tty: serial: qcom-geni-serial: add support for
serial engine DMA") renamed rx_fifo member to rf_buf which caused a
build failure when b8caf69a6946 ("tty: serial: qcom-geni-serial: fix
slab-out-of-bounds on RX FIFO buffer") from tty-linus was merged into
tty-next.
Fix the member variable name.
Fixes: 7a6aa989f2e8 ("Merge 6.2-rc5 into tty-next")
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
drivers/tty/serial/qcom_geni_serial.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index d98e0a8aae7c..7c49194ec8ac 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -1055,11 +1055,11 @@ static int setup_fifos(struct qcom_geni_serial_port *port)
uport->fifosize =
(port->tx_fifo_depth * port->tx_fifo_width) / BITS_PER_BYTE;
- if (port->rx_fifo && (old_rx_fifo_depth != port->rx_fifo_depth) && port->rx_fifo_depth) {
- port->rx_fifo = devm_krealloc(uport->dev, port->rx_fifo,
- port->rx_fifo_depth * sizeof(u32),
- GFP_KERNEL);
- if (!port->rx_fifo)
+ if (port->rx_buf && (old_rx_fifo_depth != port->rx_fifo_depth) && port->rx_fifo_depth) {
+ port->rx_buf = devm_krealloc(uport->dev, port->rx_buf,
+ port->rx_fifo_depth * sizeof(u32),
+ GFP_KERNEL);
+ if (!port->rx_buf)
return -ENOMEM;
}
--
2.30.2
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] serial: liteuart: Correct error rollback
2023-01-23 17:38 [PATCH 0/2] serial: fix recently introduced problems in tty-next Ilpo Järvinen
2023-01-23 17:38 ` [PATCH 1/2] serial: qcom_geni: Fix variable naming Ilpo Järvinen
@ 2023-01-23 17:38 ` Ilpo Järvinen
2023-01-23 17:42 ` Gabriel L. Somlo
2023-01-23 17:50 ` [PATCH 0/2] serial: fix recently introduced problems in tty-next Greg Kroah-Hartman
2 siblings, 1 reply; 5+ messages in thread
From: Ilpo Järvinen @ 2023-01-23 17:38 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-serial, Jiri Slaby, Karol Gugala,
Mateusz Holenko, Gabriel Somlo, Joel Stanley, Ilpo Järvinen,
linux-kernel
Cc: kernel test robot, Dan Carpenter
Goto to the correct rollback label instead of directly returning.
Fixes: 5602cf99dcdc ("serial: liteuart: add IRQ support for the RX path")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
drivers/tty/serial/liteuart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/liteuart.c b/drivers/tty/serial/liteuart.c
index ef557d59e4c8..192ad681de35 100644
--- a/drivers/tty/serial/liteuart.c
+++ b/drivers/tty/serial/liteuart.c
@@ -313,7 +313,7 @@ static int liteuart_probe(struct platform_device *pdev)
ret = platform_get_irq_optional(pdev, 0);
if (ret < 0 && ret != -ENXIO)
- return ret;
+ goto err_erase_id;
if (ret > 0)
port->irq = ret;
--
2.30.2
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 2/2] serial: liteuart: Correct error rollback
2023-01-23 17:38 ` [PATCH 2/2] serial: liteuart: Correct error rollback Ilpo Järvinen
@ 2023-01-23 17:42 ` Gabriel L. Somlo
0 siblings, 0 replies; 5+ messages in thread
From: Gabriel L. Somlo @ 2023-01-23 17:42 UTC (permalink / raw)
To: Ilpo Järvinen
Cc: Greg Kroah-Hartman, linux-serial, Jiri Slaby, Karol Gugala,
Mateusz Holenko, Joel Stanley, linux-kernel, kernel test robot,
Dan Carpenter
On Mon, Jan 23, 2023 at 07:38:57PM +0200, Ilpo Järvinen wrote:
> Goto to the correct rollback label instead of directly returning.
>
> Fixes: 5602cf99dcdc ("serial: liteuart: add IRQ support for the RX path")
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <error27@gmail.com>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> ---
> drivers/tty/serial/liteuart.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/liteuart.c b/drivers/tty/serial/liteuart.c
> index ef557d59e4c8..192ad681de35 100644
> --- a/drivers/tty/serial/liteuart.c
> +++ b/drivers/tty/serial/liteuart.c
> @@ -313,7 +313,7 @@ static int liteuart_probe(struct platform_device *pdev)
>
> ret = platform_get_irq_optional(pdev, 0);
> if (ret < 0 && ret != -ENXIO)
> - return ret;
> + goto err_erase_id;
That was my mistake, sorry, and thanks for the super-quick fix! :)
Reviewed-by: Gabriel Somlo <gsomlo@gmail.com>
> if (ret > 0)
> port->irq = ret;
>
> --
> 2.30.2
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] serial: fix recently introduced problems in tty-next
2023-01-23 17:38 [PATCH 0/2] serial: fix recently introduced problems in tty-next Ilpo Järvinen
2023-01-23 17:38 ` [PATCH 1/2] serial: qcom_geni: Fix variable naming Ilpo Järvinen
2023-01-23 17:38 ` [PATCH 2/2] serial: liteuart: Correct error rollback Ilpo Järvinen
@ 2023-01-23 17:50 ` Greg Kroah-Hartman
2 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2023-01-23 17:50 UTC (permalink / raw)
To: Ilpo Järvinen; +Cc: linux-serial, Jiri Slaby, linux-kernel
On Mon, Jan 23, 2023 at 07:38:55PM +0200, Ilpo Järvinen wrote:
> One build fail due to tty-linus -> tty-next merge and one problem
> smatch found.
>
> Ilpo Järvinen (2):
> serial: qcom_geni: Fix variable naming
> serial: liteuart: Use proper error rollback
>
> drivers/tty/serial/liteuart.c | 2 +-
> drivers/tty/serial/qcom_geni_serial.c | 10 +++++-----
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> --
> 2.30.2
>
Oh nice, you beat me too it!
thanks for these, I'll go queue them up right now.
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread