Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp804844rdb; Tue, 5 Dec 2023 23:38:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IF9zLF3+PMUcWq8JRwbFJZDLRuxJCJ0eHVq18cK04U9u5dS+hkntvLC3QNJLd0pGVhIJvC4 X-Received: by 2002:a05:6871:4698:b0:1fa:f51f:e4e0 with SMTP id ni24-20020a056871469800b001faf51fe4e0mr607527oab.21.1701848328106; Tue, 05 Dec 2023 23:38:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701848328; cv=none; d=google.com; s=arc-20160816; b=dmlIGTRdpJUQUH5KA+Z2IhNiJ7MDWHCPpFKnf2rb/tXJnj2rcVxdMhF2NovFOJ1phf 6JEQoCoQw9K0H6iS04ae8Ea37RdJswb2AvpAO1yOp5+XXeSLWiG52j4hJ9HvJRDYLHM1 k+rsmXx4YilNwf9dIMJNpok8yW3+6PKOMjjphKypZwdryJnhtPnU+6h8d6+yBxW0b2E+ vCaG5AGVpqyl6r4vep5LPMpRuczLz5iX0S+1ako7MTi/Ek8HoH+t4GUElsMlOCsAdEQY y9D9Ca6dZ8+BQrs29SZ4ojBXXvpmT88uszjlJ35S6y/IdF+HxVDEN/HBJ1IwLsIUC/1E N6Tw== 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=3+zSDjkbgUhuEVxNBF7rDx2NTYa3TvKRheHyfZoHFiw=; fh=huxwEvEMuYN0smhsXEMROEwL5iJSk46It4GOnKU4+sE=; b=wR9WvoWDa6AHtcj56U5nLKWy6wW4OS/BrkxHnW4cwHRt8kdpCG1/G8QhN0CtLsx6EH 1p/ev3KZ3OQKJcxjQ2xvchFJ0le+L+ZU2JqF2EKj84qIsoMTdtEAksQWNPTyPID2CkIT xDKdKjXB4xVCLe4bm9ztQGcqdu7r6cN9SpoGPXWYNDataP4tuShnFfjVqjZd5WaYzJI5 PX+rNH9r8+3Cl195bjxr9uJ/UZHoQzredigtNmMJZV83CfZZxgNUqmsPSG32aSq8gb86 e+Sk81ju50ut0oB/+SVzD3OMSzVR0X00v1f8ms3hxqVzsm87X24ro6/DNIc2VYd0G7CA qaSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p6IQRDqk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id z6-20020a636506000000b005a0788d4a50si11056616pgb.376.2023.12.05.23.38.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 23:38:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p6IQRDqk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 0078782D1A9C; Tue, 5 Dec 2023 23:38:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376990AbjLFHiW (ORCPT + 99 others); Wed, 6 Dec 2023 02:38:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232402AbjLFHh6 (ORCPT ); Wed, 6 Dec 2023 02:37:58 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0F6419A6 for ; Tue, 5 Dec 2023 23:37:42 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16B3CC433C9; Wed, 6 Dec 2023 07:37:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701848261; bh=18JyKq4qj/ln/rCT3pVsLeqjsPFlBw+nKU0XPRGVwY0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p6IQRDqkaYUoPif/d7W9DRIcT9jGBoIc5ICU9urWmi2ZRus2ETMngmAZsTHKOW0To rLG45RiEQcK1kwmt6j8cYToPebcY32H8QRWMylgVKvixxlqgv/RjnmOpPPRMpM9Pam clpS7FkXgElpDEbUkhIQnwF1oJ9lr5zwiPDIrWzPzGNOOsES30u4YDSCJVdsLnYy1f NvbtSPIITiYZisvRQV7jG+tbbo9cpITSVwJI0bKLQJZX/G8VH1xB+Am3COfhw0Uc+E PhzQSdXnEErWlY1yMEY5+Scs3I8k6cOkD5p1NIkmv4DN7y44EoylEGfPKc/kUCvl3c QwIsT15zKSayA== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Laurentiu Tudor , linuxppc-dev@lists.ozlabs.org Subject: [PATCH 10/27] tty: ehv_bytechan: convert to u8 and size_t Date: Wed, 6 Dec 2023 08:36:55 +0100 Message-ID: <20231206073712.17776-11-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=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email 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 (howler.vger.email [0.0.0.0]); Tue, 05 Dec 2023 23:38:45 -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: Laurentiu Tudor Cc: linuxppc-dev@lists.ozlabs.org --- drivers/tty/ehv_bytechan.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c index cc9f4338da60..69508d7a4135 100644 --- a/drivers/tty/ehv_bytechan.c +++ b/drivers/tty/ehv_bytechan.c @@ -49,7 +49,7 @@ struct ehv_bc_data { unsigned int tx_irq; spinlock_t lock; /* lock for transmit buffer */ - unsigned char buf[BUF_SIZE]; /* transmit circular buffer */ + u8 buf[BUF_SIZE]; /* transmit circular buffer */ unsigned int head; /* circular buffer head */ unsigned int tail; /* circular buffer tail */ @@ -138,9 +138,9 @@ static int find_console_handle(void) static unsigned int local_ev_byte_channel_send(unsigned int handle, unsigned int *count, - const char *p) + const u8 *p) { - char buffer[EV_BYTE_CHANNEL_MAX_BYTES]; + u8 buffer[EV_BYTE_CHANNEL_MAX_BYTES]; unsigned int c = *count; /* @@ -166,7 +166,7 @@ static unsigned int local_ev_byte_channel_send(unsigned int handle, * has been sent, or if some error has occurred. * */ -static void byte_channel_spin_send(const char data) +static void byte_channel_spin_send(const u8 data) { int ret, count; @@ -474,8 +474,7 @@ static ssize_t ehv_bc_tty_write(struct tty_struct *ttys, const u8 *s, { struct ehv_bc_data *bc = ttys->driver_data; unsigned long flags; - unsigned int len; - unsigned int written = 0; + size_t len, written = 0; while (1) { spin_lock_irqsave(&bc->lock, flags); -- 2.43.0