From mboxrd@z Thu Jan 1 00:00:00 1970 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 85CBCC433FE for ; Tue, 22 Nov 2022 10:23:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233563AbiKVKXR (ORCPT ); Tue, 22 Nov 2022 05:23:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233560AbiKVKWF (ORCPT ); Tue, 22 Nov 2022 05:22:05 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BDA73C6E6 for ; Tue, 22 Nov 2022 02:21:50 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id b12so10176818wrn.2 for ; Tue, 22 Nov 2022 02:21:50 -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=27Y/3dF94+Cm6VsgYrXb3WffaYznVRIrRKIsZki0OWQ=; b=p5tYf/k5kFhRazIIzD8o3PSLNCLLkbhWf5IpnTaCYOf/WP+9EuBZSo7s69h6Q94ChN n/Bcik7yUYAGKPWoJ4gyb9y2JHOlm3rrWIxUWSL2aRiRj/r9ibSL7T5LvAEYeCsBcvDi fDOZ7IovrDkq+U3UltW4+skli0Xy4Wvtq/2mQXSVLzzr4rE9w6hp3lWvXXY5FhSZRm1+ 0qepDYOH9luRPwTNWjBo4zd9Jn7KCbBeBfcyieczJvodOM4r9Yuv17uNRfq2vPNNGAcj wvg1H/UYaxTKbxkIrby6WlMu4PWFgRD6GAtUzbXn3rmnV43/htX16BeMvTP/XPlmjH6F XnEg== 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=27Y/3dF94+Cm6VsgYrXb3WffaYznVRIrRKIsZki0OWQ=; b=7XdaME/AXxjpTXNgnxsqXNIFw69S1k+qkT0PVCOvnTC4KRglgCZgdpOl55vlGGemCn L0UYy5Yu1SwVebdaHfvkBI2frZl/oddCrKU4xGbJbDxbJ2QZkJpfkRSsQiF6jBH/rC0p VTPCyySo5JA5710b6/jT+amuqH8td1fv7VmITDr9+De8xuNrvE+R8YTyc+gHzuxFKaoO 3iy+D67P4my6zJyfzOoK2LWwjrjcEMhykMajhcqhEwIXwW+6aM3OSb1NrGoDBHpMsv2z rEhoSYoVOkzhpOH8BsAi1L2/scOBHBhBfb3TQmLq0MO/6kEQBYur2ooG7uMOzImWE+7M +fGw== X-Gm-Message-State: ANoB5plGpvxGOcC5Ho23TLOQa32w+XQ9Un2uD3AkDFT3Qq/mlPI84nmI URqMq4rRP7o+vB6dirdj66/8cQ== X-Google-Smtp-Source: AA0mqf69CXjewIeRpNzNev2em/khtbWChfmHSS0jstlGQT/jsPxEEfH6FaoJCa9gp8/qvh1dU5m5yQ== X-Received: by 2002:adf:f352:0:b0:236:7cdb:3c8b with SMTP id e18-20020adff352000000b002367cdb3c8bmr13444835wrp.280.1669112509815; Tue, 22 Nov 2022 02:21:49 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:e011:9e81:66f1:3415]) by smtp.gmail.com with ESMTPSA id o3-20020a5d4083000000b002366e8eee11sm13432873wrp.101.2022.11.22.02.21.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Nov 2022 02:21:49 -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?= Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org, Bartosz Golaszewski , Konrad Dybcio Subject: [PATCH v2 09/15] tty: serial: qcom-geni-serial: drop the return value from handle_rx Date: Tue, 22 Nov 2022 11:21:19 +0100 Message-Id: <20221122102125.142075-10-brgl@bgdev.pl> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221122102125.142075-1-brgl@bgdev.pl> References: <20221122102125.142075-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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/qcom_geni_serial.c index 658b6d596f58..d5c343b06c23 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 console *co, const char *s, 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; 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 drop) { - return -EPERM; + } #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 qcom_geni_serial_port *port = to_dev_port(uport); @@ -557,7 +556,7 @@ static int handle_rx_uart(struct uart_port *uport, u32 bytes, bool drop) tport = &uport->state->port; ioread32_rep(uport->membase + SE_GENI_RX_FIFOn, port->rx_fifo, words); if (drop) - return 0; + return; ret = tty_insert_flip_string(tport, port->rx_fifo, bytes); if (ret != bytes) { @@ -567,7 +566,6 @@ static int handle_rx_uart(struct uart_port *uport, u32 bytes, bool drop) } uport->icount.rx += ret; tty_flip_buffer_push(tport); - return ret; } static unsigned int qcom_geni_serial_tx_empty(struct uart_port *uport) -- 2.37.2