From patchwork Wed Nov 23 11:07:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 24909 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2724373wrr; Wed, 23 Nov 2022 03:15:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf5sZasZDbkQaHXmGyFO9zVzS4yLGfJrCY8t5nlerj87LGI6BmIqYq9GNRGOSbYDW65opRZ5 X-Received: by 2002:a05:6402:e0d:b0:466:4168:6ea7 with SMTP id h13-20020a0564020e0d00b0046641686ea7mr24424310edh.273.1669202100939; Wed, 23 Nov 2022 03:15:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669202100; cv=none; d=google.com; s=arc-20160816; b=mFuMB589SmJQ11D7yVvpjkb70uzFLzuO0Ws9TeZoOFSLuFBDVKULGBjT2Xej/2fymt Y9eRF+kLhfhz+9c/4dGJSj9E5E8+M06w5ZGyWPWJqyvJMog8DA1W+Q4gLdMNqEsgzdmv ppxjkudSioUAqtYHRwkjFqGxJHDKkE/0TdrCUYX4YORezfPXfsLtEuqut69Mc5ChP2gc 5n4njpf24sfpUaIAdZOQA19Ojr/2388Jn1b19c2io994PNrpjD9xu9CEFoujc80Aj+CU vzc3NUTKdnxZFE4UUMhvdhc9A+qTHsJ1OfNdjgNrtRwh4MeT+5RUOXWobjzL49e4rnWF xCgQ== 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=hsWoL5OCJnBrL4RXa9orXNr8FTWF14hrOesDUz07Zzhtc3IMYB7wAZGUyg/IeAfJuS n2J0P4BRovkteOos9eCRc02XMigAgYnaH4ZGqMHDl+sFiqVfIQsUND51xWUd+OSSXfsa kiQFV6HjEvc7TFhi33eOOptap9AcJrF++JJHg3nwESX8GmMQHZpwZJY2DjAamnQXrZZr YeTZGre7wL5/5SuvqaCDeP5UNkVwJ3VwfbpAIaBDTsvS06kClWX4jKUd1C1zXGWuAKbq rHMLH6QqzMAyeCEUf4icU1+IvXKNGXoNbVouOyIbKC9aEi8gnQeU1gyI+4jkhMIyo+uQ WBkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=Cc3DMUi1; 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 hr13-20020a1709073f8d00b007ad95fdd21csi16125277ejc.761.2022.11.23.03.14.35; Wed, 23 Nov 2022 03:15:00 -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=Cc3DMUi1; 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 S237523AbiKWLJm (ORCPT + 99 others); Wed, 23 Nov 2022 06:09:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237631AbiKWLId (ORCPT ); Wed, 23 Nov 2022 06:08:33 -0500 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B31AD9E96A for ; Wed, 23 Nov 2022 03:08:14 -0800 (PST) Received: by mail-wr1-x42f.google.com with SMTP id g12so28816922wrs.10 for ; Wed, 23 Nov 2022 03:08:14 -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=Cc3DMUi1+c91wbdCi+9yhbPRKydM/WD64VcFUqJSe/t+SDR0m8l26JNYNHPgO+3QxH 0i52QRdKTKqJfUxlWqlVcx+GDxMnF09QUpCHZK3OOYYn6JK5DOZWhFbgcb9Aez6ruY73 OwTp59On3Wv2c/b6bg/BB5e5RU6tRNy3yyvc4pVzyMBj35P80IhBaUBFeAYSJebUGBLs q4I8wtVjpQgeNRas7D7KX2A2o+jgu0cX89ItAZ0sCKHYFx0jpJNKunr3HlqHz+PAJwhQ jzC1mmkSC/XD/BSChddqxSlVbox2M80YP6L0RvwGC29dzQ5zonGnsAsczpPI+05L2r5e kneg== 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=wMkvNbQmgWw07LiDqR9znYkIsYaBeEpSy92uar5FMESg50vuYzJi9v7eMVbVC1EohD TFT2vDuQJ8jqowuTUdFRGf2ZDjn+68Qmk8rMZYqWAqGqSRZmdcPhiOetp1ruYrcqUOfr vL0cnAF0hLwDIb7ZMbndRYt2WraW3QimLbB8WXq+TPmWICvxnqji0a8pE1bWgIGiAW9R A1iiJ8kh/z2BL9pScwYq5AxPBkJXDeEXCont2L6PRXKUpp9fHDqfhIsvb/04dS9qHGW0 /ecSG1oyFJ4aWiWxDw6291hQn2iRBhXUdi1pfyei3U7P0a38iWqWC7hLQSd23IYAoYbG R9aw== X-Gm-Message-State: ANoB5pnx1ajM1Ni8UBIzQSOSHL6vQbi158i1jCMw9fZd7r5sG3SvhKIX vuDtiKyOyurJTf/ostFsfshd7g== X-Received: by 2002:adf:f3d0:0:b0:241:f721:3ba2 with SMTP id g16-20020adff3d0000000b00241f7213ba2mr399710wrp.681.1669201693316; Wed, 23 Nov 2022 03:08:13 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:ae74:d94f:4677:3378]) by smtp.gmail.com with ESMTPSA id f13-20020a05600c4e8d00b003c6c182bef9sm2560406wmq.36.2022.11.23.03.08.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 03:08:12 -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 v3 09/13] tty: serial: qcom-geni-serial: drop the return value from handle_rx Date: Wed, 23 Nov 2022 12:07:55 +0100 Message-Id: <20221123110759.1836666-10-brgl@bgdev.pl> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221123110759.1836666-1-brgl@bgdev.pl> References: <20221123110759.1836666-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?1750285262421945644?= X-GMAIL-MSGID: =?utf-8?q?1750285262421945644?= 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)