Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6903955rwb; Tue, 22 Nov 2022 22:14:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf49ivq0uc1fZcS4gUQduy4mVt3XjPBppGmmRKwKW+IXZQsYUodJ3+PIHwKXOVaVitpaCbLI X-Received: by 2002:a63:470e:0:b0:440:69bc:c972 with SMTP id u14-20020a63470e000000b0044069bcc972mr6357976pga.86.1669184082471; Tue, 22 Nov 2022 22:14:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669184082; cv=none; d=google.com; s=arc-20160816; b=F7sUSFpW6hpBfElP+ITKoa6bstC9fl/F17DlpXxWZ9Z1aF7Bz1sz/C//WZfImBgTY6 ErnzXItVG7Ru6G2s2KqsjwdwZKGHAAWWAF965zcQo36dBd0VQn88eAC+ILgFeS539r0W EuK37s/fhIb+U52DwF6XIfBc0UG47yOEuDA3nFYPbl+YJ5ku4Jui9Hwf2LKVL9V021Gd eP7ut9lHQtWVncrA/xuL1NsIWXJZn4jMpHsqVKqYJ6TpaqLx9otTD617VYFr99Vg0A5l OtdxSOJs+ggl9GeahfgoFRt1lG2ajxqYqduQV4cyMih13BhepUADU+WsXCdCpSWO/dzk XdzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=ATGjR+WR/rvjQsAzn1FSqZfn3gb1osfEIFie0PtsarM=; b=qi3cAnVNR/72HwMddU3mi8oV2B9O4bHs4vyjGsRRkrUcOja7PS0lIeZeNKVzigR+rj IeWT1bWpiQJQkYG2aQhegclTL8ZpfbtRAhSTG/fWtL0q5UHw22wSjYlN0XxP8WZA6nGg kFQj7WnyiwZVVI3wjbvdkUTqOT12e7KfMLuGIpY+z3x//ocxP3nslzujf+L84jUCH5Yp pNUE5yb2P/VoQUAGcQzby2Pq1C6Z0lDH9eGN18VMvGs5z2GyxjaKT5w+mMFmjMbheYtP E9rcS9B8tmIVUyEEz2SjChH79eekH5+WWkVP+cVPekJqtbBiPqSiEtUavYYAbOpwQGW9 o3wg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h2-20020a170902748200b001732b4e99c4si13074277pll.377.2022.11.22.22.14.31; Tue, 22 Nov 2022 22:14:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235794AbiKWFjr (ORCPT + 89 others); Wed, 23 Nov 2022 00:39:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235828AbiKWFjo (ORCPT ); Wed, 23 Nov 2022 00:39:44 -0500 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0909F1D99; Tue, 22 Nov 2022 21:39:42 -0800 (PST) Received: by mail-ej1-f42.google.com with SMTP id bj12so40289696ejb.13; Tue, 22 Nov 2022 21:39:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ATGjR+WR/rvjQsAzn1FSqZfn3gb1osfEIFie0PtsarM=; b=U+8Uv8gJ2qDZiQSCGRoHCx2H9bz/TkLscQkC3beEsPxseWgnqpjJkBelaJPcc8ndTM cDYLXe/rspwQiuLsxIfHDdCajKt2T5W859u+atxFYqxFUqFpV6qcR45CdD5m3b4agHrE uFxPEx/NRefirR4IBFGu2HtcN27Yv8e5FQE/aFu/m/8KG1jX/+iIfa8d7hARPsEv/ySu s3/dNnAuMT4F4J8vhuVV5dMf0EAikZeTHvITCGFtf6cO2ZVdvG6eFluWfPPW5hZxKBWK X5Nox9XDvuVk4a0Xaei1WEQYPbwo1ZtSe/pEQMt7nXAFI5ZUecd3OfvVXMKkEraJ6clh sAlg== X-Gm-Message-State: ANoB5pkuwD8MEwOHadJ50Sl38CfPW0Yw1GESp1S4LIpBxUgPuy4HsVrW dC5IpOxFWr8G65r/4dvGitYkgBaycrLqhQ== X-Received: by 2002:a17:906:4d16:b0:78b:15dc:2355 with SMTP id r22-20020a1709064d1600b0078b15dc2355mr7706255eju.306.1669181981309; Tue, 22 Nov 2022 21:39:41 -0800 (PST) Received: from ?IPV6:2a0b:e7c0:0:107::aaaa:49? ([2a0b:e7c0:0:107::aaaa:49]) by smtp.gmail.com with ESMTPSA id bc3-20020a056402204300b00463597d2c25sm7219679edb.74.2022.11.22.21.39.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Nov 2022 21:39:40 -0800 (PST) Message-ID: Date: Wed, 23 Nov 2022 06:39:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH v5 09/14] serial: liteuart: fix rx loop variable types Content-Language: en-US To: "Gabriel L. Somlo" Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, gregkh@linuxfoundation.org, kgugala@antmicro.com, mholenko@antmicro.com, joel@jms.id.au, david.abdurachmanov@gmail.com, florent@enjoy-digital.fr, geert@linux-m68k.org, ilpo.jarvinen@linux.intel.com References: <20221118145512.509950-1-gsomlo@gmail.com> <20221118145512.509950-10-gsomlo@gmail.com> <44bf21b6-cbe4-4d73-0883-a9bcbd7d5971@kernel.org> <1b5a963c-2a5b-54fe-784e-fcc4d06c347e@kernel.org> <2f242291-99b6-a50f-cd52-e7dfd8c88c8f@kernel.org> From: Jiri Slaby In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no 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 On 22. 11. 22, 22:05, Gabriel L. Somlo wrote: > So, looking at what uart_insert_char() does, I could simply do this > instead: > > while(!litex_read8(membase + OFF_RXEMPTY) { > ... > /* LiteUART does not provide overrun bits */ > if (!(uart_handle_sysrq_char(port, ch) || > tty_insert_flip_char(&port->state->port, ch, TTY_NORMAL))) > ++port->icount.buf_overrun; > > That is, `tty_insert_flip_char() is the portion of `uart_insert_char()` > that actually gets executed if status is 1 and overrun is 0... > > I'm not quite confident about whether this is an improvement in legibility > and/or code quality, It's not :). Keep the uart_ helper. -- js suse labs