From patchwork Fri Oct 27 14:15:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vamshi Gajjela X-Patchwork-Id: 158946 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp637438vqb; Fri, 27 Oct 2023 07:17:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHxll4AHnD/fbhDbbPtx8T5pIYbCCGx0vn57t7FRxMS708rytyTdTkSTtR/HDRjQntkA2Ic X-Received: by 2002:a25:aa26:0:b0:da0:338f:794c with SMTP id s35-20020a25aa26000000b00da0338f794cmr2596234ybi.60.1698416228214; Fri, 27 Oct 2023 07:17:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698416228; cv=none; d=google.com; s=arc-20160816; b=wZuOKdKtTfJPzr9mcVZHmEz+4WToWyoZY+N+Cn4cmG8UROK0VBS6uJTvh4oKvruzGn G1ZU68PBbFuSBDqpdjQkMKHGDhSEwSdX2hCKHddAkoOxFL4Fkrt5DaIbdXhUfbWF+u2A ReHNYx0ZHiTkqUu1tDAY5crU1VXCUIl2ldiBULe4gAIAISGFZuQAwo3xAADo1l4ACFSU oyETt4OjxT0DXFmibkOmFcDBsSBEK+C1UFvfuwXkEMpkW2SlEqPtllavn7pQGokUUvvx GKkVedhrZzmkk0/KkPdEnrpBDr5d9xFKw7W9/ooeu/26P6iY+YJ/OQQSNyRntc23Q4IW g4cg== 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=j6Wogm78zGHr7c0TI3PksAkvURXKXnXYdkqP8SNCZYk=; fh=Ws+G2RLMFRfpE0Jj9T2OymJKcfnhuU2My4BZfo0fXLE=; b=ZuuRycQL2ruR8mA9refZa2lgFexQo2ZfWVWIO8VAleUrcY2w/rN8uK9JJ3cMTuAKI6 aWbZFkno0qgwO1k5O+mmLXZ3uF19MnXtClBSXvyB0Sbu0zMA/PlAtsmnoZO2o0YfunJB p3CDmdyax4pxA2BUVy/zD5F6FmHYprETI/iCPAEr2v0rzzuBBdn6mxJP9K4EUj25Fb22 2YwHyfjjiE/dI2Q9yxkwE6y4WUW7b5+egcL2oO5AO2ulDewPvkSuu4/dr7ZlkqhwaPQv H7Mas/S9Slf8weomcst4ff/Y3P0nffnES7ahHHWLq8kDMeTdww9vEutTkE4d7dJEMd6O 6xbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=DfqnykrR; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id 10-20020a250f0a000000b00d815ce3c720si2543197ybp.64.2023.10.27.07.17.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 07:17:08 -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=@google.com header.s=20230601 header.b=DfqnykrR; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 5C5C180D31E1; Fri, 27 Oct 2023 07:15:58 -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 S1346107AbjJ0OPv (ORCPT + 25 others); Fri, 27 Oct 2023 10:15:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346114AbjJ0OPs (ORCPT ); Fri, 27 Oct 2023 10:15:48 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B70F0B8 for ; Fri, 27 Oct 2023 07:15:43 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-d81e9981ff4so1499810276.3 for ; Fri, 27 Oct 2023 07:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698416143; x=1699020943; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=j6Wogm78zGHr7c0TI3PksAkvURXKXnXYdkqP8SNCZYk=; b=DfqnykrRRsemYMpSbbBPoLlsSnhvYQLsPalSNTBYfXatcydc7SsP0B8iKlkaRZjpM2 WgOPFQRfXGF5SRuk27LEGPXqp20WLysPBolURJTovfK20snG8LCT7QvMQG6DG7LqiNJX Ltg2Ti72MGXnwSCGaTITjDffo6o1luHWFhtXKKB1GE/Sur9XJBSTiSbvtglQMJFAeBDD FpC9e/WbthpwMwlWPTVjrCQyrS/SWp0vbg+MUyjirmHoexvNpYSOfbdV6IRQi+KXWgYB Fu90ff2UbYTSJtF0Av0JgnkRC7TFetTWqTfa5UVF52dqX0Nwfs4HrimnvZQ11cQBj91V jUrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698416143; x=1699020943; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=j6Wogm78zGHr7c0TI3PksAkvURXKXnXYdkqP8SNCZYk=; b=l9Vjk7G142xAVOj4fpjrFEChFG52NqVnDTqFiprvXiKGOVK87b/Mb2GCPrRhSoGCA0 3fG5b5N8XC2zmxjrcgSVWS3bOEdtXIeEw3fES6h6AtyJhSx84gG4I05nCYN1S6WOP2Yd ryRJdYBX4oFPHJzrRz17ASJUXiDu07yE+WFfLG1Owu4EhVQsu7xHZNHXYmcf6tXZVk2+ CV/LWT+j5xOny7lulMJBhjJ8A9HgEGX8FBelHOWm6Q6Ia+zHsbNgPEf3SW2iga8wTdzG 9zrP2NrK1NuaR7BEz68fA+XioeMH7Qw17ywwqcBxfBYe2wsnteErfvRBsGRKAc3cKL6H b2wg== X-Gm-Message-State: AOJu0YySGvKG2+r+49D0ayaEi6zQufCeBYY/UsEeHYR2VvHaKPIh2xo7 JDwadX79xEa7q797hPWW6nKCbuXFR9zKpiXAnxgj X-Received: from vamshig51.c.googlers.com ([fda3:e722:ac3:cc00:3:22c1:c0a8:70c]) (user=vamshigajjela job=sendgmr) by 2002:a25:aa07:0:b0:da0:c584:defe with SMTP id s7-20020a25aa07000000b00da0c584defemr44118ybi.13.1698416142832; Fri, 27 Oct 2023 07:15:42 -0700 (PDT) Date: Fri, 27 Oct 2023 19:45:34 +0530 Mime-Version: 1.0 X-Mailer: git-send-email 2.42.0.820.g83a721a137-goog Message-ID: <20231027141534.3723781-1-vamshigajjela@google.com> Subject: [PATCH v4 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 X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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 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]); Fri, 27 Oct 2023 07:15:58 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780737936598364815 X-GMAIL-MSGID: 1780918494794518496 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 --- v4: - author name in capitals to lowercase 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; }