Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp252449rdf; Tue, 21 Nov 2023 01:24:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IFlcuAMivr4g9hduYOWf9hEWqerlqlc62Ianmj6WEQiZx2W0Xx3U8lY7B2E4fpkjwTbR4if X-Received: by 2002:a05:6870:1811:b0:1ef:b669:ba1f with SMTP id t17-20020a056870181100b001efb669ba1fmr11922396oaf.8.1700558690572; Tue, 21 Nov 2023 01:24:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700558690; cv=none; d=google.com; s=arc-20160816; b=iKhZNo/8suwJuX/nbVEITiY3kwe4WoYoQUpLE1j4CsHF2DyiRpR0NncOQFC9MUW2Gi fVP7QqwFjnAdNmDQmRrrkOnuJA+oYzzu27XcepGIaMgD9sLbS9c2+6kN8Boh7ley64oH aGH6YfxJm6VjlYGPJlOJ/db2HgXrDQ8iteSKD5T2uncb9LkxU/Ye3I3MZjcj1b51ChU8 pIfGNRg9UIhFgPmCqIgKTi+WhcNC+eV1+qoO9XBIbRicWxCGx+VHBkh7cUv4ch9OiB0h oZrfCMiUZbLSahu3mgrq4mc58h9xO8zSp/jcxF3KzeSHFw3wOVd1YgYurQOVS6fGOvBa Vuag== 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=pGwx4I9lhgGTyAJHqDiIfMjCFmUH9ARASIftsQbPQiI=; fh=1YNwm5KBWetjB3qGkhgLqh/dZnCTsWuqRk83JW6hjgE=; b=yaYVQQzCDC+bV+ALAU8kLL5+JkEzlm9BU7yJaPo/8ZWhHSLX/xXXY83O6Wa9zpz7nI ST51SCa+oJsUxEO/6LaSuc560kGRJoQIp2W9ohiWrO+yUl7Lui485pMloFRxdRjnM764 RXir+Xl2vlXWPHDSutUGVFwR8MGTdatGXN8A63HXOWLocpqpSJwNZ6oua0vZYNG+K4+R qPWveHIV6WgVk0HO4K8K+5AyafB4UlycaRLAVpCIFWkVijPrMC6hAzgIjY51LzBqInCv X0QXRWy3W0ZoNKSkB0pnScvW/r3DjmwjcSqfkW1hdsQ4fgHOap1+NJSKiTK1MKO4lonR bjzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P7pHbyN1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id cm9-20020a056a020a0900b005c200f02d9asi10721362pgb.621.2023.11.21.01.24.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 01:24:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P7pHbyN1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 9700F80CE7C8; Tue, 21 Nov 2023 01:24:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233530AbjKUJXc (ORCPT + 99 others); Tue, 21 Nov 2023 04:23:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232465AbjKUJXT (ORCPT ); Tue, 21 Nov 2023 04:23:19 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7C26124 for ; Tue, 21 Nov 2023 01:23:13 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2ED9EC433C7; Tue, 21 Nov 2023 09:23:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700558593; bh=diBYhCi9kUrJKVnjd9DDPQZOesiKDAPdnCFzVrk5K90=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P7pHbyN1kipEeAiP5eyb3QNVHhjVJF4v58x162jD4WQLSJpJoJdWhkVXwS/eqZDFm pkeLgM2theJsap7u7hBHAQfjM2gd01rkFbl7/52L6Oip9jzfbdAICc8Y9wC57tXDsa WgFvqB2CP16SRGTu4N1nfqbXjs55+8aV0y1OpyEFbnIr+UfZsz7BBGetIsx3sG7qR6 HVuhnSNBr4Nu7+7YzMkQXyOJMzuvywcxoeqn59A8t4tOZSdTO0yNOfDt8Iae2Rgc9h IhgI6fF+4xPjYCNI09CMuoGcpzu1GPynvo8l3MNuzFJQABnKWiRVPPsU1NVQ7EX5Fe e2tnZt1gM47Zg== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH 06/17] tty: amiserial: use bool and rename overrun flag in receive_chars() Date: Tue, 21 Nov 2023 10:22:47 +0100 Message-ID: <20231121092258.9334-7-jirislaby@kernel.org> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231121092258.9334-1-jirislaby@kernel.org> References: <20231121092258.9334-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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 21 Nov 2023 01:24:44 -0800 (PST) 'oe' is a yes-no flag, switch it to boolean. And rename to overrun. All for the code to be more obvious. Signed-off-by: Jiri Slaby (SUSE) --- drivers/tty/amiserial.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c index b9580bb9afd3..a80f059f77bf 100644 --- a/drivers/tty/amiserial.c +++ b/drivers/tty/amiserial.c @@ -180,7 +180,7 @@ static void receive_chars(struct serial_state *info) int serdatr; unsigned char ch, flag; struct async_icount *icount; - int oe = 0; + bool overrun = false; icount = &info->icount; @@ -251,11 +251,11 @@ static void receive_chars(struct serial_state *info) * reported immediately, and doesn't * affect the current character */ - oe = 1; + overrun = true; } } tty_insert_flip_char(&info->tport, ch, flag); - if (oe == 1) + if (overrun) tty_insert_flip_char(&info->tport, 0, TTY_OVERRUN); tty_flip_buffer_push(&info->tport); } -- 2.42.1