Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp861953rwl; Thu, 10 Aug 2023 02:50:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF9bXPiaJJxGu95YVoFdTQz5LzOcU0PYDlVCCZdk3txEXJqliXRLqQwJ79W4lFHfYaoElbd X-Received: by 2002:a17:906:8467:b0:99d:6a8a:6010 with SMTP id hx7-20020a170906846700b0099d6a8a6010mr888927ejc.18.1691661007007; Thu, 10 Aug 2023 02:50:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691661006; cv=none; d=google.com; s=arc-20160816; b=eP5DAd6rndr4+eF+b9WyBJxJbvigQDoy81rUj3W/N5OvXpq6/czyA647S3QlGIpyvD DWMjl/ivMmO60k355FfDV5Dgfe4lQYnQVW4XXqHSp+oD0s4SnBfyaBjT9jglkkhYvZZ9 G9HH19L1YQ5lBA7wbxKuRBB12wRkzPZiNzC5iAn3GnDTqj6AUxG65q7tiyAll+Yq2B6A Blc0A95LKR+K9w48RyZ1MGSsZkqzh5QuOlaiVbshDfK1l370SPE8/80TWNQgKKYhiN0L s+FkWvURw1ImuJOK+W9n66r4wKk+p5+AfJnx17AUGnSIrO/MFMsDGuwQvxsG6FvwgbR9 ivIQ== 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=zNgsRNqjhmxeu9m1auetXqCTEFrXllGHCc2VmkUCoGw=; fh=lef0SKqJ9TeEnE5H2rc9PzU2lkIvQIAwl0aJjd55R44=; b=kSPpIId0tOzzVU7aMNPKSJfwl+Zn3CliJZvjEGmQJnMmtch0gIQvsRq2sslfifPzmm +PznTr1JLFrSRmaPq+6Qg8weZtkP3awxD7/JkVz2gPhRdspPgwwiLm0tyu1AoadfK+lg wJJyrz2yxTLiAM0bmBdUv0yegAemJdXegtaXmUKXKk38tFJPVbkNTPIQzpXfuimyCpiT iL5isSP11qXe8HTlV+O6Q5D9x5zNpHBJmpbt+GIXXoQ3GLSf04n2BVL4Da0pLxKPlVAx l3LSQnk/iGUqjHZXj5fl9VxlrFfca9xZkTl+rfYh5nTgjd7ORuCnHgEvr1ISoG4hRVJm CFzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hP5xy9qQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jt22-20020a170906dfd600b009938d70d887si1203101ejc.382.2023.08.10.02.49.41; Thu, 10 Aug 2023 02:50:06 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=hP5xy9qQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234459AbjHJJP1 (ORCPT + 99 others); Thu, 10 Aug 2023 05:15:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231978AbjHJJPR (ORCPT ); Thu, 10 Aug 2023 05:15:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8837268F; Thu, 10 Aug 2023 02:15:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6041160AC5; Thu, 10 Aug 2023 09:15:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BC83C433C9; Thu, 10 Aug 2023 09:15:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691658915; bh=CZajqdlnuQLGSP8OF/sy5Bc8OOCBVj4Sq5gOsBqQoXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hP5xy9qQ0AuzPgNRFk/u13wTsSjqQGH8sSq/aE6ItLhz+9knE/bvXWsQ/d12UqgMS ZIjQ6vXmCzXMn4dLwNluDurewPvlTCvnT1NY21d1JSuwyCx2q6TJQSqCRAYXfNO8Yb WFksH3YKG3qx0PJ2LzxUMX9R4jDLuvbLPgcgVv8OiwtEfYa6iPj3Bgu5y0UVipOaSt ombYXIapoPPS2dtlyzC7ve/Ph7IsLfXpyFzri0ZlnKWiSLI9h/Uy6h671NAOsqKfzx e0yXjrVBw4/Cf+IYKZJkcQC8cX1VzLy4ztHBRzXmN713yxlJS625pX8HDdt+1E1Q4M p7Z46HzH4gdew== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Chris Zankel , Max Filippov Subject: [PATCH 01/36] tty: xtensa/iss: drop unneeded tty_operations hooks Date: Thu, 10 Aug 2023 11:14:35 +0200 Message-ID: <20230810091510.13006-2-jirislaby@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230810091510.13006-1-jirislaby@kernel.org> References: <20230810091510.13006-1-jirislaby@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 All ::flush_chars(), ::hangup(), and ::wait_until_sent() from struct tty_operations are optional. There is no need to provide them with empty bodies. tty_operations::put_char() needs not be provided if it is the same as tty_operations::write(tty, &ch, 1). So drop all of them. Signed-off-by: Jiri Slaby (SUSE) Cc: Chris Zankel Cc: Max Filippov --- arch/xtensa/platforms/iss/console.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c index 10b79d3c74e0..b40b73809dd8 100644 --- a/arch/xtensa/platforms/iss/console.c +++ b/arch/xtensa/platforms/iss/console.c @@ -82,32 +82,12 @@ static void rs_poll(struct timer_list *unused) mod_timer(&serial_timer, jiffies + SERIAL_TIMER_VALUE); } - -static int rs_put_char(struct tty_struct *tty, unsigned char ch) -{ - return rs_write(tty, &ch, 1); -} - -static void rs_flush_chars(struct tty_struct *tty) -{ -} - static unsigned int rs_write_room(struct tty_struct *tty) { /* Let's say iss can always accept 2K characters.. */ return 2 * 1024; } -static void rs_hangup(struct tty_struct *tty) -{ - /* Stub, once again.. */ -} - -static void rs_wait_until_sent(struct tty_struct *tty, int timeout) -{ - /* Stub, once again.. */ -} - static int rs_proc_show(struct seq_file *m, void *v) { seq_printf(m, "serinfo:1.0 driver:0.1\n"); @@ -118,11 +98,7 @@ static const struct tty_operations serial_ops = { .open = rs_open, .close = rs_close, .write = rs_write, - .put_char = rs_put_char, - .flush_chars = rs_flush_chars, .write_room = rs_write_room, - .hangup = rs_hangup, - .wait_until_sent = rs_wait_until_sent, .proc_show = rs_proc_show, }; -- 2.41.0