From patchwork Tue Dec 10 22:02:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13902180 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 5A6B7E77183 for ; Tue, 10 Dec 2024 22:03:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9CB4F8D001B; Tue, 10 Dec 2024 17:02:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 952E78D0017; Tue, 10 Dec 2024 17:02:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 730558D001B; Tue, 10 Dec 2024 17:02:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 51DC48D0013 for ; Tue, 10 Dec 2024 17:02:49 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 88382140BCE for ; Tue, 10 Dec 2024 22:02:48 +0000 (UTC) X-FDA: 82880424186.12.9EAFE77 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf08.hostedemail.com (Postfix) with ESMTP id CDA7416000F for ; Tue, 10 Dec 2024 22:02:31 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=R9JyWtdI; spf=pass (imf08.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868145; a=rsa-sha256; cv=none; b=ENuU63qehTlw+Axi0fh1nP9NFEhrd7DDQJS60zI61zsTFNXXtS/iS0ktpwyqR9Up4kWHcf HWGIgaX40ekBbSinxf45vHcKAAG4pfILgJuN8RmB1HXeQUVNEXTumkA4j6vARCzTtKbBHl Q5J9cFX1wYT81jO/SEBJGQ5OYQKn5Cg= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=R9JyWtdI; spf=pass (imf08.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868145; 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=2KdSABVpHGeIl3K+Zfq51kwhEReKGYYzt3DUWqeHGog=; b=0jKQjcy8jhRv0vQrAiu31+oNftbYOfDN5kP/6qogmO5XLFTe+gsL6pwQ+pMctnyQh0+kh0 wlnh+7J1Mg+L4JMAL4HOaX5WEbni64/pNR55LkHCYfv8on4eOT7T7xFPU3v5xiaR+VWVVJ JRj7La1S+wNp2QMMngRYFsaZeIoCicg= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 3576020ACD6C; Tue, 10 Dec 2024 14:02:39 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3576020ACD6C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868159; bh=2KdSABVpHGeIl3K+Zfq51kwhEReKGYYzt3DUWqeHGog=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=R9JyWtdIUEb4/zKyVfibrupVtLSA8I4Ge9h6DsznbqwDXYuMt91s9gMK2E8wvHrfF DAI6C0uY79rteNLP8XN3j0zl2c4hIe69V64Jd/WfL7mt75W43sZOrZK3S3e5zHR6NX Fb6Kd6ZyvfvV2PAG+yCh6AjQd+L5BQfffwiXvwAk= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:46 +0000 Subject: [PATCH v3 15/19] Bluetooth: MGMT: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-15-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-Rspamd-Queue-Id: CDA7416000F X-Stat-Signature: urcpmw6njrqy8w1k1qnd7poopxkmzuge X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1733868151-971843 X-HE-Meta: U2FsdGVkX19hYtHsu/l6ydY3vpbnROQ0E5E/THvJLSnBlor3Ucx1eHVPasbZ0eJyo0aPWHKVnmeGwDrFLUoJnUtbYmhmaDj1jmMVAoLkNa2wNzFpaPQ34w2tN6AwBbcqrsRV+7ekiJz9D7FRBya/R08qtz2SzPtSzmB3jCfj2oYCg1cM0JcvVGXoszXV8shzp4TDucGht+Su4f7QqDlCTCju3GWILqKWSnskKOp6vwdmRaXut6vnCExLKdGltiqJm95H4wCRWqc+5aidpxm5lnsEOMzN6lY1VM/vtT3ulgjaqyyiQUT8ZWQwv47LqRR/j78cS4IOUvlFTy9QrNAjvtYSI8pW6yNW1fAaM1upi6JF4m8GIpWpRmEkRzSAlDx0EG2nAOzp2b5GleZxX3rUGDhhU25o+9Io62e/4x/HQhZ+iu7ccICfWNEbpxQPDndF7DfPvUFq6VFKUQc/BCOAU1EQ3H34r4aPt8D8lC6ltC5Iu3vJ9aa2MQGKOIMJ6XVtmqJq9rn2yyc4vEs9IVh+4h4i4ufSkK358uMvO7TUTaVnIY9J6Qml8goaCZLvWOaN3v4Cj6I9WSonAOolRCgxEJwD+E+pQNDFMull3V5zNEo+HRm3BGEdJSSVI15GAz4LgkR3rcIWLnrHAynuPYhAZkjO3CqZKpPX/3pIiBkbAx52oj/YY2Hgvwxia9X2tetlF2Iu/zUZ6w169l7+ULKUvYOu/9v8ywhD6NW0cDZ9Z8tf2P8oDGmtGn6gx2XHirfDVj925CKS4mRu5Fh5etqJ/nay6xzGqXeGyn8v8etQFT7atLIacJya74fPXBkwp6FtaUS01J4JN8eeydz/G5IB/Hy209ldY8HY2E0Y3Buru/O+032UVeX/V5ZIPnP2WmgniLvCabY7jbrlZfv9LePUp33WIW5RnSP6QoMlBCVZNJ8epmSslzurfTbilDe7PgrjuwHt84UvXynbTkRTlvS A5Ud7Mps hwzKEPjIMHjOhqfCUW3xORV4Q6G6Znvq8ilMPdVdGoO/m0rr7PghuTW3UcQ/b3CgrRSUU/yfgj7LIdHEpClWRSUWLW4HCJh/QTiztBZc8+oOt/2Yr9Z1DX4ZqU8JlJC68qgHDgav0H0zumTnlEWZ9QLHx0MsQOgawMPEarRlMfgP9c2Bij4FLBWLUN3hKYD03Ql1D//afIunVZda9mbwOp0JT2aPLqohgfdQO19OdOQ9iG/H1nn5lNQ40pQ7qL9s2lVTKEa3xXpDid3E/7f+MRWrlLrTE7/AU9MF0voAJFo5LqDhdV6CaEdj/f2ZokBDSjU9N1rsYHYkIyy5yDJFt968i5gE2gHyYA3qBluXYzT0M2c5lRE6EyBpOY0pA4sXf0RN2YNHhKlbEx/nN7TEzpd3AW9rNzEiy0TIUy+1rC6HwiGw= 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 --- net/bluetooth/mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index b31192d473d09b663dc7babd107b4894088ebf6d..8c993763ee0f0360e0d92705f9035f47754b793b 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -210,7 +210,7 @@ static const u16 mgmt_untrusted_events[] = { MGMT_EV_EXP_FEATURE_CHANGED, }; -#define CACHE_TIMEOUT msecs_to_jiffies(2 * 1000) +#define CACHE_TIMEOUT secs_to_jiffies(2) #define ZERO_KEY "\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00"