Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp805399rdb; Tue, 5 Dec 2023 23:40:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpdEeVfCD5aFJse50OMBMTCuR6z6gQYh4vqyN1laI13qp6HmPbGnXaWMjWVV7AUipnF1ES X-Received: by 2002:a05:6e02:1106:b0:35d:59a2:2bc with SMTP id u6-20020a056e02110600b0035d59a202bcmr611652ilk.92.1701848425536; Tue, 05 Dec 2023 23:40:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701848425; cv=none; d=google.com; s=arc-20160816; b=KfYn54W23gfyf47NlERoOl1EZVIMidfqFMZIBHTWPg1K1I5h+sA9XZF0vDcQbEUeQO q5Uoob2Z2zBP3zuboKHjlrmUbTsTL8lWH+xYTYXWCSFUi00FX/6y1gt9LQN25yoE9fS9 3djJ9yvFxUFeGFUrfAPstHkrd9lwGDDdBzWUeOEMYAXUhoBifpOhxrs6HKqyuaxN6c3S HjyYODCs5qicj2VpLPOimgNBHaC0qnHxqUT6QV+Bsn9ILqhF4lPBmHc7msCFelJKLZiY WuhByBX1s91+R/nZnKVl4ZQCgEQFR6OY0uzkbCkmHZ2+9aauMcqIq18gEwitPR7NZ7xt B5Lg== 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=kYzWuEmpI1WBTBXz0wlskVL57CCzm6zeq8Tz3Jhqe+I=; fh=Omeij3RQJitYcv5r7VTxN+idsQHibM7jPsz6z3jqTjA=; b=ydAqKQvtimAEi3ps+JGUj02OMCI3yfgf6ZWdMy5j+7i+EZ3Yu1IP0x1RX+F+ppbSqN 67Yue34JIJCqTC/8ZdfKPBT0r7bcm62VxrjIvCyyNCYWajyv0vs5+5K+4eJx9wBmkaES 48VTsPGQ8xVeFIyOI5sKeTw6rtUluPDRmoX+PGl6JjWFJSQQzhl4ZtTEQy+h6Jt+Tv0f w/RccF4WBdOFUQ+G/Rfjwx7ICFt/b+EZGpZXzF90RQVfxB4yheUqis4JKc7j3mxOGYoq KQIbzwGDOOJmGiAj0aMZNo8MAjYTRohD+VmbHxELk8Jp7q9Y3LOSrYwWtOYZZ8XN6K3z 3Eqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="PWa6/T75"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id e2-20020a636902000000b005c6bdb5b9d3si952840pgc.758.2023.12.05.23.40.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 23:40:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="PWa6/T75"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 474FF802D527; Tue, 5 Dec 2023 23:40:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232312AbjLFHj6 (ORCPT + 99 others); Wed, 6 Dec 2023 02:39:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377059AbjLFHjK (ORCPT ); Wed, 6 Dec 2023 02:39:10 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32A9E1716 for ; Tue, 5 Dec 2023 23:38:14 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3078FC4339A; Wed, 6 Dec 2023 07:38:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701848287; bh=CuMXbzKLOxjnPUoex4ZYwcWf9IxiWz4OFePxU/919ps=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PWa6/T75Q9LLltQqWa4mzFG2zRFvKVqVDayW1IWCDOzJuVsKoGAhCO85bXCVgDM9/ +71J9LEskRkNhk0UZuNU9PsGwL0F3lJWGCb3729I86mVgysgMALJ+GomntIr26LCgw Jw/6uscQGdkOYxEowDhdfypDc6oTfTVp6+EjgGYI2E5Ok7kIe9ieLGKwiLFFXLdIuL BJmAsoFMLamiX7jYl7z9zjBcQtqBeJDFkq5I2lJrWbYm67Yrm94l8KRFAGMsds2bn3 k+rrLipxL9RQc2wQcDG5d1q3rrfhkwu3ZhMaIKp81SRwOmqC+l1clYHyO8DiHB3XSY WclYGuCqlCGlQ== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Richard Henderson , Ivan Kokshaysky , Matt Turner , linux-alpha@vger.kernel.org Subject: [PATCH 24/27] tty: srmcons: convert to u8 and size_t Date: Wed, 6 Dec 2023 08:37:09 +0100 Message-ID: <20231206073712.17776-25-jirislaby@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231206073712.17776-1-jirislaby@kernel.org> References: <20231206073712.17776-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,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 05 Dec 2023 23:40:24 -0800 (PST) Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. Signed-off-by: Jiri Slaby (SUSE) Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: linux-alpha@vger.kernel.org --- arch/alpha/kernel/srmcons.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c index 42deea53beab..feaf89f6936b 100644 --- a/arch/alpha/kernel/srmcons.c +++ b/arch/alpha/kernel/srmcons.c @@ -53,7 +53,7 @@ srmcons_do_receive_chars(struct tty_port *port) do { result.as_long = callback_getc(0); if (result.bits.status < 2) { - tty_insert_flip_char(port, (char)result.bits.c, 0); + tty_insert_flip_char(port, (u8)result.bits.c, 0); count++; } } while((result.bits.status & 1) && (++loops < 10)); @@ -89,7 +89,7 @@ srmcons_receive_chars(struct timer_list *t) /* called with callback_lock held */ static void -srmcons_do_write(struct tty_port *port, const char *buf, int count) +srmcons_do_write(struct tty_port *port, const u8 *buf, size_t count) { size_t c; srmcons_result result; @@ -131,7 +131,7 @@ srmcons_write(struct tty_struct *tty, const u8 *buf, size_t count) unsigned long flags; spin_lock_irqsave(&srmcons_callback_lock, flags); - srmcons_do_write(tty->port, (const char *) buf, count); + srmcons_do_write(tty->port, buf, count); spin_unlock_irqrestore(&srmcons_callback_lock, flags); return count; -- 2.43.0