Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp995488rdh; Fri, 27 Oct 2023 01:21:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHfQ1H9ASNmxoEQPvJIhuRPpBjq3Q8kLhcWur+ZBoegxJPNlVO8mC82AF08lVyl1JpvgJUe X-Received: by 2002:a1f:1f06:0:b0:495:c464:a2fe with SMTP id f6-20020a1f1f06000000b00495c464a2femr2357998vkf.2.1698394868910; Fri, 27 Oct 2023 01:21:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698394868; cv=none; d=google.com; s=arc-20160816; b=McSpOQE9xOb25UmqITZqWPzwaSB1el5eB5lT1kjudupIZSekaHPj5OpsKBHNwj0Sk1 7w+l7joUJS8RGrmHXJnyLBgqszAzupK9FeBmIcZ0Z5QaqV9msLHRfzuMKs1uW517DbS5 FjFh8VorBnhNZGr/GJrBxApfjRPwie5ReZXn16859/9KAhP36ZNO5j3iHwUZ2p7dasBQ oLKtcOtfgIjJPKt4jh3p8KJvBGfZF+bgK1nP9rC4ne/Tg9sFW5zZ/a7NQpqXJ0cX6Tqs RLkladzOPhKnlun4fSxkD47BWSRIniK/5fiwS/lGUrImCrredt92WaJIl/26yDH4R/N3 ayQQ== 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=chPrJgUz8dGMbht5DWkG3wwxpRTnNohiN5sJ44HpziQ=; fh=/CEdySk4sCDVOkUf5NeV4hGcWHERt/sRWtPegblv0Hk=; b=S9ZFcoa9UaP4ZICnawoFPASsA7sGXAaqZMEzHdMQ84N/b5ULQ8LVf4X+35Xyh0IGYS azC42x07j9DcCR75AQ8eq3l7NJi5Y7bSWQNlVVommpotdG/VXB772cdOnU0mr3B3OhMu gnAITGW938vBnQxEiIrQvdM6y7QE8iPX//mAGbUv0pFjlrlggf2jhclZKXOv9fCHj9rv 1qyaxn+uiDNsNtI/v16Hppi5xS6xp5k8e9GmEbZzfUCNoTBN39y4OwFoai4Pa2TZSNy1 +bbAQpGNhVv5j525Jz+YTRiXVclQE+lS1SzhmPZOm8XB+94c3vqtvTWxvSqh8XIerH/X hhJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Xj9Jo5mx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id e19-20020a81e953000000b0058cd28531b2si1741803ywm.435.2023.10.27.01.21.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 01:21:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Xj9Jo5mx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 0B3B9829D99C; Fri, 27 Oct 2023 01:20:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235165AbjJ0IU0 (ORCPT + 99 others); Fri, 27 Oct 2023 04:20:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235105AbjJ0IT7 (ORCPT ); Fri, 27 Oct 2023 04:19:59 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40301198E; Fri, 27 Oct 2023 01:19:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698394775; x=1729930775; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=GvOmoSKLCYIyNBraTNtw+qJ6Ly1A3iWfsq0xxWrPRPc=; b=Xj9Jo5mxRDTXbFlD8p8fqbu8qDyGDmGQbnZC3QbrU2+7QHyVVD/SQsi7 QaqfUeLV2Y9d0r0ZRlbiHE7ewq7bppdpajiJVGjfwZME4CDU5v8kEruCX ULtAsk8UWKT7PGYSqr6edgKrJV+j4cmT/5frqYL0knu08nWepf2B2o6vk 3Uz5F9mAUH+TieGrzT6jpdh7k1UV0pQZZuliu+xJt4G43DDi2KBn8/ndq 8czrTQ3sSkQZ0cXV+C5jnwIozrGRJOriOa1f7+JmXY1IYKsi43zp7qW+u fD8mn4HR95Zg7o53g8+c0hCUGaxc0CcCdzkHrStLlrxLGSFcAVWW8z49a w==; X-IronPort-AV: E=McAfee;i="6600,9927,10875"; a="454196083" X-IronPort-AV: E=Sophos;i="6.03,255,1694761200"; d="scan'208";a="454196083" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2023 01:19:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10875"; a="850167915" X-IronPort-AV: E=Sophos;i="6.03,255,1694761200"; d="scan'208";a="850167915" Received: from scoltan-mobl.ger.corp.intel.com ([10.252.33.159]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2023 01:19:32 -0700 Date: Fri, 27 Oct 2023 11:19:26 +0300 (EEST) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Greg Kroah-Hartman cc: Vamshi Gajjela , Jiri Slaby , linux-serial , LKML , manugautam@google.com, Subhash Jadavani , Channa Kadabi Subject: Re: [PATCH v3 3/3] serial: core: Update uart_poll_timeout() function to return unsigned long In-Reply-To: <2023102712-frolic-bush-3d67@gregkh> Message-ID: References: <20231026135628.2800617-1-vamshigajjela@google.com> <2023102712-frolic-bush-3d67@gregkh> 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Fri, 27 Oct 2023 01:20:58 -0700 (PDT) On Fri, 27 Oct 2023, Greg Kroah-Hartman wrote: > 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? That divide with a constant 2 though so I'd expect compiler to turn it into a shift. > What bug is this actually fixing? How have you tested this to verify it > works? AFAIK this doesn't fix anything because emptying when measured in jiffies isn't that big number. It's just about making the types more consistent. -- i.