From nobody Tue Sep 16 21:26:30 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0BB2C3DA79 for ; Thu, 29 Dec 2022 15:52:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233724AbiL2Pv6 (ORCPT ); Thu, 29 Dec 2022 10:51:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233573AbiL2Puu (ORCPT ); Thu, 29 Dec 2022 10:50:50 -0500 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 841F22C9 for ; Thu, 29 Dec 2022 07:50:45 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id m8-20020a05600c3b0800b003d96f801c48so11170069wms.0 for ; Thu, 29 Dec 2022 07:50:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nKmGeFAtCyk6wBb7MKS50ERYhoSBE5l1Jj0s77qCt2Y=; b=qnqdNb4kxb1jxs1Spj/pvbWBW66ZYoSxr6UxXULQWtfkOqAV51A+ul4xRGmbCBYx3F 75Jo/Kq6YKjb8ax4Y+mB9hJdRfPoDXrl/MQUruQnz6XdeyMPOKl3tLF0NcMwPODcnYLc zhnEmbuSPfq1svTG/yEm69tkznGpVk3F1WvLi4lknvoxNArcUYEOCXgNc9MhXo5tyXRr xkhkSLwUJODNH0CBp2+hD5IrvCqUeRlECBRc3Tijj+JXPQbexfX4ZP2mILJrKN+kRRhA D7zpAqASHqdRD0eh6JuZmRhIFrxMm7TaBrbVg5I66wqjfFnXXvP5hUhHN4pFc0JyZN04 E4PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nKmGeFAtCyk6wBb7MKS50ERYhoSBE5l1Jj0s77qCt2Y=; b=TQpsskHqPFfrSQHdLBGvl5PCR2VxfMGJ8sehnPTKjIdWFXWjLMZk+qWR1lHfIkKv02 bL9sxX1YnOSp7CpnNLCCFpqj063lkCSIy2z6P9Kh45z0bdInzbFrkk/MU2gvSBkcHoe6 QH0AzKjKDmMw32m79Ku5sPk25edw1EOCQX12CaRcwaluvFXBgclQCTyWn0EQQBaiH00M ZFpCBcnlOEAmOOzr+QP3OggP7fVGFUl2k9b+tD+O0rkrVVFq1Lbhct2mIXj0m+Ngm/S5 yU1gJRAmxBZ1/2I6XniAlmEHvse3S8mP7ZxL3h51gFYWDHDr+jZqLJJ3RJ3bzjzlLjBF ospA== X-Gm-Message-State: AFqh2kqQbiJaZy1dvyEfVcQqvLIHGiHy+y7k1lwRgnoqLHruRFCkE9cB htbfr05l6uzAuX7t2Irt81u3Ww== X-Google-Smtp-Source: AMrXdXtQRjHIeu0CRFLWb7kAQQMmQafohWQiZ+H9Q682c3hewHyO6M7UsBf0Fa8pxhZ++QBR8N8lUg== X-Received: by 2002:a1c:6a14:0:b0:3d1:f302:1975 with SMTP id f20-20020a1c6a14000000b003d1f3021975mr20473918wmc.33.1672329044677; Thu, 29 Dec 2022 07:50:44 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:8f7a:98d8:9d8d:ced8]) by smtp.gmail.com with ESMTPSA id bh12-20020a05600c3d0c00b003cfa81e2eb4sm25251647wmb.38.2022.12.29.07.50.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Dec 2022 07:50:44 -0800 (PST) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Greg Kroah-Hartman , Jiri Slaby , Srinivas Kandagatla , Vinod Koul , Alex Elder , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Krzysztof Kozlowski Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org, Bartosz Golaszewski , Konrad Dybcio Subject: [PATCH v6 11/14] tty: serial: qcom-geni-serial: drop the return value from handle_rx Date: Thu, 29 Dec 2022 16:50:27 +0100 Message-Id: <20221229155030.418800-12-brgl@bgdev.pl> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221229155030.418800-1-brgl@bgdev.pl> References: <20221229155030.418800-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski The return value of the handle_rx() callback is never checked. Drop it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio --- drivers/tty/serial/qcom_geni_serial.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qco= m_geni_serial.c index 3705c0f893a4..6daa3e205fc9 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -114,7 +114,7 @@ struct qcom_geni_serial_port { u32 tx_fifo_width; u32 rx_fifo_depth; bool setup; - 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; void *rx_fifo; u32 loopback; @@ -502,7 +502,7 @@ static void qcom_geni_serial_console_write(struct conso= le *co, const char *s, spin_unlock_irqrestore(&uport->lock, flags); } =20 -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 dro= p) { u32 i; unsigned char buf[sizeof(u32)]; @@ -537,16 +537,15 @@ static int handle_rx_console(struct uart_port *uport,= u32 bytes, bool drop) } if (!drop) tty_flip_buffer_push(tport); - return 0; } #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 dro= p) { - return -EPERM; + } #endif /* CONFIG_SERIAL_QCOM_GENI_CONSOLE */ =20 -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 qcom_geni_serial_port *port =3D to_dev_port(uport); @@ -557,7 +556,7 @@ static int handle_rx_uart(struct uart_port *uport, u32 = bytes, bool drop) tport =3D &uport->state->port; ioread32_rep(uport->membase + SE_GENI_RX_FIFOn, port->rx_fifo, words); if (drop) - return 0; + return; =20 ret =3D tty_insert_flip_string(tport, port->rx_fifo, bytes); if (ret !=3D bytes) { @@ -567,7 +566,6 @@ static int handle_rx_uart(struct uart_port *uport, u32 = bytes, bool drop) } uport->icount.rx +=3D ret; tty_flip_buffer_push(tport); - return ret; } =20 static unsigned int qcom_geni_serial_tx_empty(struct uart_port *uport) --=20 2.37.2