From patchwork Tue Dec 10 22:02:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13902169 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD04BE77182 for ; Tue, 10 Dec 2024 22:02:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C13666B008C; Tue, 10 Dec 2024 17:02:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B26286B0093; Tue, 10 Dec 2024 17:02:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 92A436B0098; Tue, 10 Dec 2024 17:02:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 749E46B008C for ; Tue, 10 Dec 2024 17:02:42 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 27497160BBC for ; Tue, 10 Dec 2024 22:02:42 +0000 (UTC) X-FDA: 82880424312.02.D921C33 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf21.hostedemail.com (Postfix) with ESMTP id BE7BE1C0011 for ; Tue, 10 Dec 2024 22:01:57 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=qVCIV9cf; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf21.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868149; a=rsa-sha256; cv=none; b=RqarTC0lZLMxncQw3IdfzyD5gXb/eFq7lWv8OhmoJJA8A7XSF2Rvw3fosY1QGU2JPlFOnD agtTXRUWzA4pt/ml9//Zz8mz3ZtSqIk1hbIll5qnUQmp57vNHMGDIab9P4U4K7Pfz1zQKx +5XjQ7wwecmUOIhk4OL4n7HwuWQnYbY= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=qVCIV9cf; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf21.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868149; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=c41QzYd4hhSXlS6Xp2pgWqH2EB3T3v3i9Pb37cjnO/o=; b=knHxDNjjxIKQy6VX/4BlHhqt5Us8tEQCXNFZYmAuID8aaUP48neaKzeXtovuxe4D9Q/PJv GiWtMUO+2BpAan3t81DU3a7TdYFbXfPcKGrXMFnO34qw6s9Puz7MeH+eubS72Ov41mh2Wd ghHHNKe/s3Al4KjQoIPkntqu2Z+uU44= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id E562F204722A; Tue, 10 Dec 2024 14:02:36 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E562F204722A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868157; bh=c41QzYd4hhSXlS6Xp2pgWqH2EB3T3v3i9Pb37cjnO/o=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=qVCIV9cfYQFUEbAPN5oHTbVOOCMPtJTRnplX1niaLB3lEuL2MM5F44Gr4RM6lOTTS WXCIz2JA6aYjhurN56TEZJEQV0OG8AVSPHDGlGJRGWabTGSgGWE+1I7d1M8c078PhJ k5GeR3RvYMN/zDxLHn2xchQHWB1a1MyycuJ1TrJU= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:34 +0000 Subject: [PATCH v3 03/19] arm: pxa: Convert timeouts to use secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-3-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: BE7BE1C0011 X-Stat-Signature: u8kj7jbisgq5d7pwin3jbjc88kqajrj7 X-HE-Tag: 1733868117-246774 X-HE-Meta: U2FsdGVkX196i11ubz3Zz67s46oShVMBwOnBLrHSnH4RtC5w6xytS92v5kkWCPuWIKAdCUcGdexpkJxwJxPs+zTfnMR5klOJ9NVG8FUuDaw1T2PejWkgLNG+5wKCySK500Dod0fGom7drLk9AimjSMNyEyqymcSLmxmzthJkAJTsSIjUncen2JXxDUa3EkwcLqnJL5pHG4HajNPGz6ive8SDus3pWP0aumJfPNmQiDveBMdB97FmVwelAGxJEM0UHFQZHkOQvzFCAs0uRR40m67u92L3cXG7zSnZR3hxSiC7DxqaRyM9l+j9YGvgvvvDX0DEBzZIMnWgF8XeK9NE93KHxe4h62Ca0o11UNYoeg9xGbuIjqmOsbfh0EtxFhGYa5v4m0v95ESMLSx5vF/9E5V8AfQ6w2dDisCIteM64AVdfyJb0tXXilcnuYHH3Sx6yiXe3uI9DjFDCOUgGKOZ4dWqBADDxmOTHbDjl82p7aTUR49eAkimicyhTaMzPAKC380ov0u4xq0DJcEOaNiVhX3ajX0e1RLHACrflEODcY+reBLlSUwLLdV30lXU/7ZjljotH79rJIJEoLoAHhO2+/vyk/RW3g1h30F6kKpWFPSUfMVQgqHrUGIWd/WtX3O9UxxPAuAYXSob9GTBrylGbamVVGHL43ESQs4XBDZ5KyUBTiXEBYUj69DyYYpTVwTDFoEH2V8WZGe7iOUpaSg/Qa3uFoLvvkwEtdrKbpIOcK176AJd/kKf27ZYLRq0SMmEGw9BBAt3mvnOkeVeb3HABOVaClCIL/nR8bh4I0CFjigATmUPeXAuJjmbRKTlHvZCgcBfGZO2B1B3TVaTiRccKOl/ljEcSEIjibmGESt9rfWLk7cInVhBo+2o6MAngyMZm90UPZfWYn0Eb5qzvswjdPAuZtAQuzcfjKR1L8y0QqUXVJD8nEAmxY822ppAaOzo+yCcPELoeM8OpDycXfI nuyFAs9s keIWDl3oq8zEwYmVXV0Z/udpbvRpuL6thuqvX/7xCfWJ8JSyoA6/uz8a4RsPSoeMLYe6vHypLRStfYpNkOuJiyg3qw9WxB4fERIYCG5COj5KwkncGAiwryVkXX9sdSaqiMAQZk6sjCGttlnqJRk+SoEAxixR3Xyq54c7ZTvk9VbV+nIlGYJZdEIfhwQ9y6SygpQAP0zxQUsitvCLiZrQ2zoALwFo8VMz8ZJI2RwLw1YAQgebH2/021Gk73PfLQGEuhiP/2opFFW3AOV7kMnO9FexLuUdSlewZyLUSpSqrrH/G73jGdhEIZI6fTb4vZSPYjAzx6oLn2uItJNviZsa7HLnyYWvGhoLcimMSitP22Xgb+XLoORXpRZ/8/PKxK5zC2B2fjQYMgxxDgcNhnpXCilgBlcYyzIP31lDT8MAcN/D3OVs= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- arch/arm/mach-pxa/sharpsl_pm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index 0c8d9000df5a6384d615cf231ff986c0c6b71681..dd930e3a61a493293597815782d2ffd36605a700 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c @@ -31,10 +31,10 @@ /* * Constants */ -#define SHARPSL_CHARGE_ON_TIME_INTERVAL (msecs_to_jiffies(1*60*1000)) /* 1 min */ -#define SHARPSL_CHARGE_FINISH_TIME (msecs_to_jiffies(10*60*1000)) /* 10 min */ -#define SHARPSL_BATCHK_TIME (msecs_to_jiffies(15*1000)) /* 15 sec */ -#define SHARPSL_BATCHK_TIME_SUSPEND (60*10) /* 10 min */ +#define SHARPSL_CHARGE_ON_TIME_INTERVAL (secs_to_jiffies(60)) +#define SHARPSL_CHARGE_FINISH_TIME (secs_to_jiffies(10*60)) +#define SHARPSL_BATCHK_TIME (secs_to_jiffies(15)) +#define SHARPSL_BATCHK_TIME_SUSPEND (60*10) /* 10 min */ #define SHARPSL_WAIT_CO_TIME 15 /* 15 sec */ #define SHARPSL_WAIT_DISCHARGE_ON 100 /* 100 msec */