Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3910265rwb; Mon, 21 Nov 2022 00:53:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf7l46Gs2qwOVLEX2JkKbdw8acBUnwKvy3zSATgtD+YnaHr42cK1kGMb8lp6sFelS+pl90pR X-Received: by 2002:a05:6402:3810:b0:467:42a9:3568 with SMTP id es16-20020a056402381000b0046742a93568mr15076126edb.70.1669020804107; Mon, 21 Nov 2022 00:53:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669020804; cv=none; d=google.com; s=arc-20160816; b=B1HYuGR1mmcMgsVF9ZGI0Tu3gGG9q4nS250uPpi4zaxRctibA4zPv4rf5Vpv9IpgNJ y2BukJ1EQnko5z+/ZpBQZr090shNeNuurQQXuRUCv4nmtoesJtj6nyZn29/6xT0FghU8 h+u6O+XOI2XX40GmSz4mkMmp/mCRtJxXd78UPTXXyqhuxPI70W948IhLkdWwPsdHsaAe rrPzsrnSDZEKGjrW1oLZt9D5ba+pubOw4ETKauB5IMwSB3DUHxIA2rKahQDbRZcANZYV pqvvIyO9UuN8cVKEtSuqhnMRRd9LyKaf+msIdp7Sr7G9cuVb77hUTV8+vBhjYOXC/mjC PTPQ== 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=ahq+G/QJAtYi82jQX9f+cluF1LoI7Ep3P6ooqImmzio=; b=NKyaiqLq5dE9YD9JcG6uNvIL6IwR5ZIh4pAH6okIVFgzy/rquDYz0KXnt85DArThwm OqGHLUngzlH5GM5b9zNZv6P+nnEESFHNKxO5ieqBv4GrGRGl7LvInhup7VI5smQvjbs2 bVsOWcGJKdtpieNuO+2NQjpICEMX/DVqJF3hdSBkPhs602hLc6RLlSBKWkQZB0J9p7dJ z38fr4ghDbdAJkX6lAQ8YTIPbcI+6WTMGZZms0Fox7aheuPGGVnzOB8wV0dtcjxbXRXN IB5udXMp44dyyn9iytLvF3pcjWwh0/6QdNjBwR/Pj9eBJ39+GhtY2dxwf6b2UMCU9Vov oIkw== 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 i19-20020a056402055300b00461237816efsi8133760edx.120.2022.11.21.00.53.00; Mon, 21 Nov 2022 00:53:24 -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 S229798AbiKUIhY (ORCPT + 92 others); Mon, 21 Nov 2022 03:37:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbiKUIhQ (ORCPT ); Mon, 21 Nov 2022 03:37:16 -0500 Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67A8A1F2FE; Mon, 21 Nov 2022 00:37:15 -0800 (PST) Received: by mail-ej1-f41.google.com with SMTP id bj12so26695726ejb.13; Mon, 21 Nov 2022 00:37:15 -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=ahq+G/QJAtYi82jQX9f+cluF1LoI7Ep3P6ooqImmzio=; b=7LfECugByeuj80xcnDAHP4rwoDr0y970L+DFRrFr/TV2X7d3CmdOFtzEhtb1H2tA5C ivnZM2c1UaGRAtMGzX52ZADBmuZnsJ59VbQ4H1a1SqcY8oeVQZ+YBbReJgJ1yD1eRNnR 91/sx/zzq8lChSn785GeWah/KbK2xza0XCYreukCLqzc3e/cNNYa4Af+krfFEpAr2no0 4Ed3JcOvbpjATlPLDj1TF+2KehpIGf6WmGnwMS22s0tsiG+qmqM40cCNhL1kmajGQkJk jgOzWbg2WQCP5wReUzekx2MwCYuo/jpWisU3uhwAbyvVcJ/p/JFUD2JB+S7bQIQp8nO5 jlvg== X-Gm-Message-State: ANoB5pkSUxm3w8sC1LeoLEwfIuRXYO0leDJoOWjbT9mqPYYTVSkz0ZZP xN9ffMRAyBN5PFDV6FS9h10= X-Received: by 2002:a17:906:eb04:b0:7ae:77ef:d048 with SMTP id mb4-20020a170906eb0400b007ae77efd048mr14659303ejb.740.1669019833844; Mon, 21 Nov 2022 00:37:13 -0800 (PST) Received: from [192.168.1.49] (185-219-167-24-static.vivo.cz. [185.219.167.24]) by smtp.gmail.com with ESMTPSA id 9-20020a170906328900b0078df3b4464fsm4803199ejw.19.2022.11.21.00.37.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Nov 2022 00:37:13 -0800 (PST) Message-ID: <44bf21b6-cbe4-4d73-0883-a9bcbd7d5971@kernel.org> Date: Mon, 21 Nov 2022 09:37:12 +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 Somlo , linux-kernel@vger.kernel.org Cc: 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> From: Jiri Slaby In-Reply-To: <20221118145512.509950-10-gsomlo@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.5 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 18. 11. 22, 15:55, Gabriel Somlo wrote: > Update variable types to match the signature of uart_insert_char() > which consumes them. > > Signed-off-by: Gabriel Somlo > Reviewed-by: Ilpo Järvinen > --- > drivers/tty/serial/liteuart.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/tty/serial/liteuart.c b/drivers/tty/serial/liteuart.c > index 81aa7c1da73c..42ac9aee050a 100644 > --- a/drivers/tty/serial/liteuart.c > +++ b/drivers/tty/serial/liteuart.c > @@ -73,8 +73,7 @@ static void liteuart_timer(struct timer_list *t) > struct liteuart_port *uart = from_timer(uart, t, timer); > struct uart_port *port = &uart->port; > unsigned char __iomem *membase = port->membase; > - int ch; > - unsigned long status; > + unsigned int status, ch; These should be u8 after all, right? Wait, status is a bool in the end: > while ((status = !litex_read8(membase + OFF_RXEMPTY)) == 1) { But why is it passed to uart_insert_char() as such? That's ugly. Maybe drop all of this "status" and pass LSR_RXC directly. The while's condition would simply look like (!litex_read8(membase + OFF_RXEMPTY)) then. > ch = litex_read8(membase + OFF_RXTX); thanks, -- js suse labs