Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1627693rdb; Thu, 7 Dec 2023 04:51:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFaKAc/oOqCM5Fn8UdynatlEBfRWSr9JbgR39D+JeNsLdcUUO2GDq7AcEEqpnnuKbsy+qN9 X-Received: by 2002:a05:6a21:609:b0:18f:d75b:80bf with SMTP id ll9-20020a056a21060900b0018fd75b80bfmr2685612pzb.50.1701953488119; Thu, 07 Dec 2023 04:51:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701953488; cv=none; d=google.com; s=arc-20160816; b=Vj8FCaXkOo1SBqF6SEiQ/kYFJsWA9LxhqXp5zgChzGl/MCdIWPph3Sr8nt8lwg2jfy qU6R+6TUEWlKYrCobqtEUJD3bJdwMADV05St5jaP5270L3z+6mPKCuOHKSB5HxZeeiW5 EEZJBi8tP0QBRqxPqNjV8L3bvcjhC65EpH/z2Mhye15UDE0oc68S3uBkKv9BO0uZhx+R KYOFggBlJ/3JUrnLNmVgFpK631yTbZPqCZzk5tlFQvQwRMq+3jfis7cSfr1j8+TcVIMN ZThwWAlH1fDtzsj2ZJOGqKGO0AJ6dh4DQiRnFGDLZWASrauSgd/Bvc+dADX2dePbOzJR WYVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=CVEkM23hjae7nsTNKuhVErSpiQMKYeYSvZo43c/I6rU=; fh=PxjcL/ZdiHiVcm76ua20Djv7HwMfZdoMlXIc51BfpOg=; b=moDSlbxh9MOmlv2Waqafse3JUiE2iQ+5B1QtcUiKCjJDo0o5riney0++l5wR4zH5cf KhDTb0ZYsJn+3IdZeNRXxUONaHu+/CJe29W3h0lBzGFJ/fieB1QPtS8x9nVrS85CIof5 RlWW3lGwxF9gAl8dCL4x6mAqqwgCR1eL+QrbuS/9X3mt6QRMQ3snrZFXiNM80MsGijRR uX2ie/ErqEXv8E/vgh/KKaaVisLUQXGrM6ebdtdSMXW07Cvyq4h5OHaDqSKcTm74Iwp7 Lipb3UHX5u7BK+NGnSJPcqXLXotcTIXuWeRJXhlLcftOok3m8fuUE4kRBF5m52lmdkDE 5CYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VfZ22qTY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id 31-20020a630c5f000000b005c179c00758si1150031pgm.891.2023.12.07.04.51.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 04:51:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VfZ22qTY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 7922F804C574; Thu, 7 Dec 2023 04:51:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232674AbjLGMu7 (ORCPT + 99 others); Thu, 7 Dec 2023 07:50:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232666AbjLGMu6 (ORCPT ); Thu, 7 Dec 2023 07:50:58 -0500 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A208010C4; Thu, 7 Dec 2023 04:51:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701953464; x=1733489464; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=qZHsWoDGythR+xpoV3du0UBWiGRf3tb4+oh+E8eq000=; b=VfZ22qTYIByY9zYexwiRhypIN8L7O+OfFiLQJNlzx70FtMbYHW3UXUYF r+yxv1h1Dy1O7lMqOcseRwDZnIrJ1b698v1aRW9ueoZhagetnhv9uh75o kV2QTmrYb9RZLBAb0h/H98MQ/5/MGsMhJc2+uxoB105xl/GkfhVLdO+Lf Yz0Abg6HIqn3gDYhNblIt4I1guKWjDRm5c8R/1UjxQnt+7rbl3AEVF3Ow Ul1BUJMlGnqp50LULap0lXNw3k07DOghXF6WEaFn32Quaov/Hxes8q5Dy SfCl1+l6+7g9nY/rfOuMGOjmrnnpRdgO4/Dxmhrg6X9ETyWXGBN5+tGwp g==; X-IronPort-AV: E=McAfee;i="6600,9927,10916"; a="1092104" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="1092104" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2023 04:51:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10916"; a="915567795" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="915567795" Received: from dkrupnov-mobl3.ger.corp.intel.com ([10.249.34.6]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2023 04:51:01 -0800 Date: Thu, 7 Dec 2023 14:50:59 +0200 (EET) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: "Jiri Slaby (SUSE)" cc: Greg Kroah-Hartman , linux-serial , LKML Subject: Re: [PATCH 21/27] tty: nozomi: convert to u8 and size_t In-Reply-To: <20231206073712.17776-22-jirislaby@kernel.org> Message-ID: <9246bc67-518a-72b9-beaf-3204a4a977@linux.intel.com> References: <20231206073712.17776-1-jirislaby@kernel.org> <20231206073712.17776-22-jirislaby@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 agentk.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 (agentk.vger.email [0.0.0.0]); Thu, 07 Dec 2023 04:51:25 -0800 (PST) On Wed, 6 Dec 2023, Jiri Slaby (SUSE) wrote: > 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) > --- > drivers/tty/nozomi.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c > index b247341bd12f..e28a921c1637 100644 > --- a/drivers/tty/nozomi.c > +++ b/drivers/tty/nozomi.c > @@ -783,11 +783,10 @@ static int receive_data(enum port_type index, struct nozomi *dc) > tty_insert_flip_char(&port->port, buf[0], TTY_NORMAL); > size = 0; > } else if (size < RECEIVE_BUF_MAX) { > - size -= tty_insert_flip_string(&port->port, > - (char *)buf, size); > + size -= tty_insert_flip_string(&port->port, buf, size); > } else { > - i = tty_insert_flip_string(&port->port, > - (char *)buf, RECEIVE_BUF_MAX); > + i = tty_insert_flip_string(&port->port, buf, > + RECEIVE_BUF_MAX); > size -= i; > offset += i; > } > @@ -1584,10 +1583,10 @@ static void ntty_hangup(struct tty_struct *tty) > static ssize_t ntty_write(struct tty_struct *tty, const u8 *buffer, > size_t count) > { > - int rval = -EINVAL; > struct nozomi *dc = get_dc_by_tty(tty); > struct port *port = tty->driver_data; > unsigned long flags; > + size_t rval; > > if (!dc || !port) > return -ENODEV; > It wouldn't hurt to mention in the commit message that -EINVAL initialization is unnecessary. -- i.