From patchwork Tue Nov 22 10:21:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 24251 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2118753wrr; Tue, 22 Nov 2022 02:24:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf7kbb/jC3jvrTHRlS2NDkZ1fb4of3kFgXd70EyLbW0SrLbKBcBXEz8+pg7R8ZTwKiEp46CP X-Received: by 2002:a17:906:597:b0:7a8:fd1a:c073 with SMTP id 23-20020a170906059700b007a8fd1ac073mr11200814ejn.4.1669112661122; Tue, 22 Nov 2022 02:24:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669112661; cv=none; d=google.com; s=arc-20160816; b=EX/Oul2fwOToP952+jlD3KxtsAo9hMKNehdy9qqaIN+DBbXpRF5d/JtdWFeLKjjLAN TP4BlHLdq8yHeIh7optAE9P5I4GENeaU10JTC1KPhynLkXSKujqPTupNW74IgiLaEG3q ml+y/D09fkmMSXwWv30xHbJA1f8Mv0JDT95EQRLGeVcuZEGCqUvwao6v01eXN7aKslHW MYz2BCiyZfwWNX9VDv0ApV5N5h8DnJbxAzNCV/9b5HHLGeCg1zDy8ZFmDV2e0TVncXZ4 hQu3MD/aHO1eiFax8l+DT83ANNvjQ9ne6lbUNnCVR3P7BNX+aKwmVxyFYixhZaFwDoBT f1gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=27Y/3dF94+Cm6VsgYrXb3WffaYznVRIrRKIsZki0OWQ=; b=EPInrLOBaRRHtqKj0VdmmQrzKShr4rq03z/muZZTx9pzHTuNm+2LQ5PS+/UCcC8aJp dmuENyAO6uTJ73/xuANF9UB5giSL7SdBdX9v6UeTG2Baud2Dpyf02iiO3Po+NgvS0QjD hf1U8Zw1Og5dGLE/U0F8xX84hg4UBX/jGfw1dFK1aalQd/O25NofXMcJ9SPU8B0t/S/V T/Dr/QXjK+oc+d6kJ5EklRMm2gh5THGV03TnEDlej6z+6WQoxM9WU4SnQVWjwbGN8676 Qys8ps/Vf0IJWJ3Q4QW/mPBYFBvjxvlZj06S3Rjlv1qUAV0czjmFxZUzLnGhavDCZtxQ hERw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b="p5tYf/k5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sg42-20020a170907a42a00b007ade82b9e73si1130870ejc.757.2022.11.22.02.23.56; Tue, 22 Nov 2022 02:24:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b="p5tYf/k5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233618AbiKVKXY (ORCPT + 99 others); Tue, 22 Nov 2022 05:23:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233569AbiKVKWH (ORCPT ); Tue, 22 Nov 2022 05:22:07 -0500 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B2933C6D6 for ; Tue, 22 Nov 2022 02:21:50 -0800 (PST) Received: by mail-wr1-x434.google.com with SMTP id x17so10515736wrn.6 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=6gOw/W1RbSaIbh5VuaWxN6eY87pCHRU8DtvqTpR7kl5EaVTUGZnOwIaAnxU1zJL8PH XH3XBb+fLJsGFa5eQt+TbHLavJEZo04YewrkyHzeQH+XtKyoTmaDyi/qjwwVYCFOTVie 9U5hXrxPDPLXXvCNkLW56ECFKerV8yjg9TeCcGvPT1vEVif6fSTl9NbdtRvbLS52mY5d 6keHVIsQe8HHrXxf4d2lBIunmqbykjcNhZDyQo3dkz9frGXQWbc8S/KPMCcWAe3y/fqe UnyXTK/Y+5B/oNCz4MqSFeREQMJfG+vjybTas8x4gTUnxESP0SUqz4mSJWLhlUJgT/Q9 VhxA== X-Gm-Message-State: ANoB5pnoHiMaMD3AEnyiMkluVHQt1+o0Na8yCJUJbgi716wIAF/qPmFH pOqSH5PU41fOwoYHTbo5nOTOGw== 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?Ilp?= =?utf-8?q?o_J=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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750191478138705875?= X-GMAIL-MSGID: =?utf-8?q?1750191478138705875?= 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)