Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp454562rdh; Thu, 26 Oct 2023 06:57:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHfTpDBGNXRvg0IyfXY8bVpLdpecBwBUFRyeSrodaCbCoVtgIaaV20Tvf155uzqNsA8vQJN X-Received: by 2002:a0d:e481:0:b0:5a8:2744:1565 with SMTP id n123-20020a0de481000000b005a827441565mr16982163ywe.4.1698328622891; Thu, 26 Oct 2023 06:57:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698328622; cv=none; d=google.com; s=arc-20160816; b=liHe0eeMgEW4iYP2FF9RmZbNQQNoLuav6H0KYKnbztniKARVoyzDlZPttMM2/zmkHY H58B/0CV2/9GL2skV4VRW0VdTXKQSvhRhUay2ixgDh0aJdq8iLBwjCmXqB5s+UCGxAlp rVFnpikSox8RqbumRG+izCTy5ByLWbArfspytmkNkHIxWSFbBXwBKFBq7gN6wjSKUDn0 +6MOYvLfDGQX0nholOBKBcmsj9hq+q714fftr0XgD+xi25FkTGub8Zs3peA4P8AG7cP0 ZV6wdJY5mzRAwpysKNVn0cMvVBFYadw92gylvaOEBgPCv4op1GMmzyXJgiolngaDOVEs AJ7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:mime-version:date :dkim-signature; bh=y4G5FMWajl/F1bjn3WpqChw5dodQuAFRVzNXYVASYSI=; fh=4iPUH3SCaUeHRPwZInlqPLZI8cmh/b74OgcORLvvuVM=; b=X0o+mqFldhbMtryJ+VUX0zCnc4FsK/eELSpS5aTVuF4uXb2sI+wtH/oBb5lbOgPnkO cSrhjtd7nX8+W/D7O5u5JDWbYVqJn3s32LY8nZSAHnamGSdknDK7AmSOgzbPOgU4NXsG gZ8OabcJVf7uyQM6912furJEmKm6ZTYjwt0jEyB3EtQrpPhLGgDfqSWNbj/xFZLJre5q 85L4yBKAnR7y4rGoTKGEhCiXQichWIWqJei3hauPX/Efto7Gt6zxPFTGQws7yAdXL/o2 IYP+mrpmkzgpV/MwiIFxB+oUE5Bmxsw26cjo6f8UXxAGkoNtwlK+Wx+7a6aFCt3Q6hcG UPNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=VSvoXAH7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id r18-20020a81c312000000b005a210c45124si13851795ywk.530.2023.10.26.06.57.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 06:57:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=VSvoXAH7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 227FA837D976; Thu, 26 Oct 2023 06:57:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345133AbjJZN4k (ORCPT + 99 others); Thu, 26 Oct 2023 09:56:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234875AbjJZN4i (ORCPT ); Thu, 26 Oct 2023 09:56:38 -0400 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9660FBD for ; Thu, 26 Oct 2023 06:56:36 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-5af592fed43so1755507b3.2 for ; Thu, 26 Oct 2023 06:56:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698328596; x=1698933396; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=y4G5FMWajl/F1bjn3WpqChw5dodQuAFRVzNXYVASYSI=; b=VSvoXAH7++daBy6NrFerw+gKsLPPwo4kNGmhNln4C8ky04h4BmcIle4+KWNx8AQdIf hBLz1LeVcbS1VLBX5vVbdLi25u7Fx6T/OSlcN1bl5/L00aHKSF5ESFc1ATOELpoGuhe+ McR7wwtprYfW11apDvQTZ9qpiN1xN+P46mG0DyWgd+RW6v/sIB9gF+RjMqALrAXoEy5W tnwyPgMS3NY59S0EtdDML7KJb9t50Z+cyt305PU5JSaudP1Pn0JDk7IRGzHzgyTlT+ad iCTFBfCaApAc18NMLKC/4odM0L0ichbOSVInb6XU3X5flqbp8xr1WnwlfZw9gn0gPHQh Gvdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698328596; x=1698933396; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=y4G5FMWajl/F1bjn3WpqChw5dodQuAFRVzNXYVASYSI=; b=RiuTRuo8XZuNY3pK6oyM0z29CoVwrS8iENdASC7+NYh8rMUGuF9a/a9a+XfF8uqtXQ TD1MnAhHvBnBrRPDTUIZZJt9U9fa/nOm+Mr8VeI0h0fMljFS1rQ5ER0QwkWF+YP+0Opv jlT1EJNplXGMXfDf/1IZ7fTSGbEolMipivDtq0mH3QLv0UdDcMc5vmKQFqtbq+yN1iZV hRK2RAhJUvQHuXBmk5lfXxJulXtY890weHCrgTifyqIrNyX2yAiRLB6rbQiiK+P4SPqf Vqv8n1KKUXw5q8XKox0AZxrM8p4xC6mQJPxbh7Oe9gLiOxMusjdkMKOS3kYRqtbqjy3E rwEA== X-Gm-Message-State: AOJu0Yz4+8t4o8XnuzTdW47wx4aTjcp+pR8o16nOyB+7c8ZB1903NUzS iEgbKdovYlaQ4OAthDfY3BtVWp4BZWxQPq+LnWmE X-Received: from vamshig51.c.googlers.com ([fda3:e722:ac3:cc00:3:22c1:c0a8:70c]) (user=vamshigajjela job=sendgmr) by 2002:a81:48c9:0:b0:5a7:db29:40e3 with SMTP id v192-20020a8148c9000000b005a7db2940e3mr420178ywa.7.1698328595848; Thu, 26 Oct 2023 06:56:35 -0700 (PDT) Date: Thu, 26 Oct 2023 19:26:28 +0530 Mime-Version: 1.0 X-Mailer: git-send-email 2.42.0.758.gaed0368e0e-goog Message-ID: <20231026135628.2800617-1-vamshigajjela@google.com> Subject: [PATCH v3 3/3] serial: core: Update uart_poll_timeout() function to return unsigned long From: Vamshi Gajjela To: Greg Kroah-Hartman , Jiri Slaby , ilpo.jarvinen@linux.intel.com Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, manugautam@google.com, Subhash Jadavani , Channa Kadabi , VAMSHI GAJJELA Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Thu, 26 Oct 2023 06:57:00 -0700 (PDT) From: VAMSHI GAJJELA 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; } -- 2.42.0.758.gaed0368e0e-goog