From patchwork Tue Nov 29 11:00:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 27179 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp264362wrr; Tue, 29 Nov 2022 03:02:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf765v6vWs1Iqr+wH7Jkmz0FKg+pLXaFDWtXStePwQtMiUTbecQzznDMPbQmmWOnYR0+4tZ2 X-Received: by 2002:a17:906:2e82:b0:7ae:44b2:cb7f with SMTP id o2-20020a1709062e8200b007ae44b2cb7fmr32751301eji.437.1669719764339; Tue, 29 Nov 2022 03:02:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669719764; cv=none; d=google.com; s=arc-20160816; b=Bs91TLuK3unDoP4smiC7vi2vesbepbZE15j/6W3gU/+5cNp0qZMfkUiFmScx/uC+b/ 1Qu8UJ6HJ/SuK688sRavK1AWZAM/9aRElyYMUyGbdAnC7gHOESTR/lbGfS3Ac6QZDsO1 435BswVLih97gSHx9b/0EMQ1pF2t2mAGJ8+K/q4qeI6JhVplGqRX1WSk6O2b5HBLTgPe 4WM8gkzM8Rgd2Dyehfckjf+GQ9XXS2sVF9z/ICS0Ex5IDnSn+7uLvK2xQoW7XLgcSX87 rnpDi4TZ5C+8njbTrX02di5wgKllPi4xQS0UgNHlB0S3Kqx2+gOg16IWBdMAGsxZyi9H wwGQ== 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=66v9x+ssuHFjAFxgnTX+6F9++y0ILnIqzqCVl0hnLGk=; b=wDGf78J+FKfBe8jPRe0nWOgC+fMvuUPJC8AKCRHRjtGofb7gtR7G2j8MkQNjCYxPlE VbQUD8xI3igGLZh/79qcrJm6RaBumw0RiR8EPN7eEeIfhu/eq11WJB+ns55TNdDVyzfS GjFNuZYA3JMFON0Y0i6a5X/uonIWEA5hzF2S1omm7ZzhcWN3xvypxyzTu3HQRsGH4FYG iCyuYu9r1nC263H1Wk4umkfxsWjxyD6TqAd4aUX1tdRzngxOAEZGQm08R6MkQXGff4y0 BFXLzSXmkGV3qNWZR6EZhmmwMaoQny83+3dx7YC3ZHazw0C/vYdkUnhWGRTEP91hjWOl AJlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=nJxnN147; 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 u13-20020a50eacd000000b00457f9c97f13si11029488edp.581.2022.11.29.03.02.21; Tue, 29 Nov 2022 03:02:44 -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=nJxnN147; 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 S232607AbiK2LBN (ORCPT + 99 others); Tue, 29 Nov 2022 06:01:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232600AbiK2LAg (ORCPT ); Tue, 29 Nov 2022 06:00:36 -0500 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAC3560EA7 for ; Tue, 29 Nov 2022 03:00:26 -0800 (PST) Received: by mail-wm1-x32d.google.com with SMTP id m7-20020a05600c090700b003cf8a105d9eso10484096wmp.5 for ; Tue, 29 Nov 2022 03:00:26 -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=66v9x+ssuHFjAFxgnTX+6F9++y0ILnIqzqCVl0hnLGk=; b=nJxnN147YI4mzY6o9hHsv5BlYQ5y4BRZhzfsWsjUEwHB0BMxXolS5MRfwu55m3U/oN FOdG7hTyOreuh1+iD5UG9fZJPvWvMAA2WbWQWTas+sJqFYw8UUDxRg400OAPclT4lkfu nwwDm5R0qEXDBEeja/7O1MIgWFlDlCsLa4DBI3GtTlVYPQ4UKC2D6+IriQ46HXWSczYe 9yYpoRZtgYShJPkHgxhkwmBFSLUZPP++p0+yVtbeAgfC7XaeTK6nfmalJN6oLN04fS6P I2vbP1k1nhxFiZoJLyrigjQLawnKA/NY6U5J9l1ZabpsUB+QQvre1Y3OZIE8Ux7L4796 NbfQ== 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=66v9x+ssuHFjAFxgnTX+6F9++y0ILnIqzqCVl0hnLGk=; b=pj317lNJqlWX6VfK1VHQ2Fs/vgPWwJFyxU6IXhV2JOcXldhVEcNqwt3rrA2gdtGi4L SvPbBDpjK3avk182Efz3mfwLTs8nr2BE8bMWpzgSRTjNwceI5f41k+7ynyBYGXVv8GF9 6h3nT6JpVKU8ADGspAYIUHSPaz2Lo+1+OOkoXdJr0daJqF2rS92eCbuoC/EAr1ZV96oB VkoDE5NOPmzy/oyCrIdlTh6+85KrF+POw3RKxBvexV9ui42LEzOSrnQarYiyM8Fk8RKh Q2NzduT59QZ6J0tnWjKW4qL7vLhrxaI1i6s93Dna10nBSbSb3TzLQ2To4tcYgIfCDaqZ EMtg== X-Gm-Message-State: ANoB5pl0SXaHWxxlqREawXCQhvP7/MJPNEj94AlnsYGD4JfvXQeh/NI5 9v4d2ryAXEt+9zDt1vt/SKHZww== X-Received: by 2002:a05:600c:3d99:b0:3cf:cab4:a42b with SMTP id bi25-20020a05600c3d9900b003cfcab4a42bmr27202310wmb.36.1669719626501; Tue, 29 Nov 2022 03:00:26 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:6b19:1d8e:fbca:fd02]) by smtp.gmail.com with ESMTPSA id q19-20020a1cf313000000b003a3170a7af9sm1617658wmq.4.2022.11.29.03.00.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Nov 2022 03:00:26 -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 v4 09/13] tty: serial: qcom-geni-serial: drop the return value from handle_rx Date: Tue, 29 Nov 2022 12:00:08 +0100 Message-Id: <20221129110012.224685-10-brgl@bgdev.pl> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221129110012.224685-1-brgl@bgdev.pl> References: <20221129110012.224685-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?1750828071232739036?= X-GMAIL-MSGID: =?utf-8?q?1750828071232739036?= 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 ece5b4d543fc..7d6330f85ec2 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)