Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp296370rdh; Thu, 26 Oct 2023 02:24:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGI0+ELcvxdKKAGtETP/EEChQ2zROwvKvivou6un9+QZRIifCo7huSDffe/LaHM3EZtTLUB X-Received: by 2002:a5b:d11:0:b0:d9a:4a5f:415d with SMTP id y17-20020a5b0d11000000b00d9a4a5f415dmr16365670ybp.0.1698312264603; Thu, 26 Oct 2023 02:24:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698312264; cv=none; d=google.com; s=arc-20160816; b=rK+J5IE7JEHv+oh/qUlLTyj4unTo8CEGs1tv33oyklvqx73P6m4XkJ32gxkH0bPXEE p2xqfilIffVsJl0XYrMeC+PWWrSFVvyL/xB9LoCi4JZTvYDmuvz8fcg7uNjEkAq2VBmx lXQz1CnXzwK7SeOUnWFwVxS3lXr3mVzyXtehaeyu4aaUO/kdxEdVHwFnbzIrKmS1nU8L /c6Qr0hpAhXfekdLe72MCtULnhCHdnfCkaeshfrDSfuaGbIc8KdGXXlwgIjBKfq9CzIx Tk/nmC1itz0m/gl4KXggofa14UnAiucosNuuNuiCBVYzDs39cnQNLJ1T+aIu4x+TJ9L6 xeiQ== 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=B5FdndVj3Rs1kttjQ4Blkp0W7T1feOQu8vAQY+g3FMk=; fh=r5wd1bRgeESJyUWaCwTTXtbAKzd6fYVfnqLe4Feayio=; b=D4fs7RDi/eUcKP9fXJSyU7Dh+t2q4OVeKSI1p20FOdP95/TgSBL3kmLXm8ajX9I4GL M+tjQ7exdf9pNmvdWLO0QTVmcx0ArjDKTiNFWkXvWnRlmStkD1akAeAQTGANsUfUpLjZ ICyxvuodwj8YZRSpCkiBzBhogVQ3QfpbM+IBIbilAGo2s9HvVPt+c/B2JEfRxmSRpzx8 VjPAHTaq4HFTxwt1Adff0yzzd9n5HtQDglLEy93UsTxb4lYXAGHkJbklkQYLTk+JYmtR dwBgTJYEBwc+VTg4tU3gkCfknu2FfhXyS3h+FlborsSoIZn1Lq6dKgr11c4KW7aQTwNL jKsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mDIahvmq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id t7-20020a056902124700b00d84c1c2b6a6si17123022ybu.739.2023.10.26.02.24.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 02:24:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mDIahvmq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 5439C8213F0D; Thu, 26 Oct 2023 02:24:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344619AbjJZJYQ (ORCPT + 99 others); Thu, 26 Oct 2023 05:24:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344604AbjJZJYO (ORCPT ); Thu, 26 Oct 2023 05:24:14 -0400 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C07CD186; Thu, 26 Oct 2023 02:24:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698312252; x=1729848252; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=GGySThur3nUH9Awz6sOfRFHEp8xnVhd1i4pIzCt+ZwQ=; b=mDIahvmqtnrXO6s1dcTbJKAgwF8ZR2UHq3EAykLlgmaj5t26QSUp7jjk IReMauaan5bzdZw4kHEnDe3+2rfr4SblIXZ/4GAsgjoj2QFiM+60tx+bE KAGAHzXvBoNXGt2GygEtQHktwq50Im0Mzx7BfaimURJXVibjx5VQceThw YHAPhmCMNScs9hHTTcSyGClHIQU2O8GZl9PhG3BbNcboa1xIjLW1Nwkmy PXiBIryoFcKUtjkkiG3/Yg75Rv0+InDNfk6KPKsOGBStix7xRO/FlHIP5 nli/7Irhbj2FKl6rJnXUjZH+/fCmbBFQOBunQrVHulnWbwt/BLR7oTO3v Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10874"; a="6118576" X-IronPort-AV: E=Sophos;i="6.03,253,1694761200"; d="scan'208";a="6118576" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2023 02:24:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10874"; a="1090538040" X-IronPort-AV: E=Sophos;i="6.03,253,1694761200"; d="scan'208";a="1090538040" Received: from weissenb-mobl1.ger.corp.intel.com ([10.252.32.65]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2023 02:24:09 -0700 Date: Thu, 26 Oct 2023 12:24:04 +0300 (EEST) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Jiri Slaby , Vamshi Gajjela cc: Greg Kroah-Hartman , linux-serial , LKML , manugautam@google.com, Subhash Jadavani , Channa Kadabi Subject: Re: [PATCH v2 3/3] serial: core: Update uart_poll_timeout() function to return unsigned long In-Reply-To: <7e7eb495-8e54-49f3-bab7-0de72b2cf7b6@kernel.org> Message-ID: References: <20231025142609.2869769-1-vamshigajjela@google.com> <7e7eb495-8e54-49f3-bab7-0de72b2cf7b6@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 26 Oct 2023 02:24:23 -0700 (PDT) On Thu, 26 Oct 2023, Jiri Slaby wrote: > On 25. 10. 23, 16:26, Vamshi Gajjela wrote: > > From: VAMSHI GAJJELA > > > > The function uart_fifo_timeout() returns an unsigned long value, which is > > the number of jiffies. Therefore, the function uart_poll_timeout() has been > > modified to use an unsigned long type for timeout values instead of an int > > and to avoid truncation. > > Hi, > > there is no truncation possible, right? That's very likely true (I didn't run the calculations), thus it's correct to not have Fixes tag. It's more about having consistent typing since we're talking about jiffies, so unsigned long as usual. > > The return type of the function uart_poll_timeout() has also been changed > > from int to unsigned long to be consistent with the type of timeout values. Don't write changes you make in the patch in the past tense. Just say: Change the return type of uart_poll_timeout() from ... The comment also applies to the other sentence above this one. -- i. > > Signed-off-by: VAMSHI GAJJELA > > --- > > 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; > > } > >