Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp954931rdh; Thu, 26 Oct 2023 23:43:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFrs5D6arl+gEGqF26JoHeFuFH2WLs8auTEtpiwyG1MaTnRxeNtXdqPWBV7SYm/tLnC83eo X-Received: by 2002:a25:2d0c:0:b0:d9b:e043:96fa with SMTP id t12-20020a252d0c000000b00d9be04396famr1532578ybt.22.1698389024920; Thu, 26 Oct 2023 23:43:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698389024; cv=none; d=google.com; s=arc-20160816; b=XNxLdxzwuESdDgJr/uN3yr1FWPZJdL5tpRNtCB9iSML8V3fUtFPCQGdBvMM4KajXot cJAml9UZoFLJ7epzZYbi75kEUq77nLEy8Yzvid8KZpa8djNkdS1+CVL5bfVWme/TnqPb o1Qvb3OlzXPeq8Wm8F4a9EUMPxlKtKLVmlN13p8lIpjnu1AzMeoCyT+7m+PCxrc+3HJT wIXTzYuqvZt8c2Qpis48+VPUtWCRKyZyjLOE9SpQLGigYj++ZOEo8w4m0ld/Dn8n8IcB w4KNRDoxvRs91Vb1ulOMXmYHImRUCWzPar32iC0QC3DQsxLmSuwEMXl8gt2gPpCtg3ba zrrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CWe5Rdnriaz6kOz4I8JSX4CJupOWrtBjkXXe9kLPdmg=; fh=Lp8PPBiocj4A3xx3l26w0qvQ1aX5rw/of5AJqF5wqtM=; b=eNI7m/HYVlcmxb/SWazKdDzQIhRxrhCF7uDZ8qYS2LVwdyNAs/sva3RJDGa83+jiNn rsS+W3ifpnRNOF0mwIWSyiamrUmpiLiTNrCldpPhs3d1786w6o/38fnohJ+sXvYi6FEk m0kcvdLa0n2Idv6DBRUM5y5SPn6WN2WyDMPkZ9KTtor8O8XpxSp+sCdz/Iw+y7Ota1jD m8nRfiDkpB8MdiDTZDeW+pMnC4DIZdOclwae5SADvpOu/bmN+5xjsifcQiJQNk55vBOQ vFwpsdhwHKjZ8QJUwjRZATPmYQN7UaEcbciBy6LJqJRVwpwSDMrEN48OSAcCsiiq2099 Fprg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tjwp8i+h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id h186-20020a2521c3000000b00d80103c1190si1619872ybh.103.2023.10.26.23.43.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 23:43:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tjwp8i+h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id B4CE482DFD2D; Thu, 26 Oct 2023 23:43:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345123AbjJ0Gnf (ORCPT + 99 others); Fri, 27 Oct 2023 02:43:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbjJ0Gne (ORCPT ); Fri, 27 Oct 2023 02:43:34 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38CC9121; Thu, 26 Oct 2023 23:43:32 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32AF0C433C8; Fri, 27 Oct 2023 06:43:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1698389011; bh=KGXKiq9/VImXyR51J/+ak66IF52o9zUiuOaFpU02Cmo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tjwp8i+he7nUfKuVK7ic7roJ2dFtUlSeXz23MOZBAwAPCphfUilacNafOWwde3iQ0 U/nh4WG9WuOwFDNoKHJZy6RaP3GvT4plh6co7Gz8/wtrlROCeXmE91Xaw+UXjJak3r vp2KdPo4ZoEkVfRJhxO1bgcWbXZmmPAmi7ZD4P2k= Date: Fri, 27 Oct 2023 08:43:27 +0200 From: Greg Kroah-Hartman To: Vamshi Gajjela Cc: Jiri Slaby , ilpo.jarvinen@linux.intel.com, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, manugautam@google.com, Subhash Jadavani , Channa Kadabi Subject: Re: [PATCH v3 3/3] serial: core: Update uart_poll_timeout() function to return unsigned long Message-ID: <2023102712-frolic-bush-3d67@gregkh> References: <20231026135628.2800617-1-vamshigajjela@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231026135628.2800617-1-vamshigajjela@google.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Thu, 26 Oct 2023 23:43:41 -0700 (PDT) On Thu, Oct 26, 2023 at 07:26:28PM +0530, Vamshi Gajjela wrote: > From: VAMSHI GAJJELA Please use lower case letters like I think you mean to? Also, where are patches 1/3 and 2/3 of this series? I can't do anything without them as well. > The function uart_fifo_timeout() returns an unsigned long value, which > is the number of jiffies. Therefore, change the variable timeout in the > function uart_poll_timeout() from int to unsigned long. > Change the return type of the function uart_poll_timeout() from int to > unsigned long to be consistent with the type of timeout values. > > Signed-off-by: VAMSHI GAJJELA > --- > v3: > - updated description > v2: > - unsigned long instead of unsigned int > - added () after function name in short log > - updated description > > include/linux/serial_core.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h > index bb6f073bc159..6916a1d7e477 100644 > --- a/include/linux/serial_core.h > +++ b/include/linux/serial_core.h > @@ -773,9 +773,9 @@ static inline unsigned long uart_fifo_timeout(struct uart_port *port) > } > > /* Base timer interval for polling */ > -static inline int uart_poll_timeout(struct uart_port *port) > +static inline unsigned long uart_poll_timeout(struct uart_port *port) > { > - int timeout = uart_fifo_timeout(port); > + unsigned long timeout = uart_fifo_timeout(port); > > return timeout > 6 ? (timeout / 2 - 2) : 1; So we are now doing 64bit math? Did that just make things slower? What bug is this actually fixing? How have you tested this to verify it works? thanks, greg k-h