From nobody Thu Dec 18 08:09:31 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9B5EC4167B for ; Wed, 6 Dec 2023 07:38:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376811AbjLFHip (ORCPT ); Wed, 6 Dec 2023 02:38:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229965AbjLFHiR (ORCPT ); Wed, 6 Dec 2023 02:38:17 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BE1D1BC8 for ; Tue, 5 Dec 2023 23:37:49 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1BA71C433C7; Wed, 6 Dec 2023 07:37:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701848268; bh=0jDTkca+DoCNT4GBW0SaHvJh6RK6c14dHl2xTDM0lig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bN4zps1VD14WaQ7L+ufCWjTlw7qYPRgdosdPmuF09qDmDabVcxBfBql5PfmRlNf04 acw8RjjRDLADlERmXTH33hG0KFUYN3Ud+D83B7WzaSZxzwxaPe7lzxamEwECIL6rWo UGQOfo/WgWHqi8mzdueDhb69q7nMF11EQ4D9eCpTqd7++hRMXwxI+QR02HastM8vdi YUjFzsUkoCGYz1Zua5hORZfqrlsKtduoDb0cAwujsSdND7nm88zNemME1jLsGf4+9a cN7gQtcoC5kafJNT2l0VO+eSoxiAR2eSVFfKzIP0HBqRW+YG73/X1RJx9h3zghZPag GC+G1rowjVVEA== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" , Vaibhav Gupta , Jens Taprogge , industrypack-devel@lists.sourceforge.net Subject: [PATCH 13/27] tty: ipoctal: convert to u8 and size_t Date: Wed, 6 Dec 2023 08:36:58 +0100 Message-ID: <20231206073712.17776-14-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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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: Vaibhav Gupta Cc: Jens Taprogge Cc: industrypack-devel@lists.sourceforge.net --- drivers/ipack/devices/ipoctal.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/ipack/devices/ipoctal.c b/drivers/ipack/devices/ipocta= l.c index da308be6c487..ba2e9e52d72b 100644 --- a/drivers/ipack/devices/ipoctal.c +++ b/drivers/ipack/devices/ipoctal.c @@ -158,9 +158,7 @@ static int ipoctal_get_icount(struct tty_struct *tty, static void ipoctal_irq_rx(struct ipoctal_channel *channel, u8 sr) { struct tty_port *port =3D &channel->tty_port; - unsigned char value; - unsigned char flag; - u8 isr; + u8 isr, value, flag; =20 do { value =3D ioread8(&channel->regs->r.rhr); @@ -202,8 +200,8 @@ static void ipoctal_irq_rx(struct ipoctal_channel *chan= nel, u8 sr) =20 static void ipoctal_irq_tx(struct ipoctal_channel *channel) { - unsigned char value; unsigned int *pointer_write =3D &channel->pointer_write; + u8 value; =20 if (channel->nb_bytes =3D=3D 0) return; @@ -436,11 +434,11 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal,= unsigned int bus_nr, return res; } =20 -static inline int ipoctal_copy_write_buffer(struct ipoctal_channel *channe= l, - const u8 *buf, int count) +static inline size_t ipoctal_copy_write_buffer(struct ipoctal_channel *cha= nnel, + const u8 *buf, size_t count) { unsigned long flags; - int i; + size_t i; unsigned int *pointer_read =3D &channel->pointer_read; =20 /* Copy the bytes from the user buffer to the internal one */ @@ -462,7 +460,7 @@ static ssize_t ipoctal_write_tty(struct tty_struct *tty= , const u8 *buf, size_t count) { struct ipoctal_channel *channel =3D tty->driver_data; - unsigned int char_copied; + size_t char_copied; =20 char_copied =3D ipoctal_copy_write_buffer(channel, buf, count); =20 --=20 2.43.0