From patchwork Fri Feb 11 02:30:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12742710 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9602DC43219 for ; Fri, 11 Feb 2022 02:31:41 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.270024.464202 (Exim 4.92) (envelope-from ) id 1nILiQ-0004Mh-6E; Fri, 11 Feb 2022 02:31:18 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 270024.464202; Fri, 11 Feb 2022 02:31:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILiQ-0004Ma-2m; Fri, 11 Feb 2022 02:31:18 +0000 Received: by outflank-mailman (input) for mailman id 270024; Fri, 11 Feb 2022 02:31:16 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILiO-00046f-Gk for xen-devel@lists.xenproject.org; Fri, 11 Feb 2022 02:31:16 +0000 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on20702.outbound.protection.outlook.com [2a01:111:f400:feae::702]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id af2e3b17-8ae2-11ec-8f75-fffcc8bd4f1a; Fri, 11 Feb 2022 03:31:15 +0100 (CET) Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by PU1PR06MB2326.apcprd06.prod.outlook.com (2603:1096:803:39::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.17; Fri, 11 Feb 2022 02:31:12 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb%4]) with mapi id 15.20.4975.014; Fri, 11 Feb 2022 02:31:12 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: af2e3b17-8ae2-11ec-8f75-fffcc8bd4f1a ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=npH1iPy/cK2EfovjDDJ0g29/nvaBE85BtC0SCeJi8J5FXnq1JoPf3PNTYZLFlsfZyI4fw9w9+8IaUCg0QaGXRvDKRzfylathGXdfBJv8apiCyrU7Cru9sXOqq11hXbhNJXaUSBchllWj2ZX4WAXkVXC1DPtdGjIxKIuqTGL1ApaoG/4orO4TAgzlxYmMMsHgjKxOGlDKeFAhg30ESkSkM6xZYv7NwZUZqn7sFhVvhltmGwjOY99V+yIJaASXFJ8zzdpNgq8XBFHmWCl8at/EpTFdJAlA/6XuGhyCUL2Xe7+1f3VghJ0uxxoD9qw1hzwrl1K095OLWU3tUshRY6m9mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IYuRSWgY6HaeljgNbxaZaf003O9SNKziTfmoexXwmbA=; b=Ff/TaPCh2f00LsjtWP+09mBSTE0lytvDFZ3xbkS4jw+/a5T3odWlRplg3MUYR5thE/TuBAOi29OWXNPdvEFfhhAxm5GjVBYCw+E00LFfpNrHK+QpZ56c2liJJ349UpZNQZ1saGtI7uB8GpZ/koSlMrOh4FXOglVIRfkxMXXaxiWIzF0bBtXGkv4CY6e/J+4T7GbpJGQHMblgAnW9aItBuwk5QMqEvmc/EDATSyaCNXO2E9e0rjDqba+fZJpeuWv0IcxHKnzWBywITvYK0Cfcn0GvZwZgml9a2e9M9ahEC9PAvNMPdp+Zncb+AI9kWnA0wLdmPUOpl6zNQVipOEM6ww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IYuRSWgY6HaeljgNbxaZaf003O9SNKziTfmoexXwmbA=; b=DahaCz8LcBl4s4N93+t6hpH9V0D76QtWgLDSv/Ttcuazd59HNa8GR4q9vUL78daNMYKu3C9NuRFOCOANhI9z9aGVHZjLH+FxTNt8gvf7YM8+wsEiP/4KT9ZK6Dtn9VlMWYOWEZd1xJEHTtwkYou9gsfNcZsP0LmmireP0VMWUZ4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; From: Qing Wang To: Konrad Rzeszutek Wilk , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= , Jens Axboe , Michael Turquette , Stephen Boyd , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires , Dmitry Torokhov , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Mauro Carvalho Chehab , Hans Verkuil , xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-input@vger.kernel.org, linux-media@vger.kernel.org Cc: Wang Qing Subject: [PATCH V2 1/13] block: xen: use time_is_before_eq_jiffies() instead of jiffies judgment Date: Thu, 10 Feb 2022 18:30:24 -0800 Message-Id: <1644546640-23283-2-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1644546640-23283-1-git-send-email-wangqing@vivo.com> References: <1644546640-23283-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0178.apcprd02.prod.outlook.com (2603:1096:201:21::14) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4453172d-1062-40a4-51ed-08d9ed0691c8 X-MS-TrafficTypeDiagnostic: PU1PR06MB2326:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1284; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eP6YOw4R3jawIEQSMCI45OGmHyly8vyYqkhdazwPrzt/6mtGuIm71LmjFaxy3UVdqYDII6o/y/paR4ORUrg8wMyGV160gfTUQz9n5XwUATSstX5nu22RuE2sZxAZB23/YiAyCv1OX+HuegZUDD5lOEVEc6CekrE4Mal29dnB95X5fbrQGJzYk+XIKdNtt96nwEhHDxQjy4pj7d3pE5VaX9eMSCBhCBEC9iCFkRuzLfGtk9gZnwXMRJlKor3LLtrfA7CBwianCeTo+bpELFXyvu9LJCw03dF7F50eEcA3DuXkoWw9dTLPwjG7mJqa+r9u5D9eBQZBUce22QKwLgyhPcuGXa2kshtC5V81ojRl8eyt0yUNosYZ42KOeUp6toEG3uLD+4nhVSuloqdJKU1VCcpABn0f+LE8zMftaja2FIfzdD27fEwVQxdpD24upmy6rqVLvEi1/2cnacV7YSVU3Igmo40bsXSHClkLZTCPsdZ962221FDY+1pc9yTSlYoahyWqjc/mm81tDPEWnMhlXTZ2KNVr/4IjVUkk4ij26KtXBJmtGzwp4zB4wl2rxr/xyLgmDzs2mW/16icoCVHomtTT7manT7c5fGBM35UA3KKs6k/BugqXbMBiBWWGdWFybPoeG3iZNsOqhVoWWxweotu2czABYRfNcH9FwTUX/zuSKqjfnbW7lQXTJZET+ole3DBOvRqdwg90WVQaBtLlGExMPrX6cUf7lH669g2bGWAQP1QdDWoZoiSLsJ379vAG X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(6486002)(316002)(508600001)(110136005)(2616005)(52116002)(86362001)(6506007)(6666004)(6512007)(186003)(26005)(2906002)(36756003)(66476007)(66556008)(66946007)(921005)(8936002)(7416002)(5660300002)(7406005)(4326008)(83380400001)(38350700002)(38100700002)(8676002)(107886003)(21314003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MPOxFWmB5E2Pt/1C2XrNteRXkmz8Srv8O1WeQjdRIJU6rqpIOUQ5pVdAGRBzikiVLOKIG/bsksxsxLXa93yDiSqxXJ2QAMm2lSXohTG0XKgY/DT/HRrbdMgo3eW5tUsoS9yKaWiHtelJ11se6jPYZyL4GXtGZ/ugyMCK1H6QXVu2q0n2VqSOmOZudoKGdD8HPLpn+yYFL9B0KRLO9T1629z1rr1KDv7WgxJ6KwKZwzwjOwONhz7QhC9lX8MBPJT+NuaMNgfnykBSYwV8efbX/Bq35XKgjEF1NVac34OxTqiXEt2rMv4di+3kp4C7gIfqwRyqUNPWmQY/F2Qf+GG0d9b+4nLSI3F5YDGaxm38SoZ9PQPJVtzh4lfpYCmtW4asY08kGCWIfiycxT84k09lt66SDqSkN3qFXLDoOLlE5VAMR/cUTOiaIBxkyDiB04apQLL2J+bs6nSHqSs3E+hE8/hnt6oQy9GFvrq2/c8fCDGdiqhQ8tODcW7iAdemra8ZS8E8p30MBjxIgVyr69Yx3pXWnZ7efDBd/whApX0RA2ofv7R6KVppKQgAImbyWTvoxOmKWDJzp1faafR1ZSyg+FQVaI14/F/RcFzsXxwReGbuabevcgnUx7A7870drwtY0Qowhe3N1+6nXXW4PJOI3iV4TXCAxYKQMy8ypCBgG/8iIsrrsc4qmyUOwo/fVu7dWfEcZ5DwizXeUPbghpBgQhVBphZVFQP28m5PyvpOpMuYXHs4XSfHi/t+iOQGs/7TdHpP8HYqHZc9kiXAni7iCPY1MLg10Ha4GiSPKGdXL2p7ZOaX6l80MS1XPfOgYK4ApWhaWeZiGJQ4GVKoB4uqy6J1VWsms/N3WIkvggzBvltoJbr+Xebdd70O3qtnsPlv9ENg2/yQmwATPR/bh0wZsQAU11hDUXMgp5LRSoywVb/BDS8nia7h8QO3eYdsSbjWJbBYtM8noZ1Q5XN1v9RnqTrwpAFnU2XAUijG9nx/8azvOmvwa2BtPXSK7Q1/ZKuZHK6JcKwyiniw2OJEui2JJY0Wu4zPKIiqAiKMIQC3moJ4Ok1Xr4jjWRG3G7EXbtrYmuGeGEzqwuGJ6Nej6cVYhZ8dvWsZOXE868HGx8RsYhoWqrbJ+1zyqLz196fvBbkdQVFRWhndvp0Kg1VSNyw4gVhiu4yxQpSitvzq52E/s/KMwVCuNOKVo79n30LFTdpH2eJ805D0pTTozL0F9+Rt4+//vJ44EYaYM1zZ+nQ2e30Ha86+v45oyfeLMHTk7eSjCo/tqN8/8QgzuA4j+xs6n6M7174uNYKy5WsyX3P0FpzTXFrtjB4U6n7igbXkB9xRWwUHrAq81srR2wg2cijXRnOvILrhmauYP5Y8qG9jdZlfh2SnIjEt7MJMugDhvCYFQNG+lHWY7a3RgCI3MOvEb4NVujgMkG1UjCLwOGiDKQqodG5FlLPNgrh5De+m5iJ28Qmzop2+kX5ID2mg7VNVs8sBvz229JrioWKIYj6I3fLCdLGvXugW6XB8fYTeviA+/f3V30Gu+/IsVQP83eIvKFHYM5YoGHYg60uf5f8oGOUHibrx427WqgVH/KWJehbpv/NF2OxBzaHu2DUpQ8CuTrvr9xfXwhLiC3Xf0CZXHIM= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4453172d-1062-40a4-51ed-08d9ed0691c8 X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 02:31:12.3078 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: R/uacg7VVuyGzwc6yT/Jpc+2vpb5IQkWzzzmvRWJ3i/mySH8q4yB1L+ZwI8D+kW90tZHy4eG/bm1/t4R1NkkIA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU1PR06MB2326 From: Wang Qing It is better to use time_xxx() directly instead of jiffies judgment for understanding. Signed-off-by: Wang Qing --- drivers/block/xen-blkback/blkback.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index d1e2646..aecc1f4 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -134,8 +135,8 @@ module_param(log_stats, int, 0644); static inline bool persistent_gnt_timeout(struct persistent_gnt *persistent_gnt) { - return pgrant_timeout && (jiffies - persistent_gnt->last_used >= - HZ * pgrant_timeout); + return pgrant_timeout && time_is_before_eq_jiffies( + persistent_gnt->last_used + HZ * pgrant_timeout); } #define vaddr(page) ((unsigned long)pfn_to_kaddr(page_to_pfn(page))) From patchwork Fri Feb 11 02:30:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12742708 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AB4E1C433FE for ; Fri, 11 Feb 2022 02:31:40 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.270025.464213 (Exim 4.92) (envelope-from ) id 1nILib-0004kP-Fh; Fri, 11 Feb 2022 02:31:29 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 270025.464213; Fri, 11 Feb 2022 02:31:29 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILib-0004kI-Bs; Fri, 11 Feb 2022 02:31:29 +0000 Received: by outflank-mailman (input) for mailman id 270025; Fri, 11 Feb 2022 02:31:28 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILia-00046f-4L for xen-devel@lists.xenproject.org; Fri, 11 Feb 2022 02:31:28 +0000 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on20707.outbound.protection.outlook.com [2a01:111:f400:feae::707]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id b4e31387-8ae2-11ec-8f75-fffcc8bd4f1a; Fri, 11 Feb 2022 03:31:27 +0100 (CET) Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by PU1PR06MB2326.apcprd06.prod.outlook.com (2603:1096:803:39::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.17; Fri, 11 Feb 2022 02:31:21 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb%4]) with mapi id 15.20.4975.014; Fri, 11 Feb 2022 02:31:21 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b4e31387-8ae2-11ec-8f75-fffcc8bd4f1a ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hYaNSdFot0WjQEFauAxaxF7LZMAqV0LJMaBNOTZvAgVThCx3V3tVVkxNQ3QAoV8ylW8bJhqipq105DNTzkZEL3bJIYgyoXPyX41UvylIzSl3jPdF4HjC17l1R8XL0nJvybMkKAcgIeUW0EhbbG/zXYQmRiEGj+V8HYnXuZMmuspZ43HrnTD/jrCmlf1Pbp22VtIb6bnnm4s9wqsb2yXXfQnMK0fxgGRLlmfgsidCl29ECxoyiFzTGE6AdgJN7QY5LT34kcer0KAbG1bK6agXSoFiZC1Ma1F+IKW9BBajDbDs7akIwZSTi4ecxXB22kJszWuh7mFvpSKlwdLFE2D9pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Tu5+LN5qA0ySjgXs2NbBDr3TFxqioxt/13v16/cZ4jU=; b=P+WSgNNqf6CMi9G4UmRd12mMtvjq5KTDtvpzNqq7l4GbBJCMoUlPmDL6o2NIf5zBd9PkkYQXdapyivKOR3tVhDQGqpeajeZt2v2/Qu0B0B0hDX0PxpEdu7P9Mb7PltkS4aZy3s5LNmIz7P2cVnpKH0xwcH8KOt/O3PYrYIb0ZOh1alZ6h97RTYMZPzdZvdN/zF/+x6oHmDrmnidcf1DjZuVhobjxnubw6kCRvVADdvT+hqqLsKdJR33XUVwy/qyAOkIiIZtZGrrXYEQQHaGm8w0c2LodYDreTEf780oOtq3gNjksapLtSILa+hFA0D0RW2okVqMeyL2AkSBvcZ39/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Tu5+LN5qA0ySjgXs2NbBDr3TFxqioxt/13v16/cZ4jU=; b=SP+54FHc3BzIEa1Lk/wWwAoPfasJWtOsVsJmIkX4CENsCVeXHnSsYk6rE5XlwXGj8ajYAPx3PCMkk8exhtDNePt0xBEaa0WCACvRZwy9WjWOecox30jG0IkJV6OeHH2GfBRAYnK/+XRgttWj8Eyj/RQX6CSVc6MxtMO+KW9tV+0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; From: Qing Wang To: Konrad Rzeszutek Wilk , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= , Jens Axboe , Michael Turquette , Stephen Boyd , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires , Dmitry Torokhov , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Mauro Carvalho Chehab , Hans Verkuil , xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-input@vger.kernel.org, linux-media@vger.kernel.org Cc: Wang Qing Subject: [PATCH V2 2/13] clk: mvebu: use time_is_before_eq_jiffies() instead of jiffies judgment Date: Thu, 10 Feb 2022 18:30:25 -0800 Message-Id: <1644546640-23283-3-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1644546640-23283-1-git-send-email-wangqing@vivo.com> References: <1644546640-23283-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0178.apcprd02.prod.outlook.com (2603:1096:201:21::14) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 54f17a6e-fe93-4639-c032-08d9ed06975e X-MS-TrafficTypeDiagnostic: PU1PR06MB2326:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Yqxj2iWIIuzZawtwdzqczDFvGCSFSic0MRN2Sf1CAFjg9Tkt8fxgnGTFe2HJnFX4Kar1GtowNhQRjpm9IFr+M5umWukIXzV2k/j6QtDDF7kU7lJUv8//Cpt/c2yjdw4yf/vh+Re/22Ux4aPtLuI+xsbDPxpx28E7ARpvvqcAxjc9VitMYrYAo2FVa5Y/eUOxzdeTEX+S1AndOk8GsUp06siDV9HGqWYtrnfP8VMQw7WWGV9hrG2U2RybmaDP4i2XZHImaMKzeJtQjqQLkJo4Qyykh9Jly5Lqi5BTSxSkVTSoOy2eBSTWnUnFJdKX3HcsqrsqhEPsZR4Lv3KW6OSUYCe0rl4jeUXzBVO3Gl1zbo7QieZEHMRBZvUu/xbcmuk4ouGKiwzDHumQ6zlSA3VEefE6trY+JiaxCcbwnizpgC1axElAFEldePYE1u2fPqawiNDlT/DZCJENGsUovimfHdB3ywzX5lF8qz1S7MWTEz1xleNSAsvzWvcNJXehKZnHMW+DBJrOg+friLegy1el0p0vXIxJvCIwam4AS5ye5G8DnAccCyhqKoT0XbQdEzw8YHZBslBXHHOltVgW6B1vd4E0ZqusU0FqcS6MbV0MhvCD9ehMRqUDzjKdS5Cjuaajj9rY2zNqgb/VV3dVFYwxqEKy/R0YJOtJcbUV1ffvQ7e7xmpYoIftASyuoTo4JrsDKkISBVnfWP3fVQ4aO0fsr2aBpJwvQZn7SjJWpSzlRhLa07VmpmWgVOa9XKLTlA4z X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(6486002)(316002)(508600001)(110136005)(2616005)(52116002)(86362001)(6506007)(6512007)(186003)(26005)(2906002)(36756003)(66476007)(66556008)(66946007)(921005)(8936002)(7416002)(5660300002)(7406005)(4326008)(83380400001)(38350700002)(38100700002)(8676002)(107886003)(21314003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: EPj7tTLWJhAnjd+8vEpnCLOQzaZHf/ldw+3lsmz1AF3Fva5OW0s7lere35SnZMOgw1FMLE5Lmxu3jCbRZbbJWvm6bA49IC0Ovbb1OnlJemmQEr+bFacWNMWDVa3OFIhZQIgjVgjJP/xRUdJLicQN0Mad9GjQRURhZGer5+ZPJXczWo+GeZ3siUaxQ1lmWlVIMDwGXFWEJfTQvI5ZRZP6ksty6+l0ydTzHE/Zr5Ggfo6H4TeURudUrJWvaoWYorQ71h6GZyx4YhM3NkBcnGwNhOKSgLI54p5j8EnWgzwV29OB5JDjTsKgqajNKzAYLL8/WaYNLa85oINkIIbbdSChUrisTDXbSbeeGzqd9AMbAxIigRA4CGawimMxNgmX76GCDoIOu1GLX6cyyjPI0kCEc8H7yISe/3mB9U0TAGIJOi3KDOTYR8F7XeXALtdUF+1Pwv4+buqIsQC0L1LvEJfXA3q3ephs6As/nmXP0Vm4ioAiBdQN/Nm73ROW0FPNtqepqzKVMb+db8UlRdNXm6Mv8q5znjAB3cL+r40iGl+q35H3ZrpAveydnySB8bAV7ZWijgDP3qKEdyXP+OxQfR2a++B980W27Fr7BNRt0ZrPuXFUU3uOBvUXbCtWndZFS2auUVeyzXgiv65vmQ7d+Hol4aU8Qq69SojHQ7meBT7o9JgGPb9Du9A3WIjUYVyMhwaIAl4KWabe2yyon2mYtNBAX3SOVeXENRyJQv+006yfnkyPYgLVdxuNhZFNnM97/wgjvnsKX6kBDitcHiqMec+w/FWSAn5K9llVLbM5m0rTS8l3GfeBDr4x0/1setC8ZVVOkqYWWrAl/BINkH+wfO55iawUDQRJqglD7czL79mfImS6Dxd8jdxVr9C3iHWnLwo3JQVCbxloKb3tUGsTv8YG92ci7pOF9FaFcpBfmC9OniqngUtf4/dKwrO5Bt7jOevhhrVGmcpemlNks4EyFVo2HPxZLSnDi+7BekXwLQRIEvOVKvSXmuR1KWMi1FLs+yOy7bZe+a9oNsOrw55+F86vlxipIoWUUdjoFQ+RhY1Rg7uGyRKhCe4aOXLz8+G0wWvrjLvjMbapL/Y4CqNqmo2S1R+3UegGhAfetpqpNYEbqtlhrvGSGOY+v7gLGmLIcMHVuGouCr7Ti8nFTx71A9QYDVqSWVgUI0y6t4Qmg9cH1k3IZRptSNFo857/WQHjaYBzjshbRuYnioTsySGjBF3jSlet1fKrE+gTvQ5KdEyGjwd5AwA9+rvBBNQwBoRWAb68ln7pXoBTzaLU/YkFW+me5Claj0MDAwaHGZMd5PcfXVY6X195ZHQQWfVCME+ehx7djb890wXfiQstqNpRKrhztkgupPjeda0N1V/A/hT/Ga8c1dx0hOS865ftnA4dYvKEGZodAB+z90jH/LCPw9yXfgqZswjRJs3t4NHPpjm/8i69Y16vaOdhED4xQVLHhQkMDAS2C0V3pW5no3mjneytO8Fz4IR/rR3jLp9AwYZe863eMYhzZfpgbi3Qqb/r/shW1JWWhLcC1huJq4bFD53+8BYb0v34Aukej253CX40zwnXz6PJO7EXeWVIBJJxNvFrZZt0u0mguAxCR6uSdjGTLktZppNmqcNY60VH/nfFwUA= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54f17a6e-fe93-4639-c032-08d9ed06975e X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 02:31:21.7447 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: o5ShcZbiCtmLryyUEfbOWjk1acGLL5W9vqCQ+h3lPfIcXbBklSckOaIfy/WuPiY3vyh30C7ya9v6MlU7BMzfeQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU1PR06MB2326 From: Wang Qing It is better use time_xxx() directly instead of jiffies judgment for understanding. Signed-off-by: Wang Qing --- drivers/clk/mvebu/armada-37xx-periph.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clk/mvebu/armada-37xx-periph.c b/drivers/clk/mvebu/armada-37xx-periph.c index 32ac6b6..14d73f8 --- a/drivers/clk/mvebu/armada-37xx-periph.c +++ b/drivers/clk/mvebu/armada-37xx-periph.c @@ -25,6 +25,7 @@ #include #include #include +#include #define TBG_SEL 0x0 #define DIV_SEL0 0x4 @@ -541,7 +542,7 @@ static void clk_pm_cpu_set_rate_wa(struct clk_pm_cpu *pm_cpu, * We are going to L0 with rate >= 1GHz. Check whether we have been at * L1 for long enough time. If not, go to L1 for 20ms. */ - if (pm_cpu->l1_expiration && jiffies >= pm_cpu->l1_expiration) + if (pm_cpu->l1_expiration && time_is_before_eq_jiffies(pm_cpu->l1_expiration)) goto invalidate_l1_exp; regmap_update_bits(base, ARMADA_37XX_NB_CPU_LOAD, From patchwork Fri Feb 11 02:30:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12742711 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A9314C433FE for ; Fri, 11 Feb 2022 02:31:52 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.270031.464224 (Exim 4.92) (envelope-from ) id 1nILin-0005Rr-QS; Fri, 11 Feb 2022 02:31:41 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 270031.464224; Fri, 11 Feb 2022 02:31:41 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILin-0005Rc-Ld; Fri, 11 Feb 2022 02:31:41 +0000 Received: by outflank-mailman (input) for mailman id 270031; Fri, 11 Feb 2022 02:31:39 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILil-0005DN-Fn for xen-devel@lists.xenproject.org; Fri, 11 Feb 2022 02:31:39 +0000 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on20704.outbound.protection.outlook.com [2a01:111:f400:feae::704]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id bb462c6d-8ae2-11ec-8eb8-a37418f5ba1a; Fri, 11 Feb 2022 03:31:37 +0100 (CET) Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by TY2PR06MB2895.apcprd06.prod.outlook.com (2603:1096:404:31::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.17; Fri, 11 Feb 2022 02:31:32 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb%4]) with mapi id 15.20.4975.014; Fri, 11 Feb 2022 02:31:32 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: bb462c6d-8ae2-11ec-8eb8-a37418f5ba1a ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JjoDUp+6IAt3TmNvWmEvU5i5dq1hw55MnOdxjOoGxLeSsL21K9GC+RjIAYuDogD9hyCMSmAXDXIBuUTgiY6APGygabA4afG2YAeGiydwOrOjePujemxSlrOibEzMhOSgzzHS5Re+fNfW25ev7KW8zLgGAiWP/g+IqJQFb4bErNAYMXAyeph6PP8/0kbBdSQDJmm/Ssrx3IX27mgvrMQexYQ/cs+dbLdy8mkBfldy17bKRkYbCf7gjz2IulcKS3ibjB6qdW15u6FQURLToSTT623qO3hw/SxxCMfN9uojGyu0UitKm/Eepm77bNJrzZa9opUBd+7tSWgGE80RSHDrtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qXuFDjruBaKh8CiDorxYd0K6ecHc6UY3H0229Ft1TgU=; b=J7gi71L1mH/Ktf3wkuLBFxRRtLhg+rl2PfYhyKGblXrUKQYtBmlG/M6bHM0/+Ec4uYNgeyvuDF6NgtCfYwiB0H5sKRtJubcYcDFCTt3fvSzRaZ3JirK15OnKvnaYiAUulBSav0mF9Akg6mnl9g0OKIwu0VzZ7whvEUVnT01JtsHfdDExhAcqLiwMyqGrWcWo0x9ocnTk2zUldBx8iudIcvrBc9wkuowq52zHt7mmhjLK4ksMOVV2tVtehtsEIXfKI1Z6Ib5/Yc2hOXRxBVJ6cvod9w2JHXwhol8qO5NwnuPLqc45CBlDBiOC3ujRLT+FO0TPzujJcYhlMhO9bSWfQg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qXuFDjruBaKh8CiDorxYd0K6ecHc6UY3H0229Ft1TgU=; b=Rc6ZjedPMda0v0UqZ5HITet1gmi5Ih1I8cJCwPlCg0Bo+7IxJ5ygEf9U/IO8koI7VFPRltOPrRIFigZJPp0n6gbeHfbCaWxsJplrUnXqFE+GM1QAvjilZQkT835M92uSEP94vMr1GCHeRRC6vyzNJeUAryGfjIKaLFlA6TSkuWk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; From: Qing Wang To: Konrad Rzeszutek Wilk , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= , Jens Axboe , Michael Turquette , Stephen Boyd , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires , Dmitry Torokhov , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Mauro Carvalho Chehab , Hans Verkuil , xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-input@vger.kernel.org, linux-media@vger.kernel.org Cc: Wang Qing Subject: [PATCH V2 3/13] gpu: drm: i915: use time_is_after_jiffies() instead of jiffies judgment Date: Thu, 10 Feb 2022 18:30:26 -0800 Message-Id: <1644546640-23283-4-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1644546640-23283-1-git-send-email-wangqing@vivo.com> References: <1644546640-23283-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0178.apcprd02.prod.outlook.com (2603:1096:201:21::14) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fe8ac258-883d-4bb5-0ed5-08d9ed069dbb X-MS-TrafficTypeDiagnostic: TY2PR06MB2895:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3826; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zo/R/bhk4YPH5LccKiv+TX+wqX7W7/D25syY6RvkcP1xlIoeF4bHvdEVY7ZVn5LEZhd6FFobafjLvqiGAlNDktxB9/L8f6gQJMQFWwlhH9VXNBZQ7s2DIBDExQkvb7SUY5X8oqPNGlH85qRmigyEWfKVGchpeoKXRGww4S4OyxcTAZwwgRnO+JA7xLmQFWA2HqA2SDtwO39P1InflK0McUXYyFFDjZ7RdjgOvNkMfsqdQZ8Da/Bd8CJDtH+xS09saVOq2GB1R0mtTJ0Y/0JHhZkYgLCpRhPyZXVE7zhPT66CBo0xJrkWHwQCVqsgqnKnDMATM7pBHAedgfouT073upYp8bgoH7dUhk+QfSQKnKmgOTuiPY93JBWZXfSUIDr0p/+Lk28y5Lai+DpaHk7nLhGaJywUbTOC+zsLVOfbZXiYhqNnMvlON1uxhYNAYTGvPLlsf5PSNx018TCNjmhjzMCLC2VBLlzcVN/rKseRQ4ATIoICfFWkrI06dywiFPOiBQ9v12so6RcQZyKiKcGalse59lXl6sdjDKc+NHaQhDeNlnRfxXa4xcj5x+v0Z0MZ1fO7Ao07sQHLiZcvUSomnUnxhSb5ibkcDZmkLgZ1n39ySrpzCVjAmA0ni1wEH3AN+Vy8mo6uL89U4TU/84HGXZ0SwiTX1vE67/TCM/eROcUAiEpTzApJLqfXFwXmQNzd4fw4z3U0jlxiMNC186Zd69djOYJZZmpv7dBNR3sz3SWI1aBpyvqRsWawxpL0wVuA X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(38100700002)(2906002)(316002)(110136005)(86362001)(6486002)(38350700002)(6506007)(6666004)(26005)(186003)(2616005)(6512007)(5660300002)(8676002)(4744005)(7406005)(508600001)(36756003)(4326008)(8936002)(83380400001)(107886003)(921005)(52116002)(66556008)(66476007)(7416002)(66946007)(21314003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: e/bIM8AuiT9udRoKnStelhbmCbuYE+e2WZTAJGisC5tRuT29x7b+a0DWP4bvYNwl3iAlOCwnfti139KrGxzw4sreNnnL0mT5q+1lDX2HmmzHaW2wGv/K8ldUeNic8Z55b/irrrUobHNcyFrEqMAPskhq+YJgx9PUkvBlM/r/RlYzjYaRDZQEWwM5j/75QHJTu/UfSfn61Erq2ymiyAl7DAxUjNASs96TpUVjGynmM3POjclAfDZDIMm6ueczPiQlBuUXaxDenwladTdwRKQsDEHe0Uhm5Rp+DPDDmbqxPuO2UUqkBOvBEXqmjdRcAcezDkOYB55xcDFEENEPy2v+zCuJGPf2EIjZLl175ie+uRQdzaBCP3tHfXAE3hjcF9F2rAFoX+alnmmliArjm/C62U/IEVPzsmN40ziVZAFuLbYqLuS6iNRMoVfztTpkysd8eUBNRwjKvAuznPytDtyIzZvfiRD4pceYtnPH4rTEggnH/OwJJjHhUcOl+Sot3nw881tNEGuP4E08cDYbDdaJ1aj2xMHI6sx1/3DiBInsR68NAI4DSE8LYLeKZ1sorcpBqH9jyF4+8nGhBA0sE7cluNDdWto8qMDdkJ5KScuN50r+aSJbob75H4wz3S6IJP7oEERyLHWYNygaS3PFKF6FS9RJAGy5/n6GO56G7jpUXdX8NdTOoCTjsfH7IAXfFSXvxgACjDNByF8aPCyUQ+9xFJzYpIS7tiQohPQId38tFWr3FShtbVfp06axt1Q2lp8r38fCeOt5pkO+TFxs/Foyd8C7kIdi9xbgkzoc9Wo4mxrCyPDf03iCDgtpUPPg5wf/9t7UlHXHaNwVb3RSaZqvpvMmfrA+giyGVTTDbREgcKjSQCoNoDtme1o1mbOfuaqV4veO2P1QPYLOfunhfg+F7HfcWQHVL5Py7CVMmFIvoe0iVFKScI6BMLbcJbKza/qbRWQz7tIE1DpTnxoIB+CaMEQJNgWuJNYpW/mbkYSxY1L8UqwUsBkptqQz3m0oNdLh8YrzS1H4onbN8Pc+HZSwLjBns2vblomcw2Ux+7kDf24jtvn238CWythcmJgTNh+VRF2J3C7Rk+Oiwu12rMuIH6bZUJOL0lmKs0n3vvRMmSbH+jMwIFUNMMsNrZOr3SZIPyRry3k4xtIlFQsqHVg3hGtnM3vitS2J3mEDDvniGut+4Hm+nDVaUOUmUGMo4/Ut7uYjooWHXyy3VlAO/xqEj+DJ3UNv3WIMwFKFiux9MteBUNvMvc+0ylsVT5bJ9cIU8vL7JdQni3fU5T3dNNMaR0DWizPZ7uXoC8MG/dE4pad+RnUI8StFM3uftnhqN+WzD0cFnMcIPmCQNH1YhcP15+Y9BiPAuaqDhsDmaibuilsasq3xsDmuQMyfvdqnAyx1D0e8jw3p9/dP0ht4dovmlxCd5Xr6xYPWW/8s/DQwX1Xhr5Dk7yncPNsEOPhOgAsh+FcTOV8RsfipLe8I5/hVQk18+LksjIkuAsZ9XOa9IlO1oLqnY5WTPZr3kRSQWaIDT2lp/paOfP/Bu/q5NE/qyfrjs+uu34nWNAT5cxP7I2SPtkDtrj592myGYuA12vkr/x6NrrLK0+WH4ip9tSJkggSi3sULiaAT6wd4HiO7Uvw= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: fe8ac258-883d-4bb5-0ed5-08d9ed069dbb X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 02:31:32.4316 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: v/oH9WScPdLif6Pl7r7BCJBGenT1qn0YKCRUYBNcVPrn3O6oBRxTzJbBkRtJgninQGAvI9WToS7m73nvAX5qyw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY2PR06MB2895 From: Wang Qing It is better use time_xxx() directly instead of jiffies judgment for understanding. Signed-off-by: Wang Qing --- drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c b/drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c index 9db3dcb..b289abb --- a/drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c +++ b/drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c @@ -56,7 +56,7 @@ static bool pool_free_older_than(struct intel_gt_buffer_pool *pool, long keep) node = list_entry(pos, typeof(*node), link); age = READ_ONCE(node->age); - if (!age || jiffies - age < keep) + if (!age || time_is_after_jiffies(age + keep)) break; /* Check we are the first to claim this node */ From patchwork Fri Feb 11 02:30:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12742712 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A0381C433EF for ; Fri, 11 Feb 2022 02:31:59 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.270037.464235 (Exim 4.92) (envelope-from ) id 1nILiv-0005wQ-8J; Fri, 11 Feb 2022 02:31:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 270037.464235; Fri, 11 Feb 2022 02:31:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILiv-0005wJ-51; Fri, 11 Feb 2022 02:31:49 +0000 Received: by outflank-mailman (input) for mailman id 270037; Fri, 11 Feb 2022 02:31:47 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILit-00046f-KD for xen-devel@lists.xenproject.org; Fri, 11 Feb 2022 02:31:47 +0000 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on20710.outbound.protection.outlook.com [2a01:111:f400:feae::710]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c0d8adb4-8ae2-11ec-8f75-fffcc8bd4f1a; Fri, 11 Feb 2022 03:31:46 +0100 (CET) Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by TY2PR06MB2895.apcprd06.prod.outlook.com (2603:1096:404:31::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.17; Fri, 11 Feb 2022 02:31:42 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb%4]) with mapi id 15.20.4975.014; Fri, 11 Feb 2022 02:31:42 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c0d8adb4-8ae2-11ec-8f75-fffcc8bd4f1a ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cZn5jB8bpXWYIu8Ys0YSq++phxSSzePZasN22zQCRicPCEJXkLPPO9qO9X6Dqp1voFq0Iy8pvBqEHqDrG1j9rC4YFoXn67LhkYdIBfONDYklFnS0hHU76kL2mv1POSwUr3jluubkwyKedjGuwFgpGJoczSHaz7ZDlruryJKV+HxcBo/3+aIFQRR7tRtEwITfsZQ1qf9/KNM3lfdiqC9HG66WqaaczkbVlEvxUXI31ftco08wBi4bEHiMXoYijCPV/Oami1TtVcWAK0qHALCNd6m8vHReSsf+W8eETLPGWEfUY+N6SSK5RdKAePjporPeoEmXZIevCcS2u9RiifPtgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HkZqYD9sR0gZg/Wdul/591yVuUFVaaLLrwE9a3DsPzk=; b=DeZgu8a+tv54Mi7GPTecdWummtTqDOIKtarcnZmMCuyWvcl1Im/IaJmVrSXYLeQzkkuxVFIpLrp8D1BmJUP7r/LFLIp/D8jNp+v9kLLhDwRMiEwJQiQidkwZAe9kssGosxtpi+G7oj2/ZMgGdLiFKaodYkfwBMt+6L1x8jQ8GouqA6OyIZVmOPgToVAh0Pp4fMw+WWKUzGjY7MwYypGv6BvmB8bGxjJueb0dP3i/BIubJjAODcU+m/UfB2vNs7DNhmRk+tOPEv7rw3df2BixcLdEnS6LVF9OkLucm2CxtQSqq2awChST/hU31OS5bEAerMvkg7QcO0o5PmOkP3CQZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HkZqYD9sR0gZg/Wdul/591yVuUFVaaLLrwE9a3DsPzk=; b=ZKU6sMxlURdH9BQ9eGwejG3xOCDZkJmdXjoCJdVnpStpqQ4WwWrNZtlRSfFBYwVkynpX3/jBk4kKVq9+rl+6teciIynIrYxfio7d0mfeYP6WPVFeBFCgVpywlnF/F3o+uzTeDzxi03q+wBl8qCLQYWLPNpydjDJ4WJx9vsxr0a8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; From: Qing Wang To: Konrad Rzeszutek Wilk , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= , Jens Axboe , Michael Turquette , Stephen Boyd , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires , Dmitry Torokhov , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Mauro Carvalho Chehab , Hans Verkuil , xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-input@vger.kernel.org, linux-media@vger.kernel.org Cc: Wang Qing Subject: [PATCH V2 4/13] gpu: drm: radeon: use time_is_before_jiffies() instead of jiffies judgment Date: Thu, 10 Feb 2022 18:30:27 -0800 Message-Id: <1644546640-23283-5-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1644546640-23283-1-git-send-email-wangqing@vivo.com> References: <1644546640-23283-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0178.apcprd02.prod.outlook.com (2603:1096:201:21::14) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f244d204-a61e-47eb-dbbd-08d9ed06a391 X-MS-TrafficTypeDiagnostic: TY2PR06MB2895:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3044; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0AL7Nm1Aur2OluoZbKm2LgMFQkifIuWuiUxXHFoWhejTbJvi6k7rj8KTS/+UKcv9CR6iUPtxusMwWQ9VDYT1DK7PR15v0FTc1SVkI95C09hB9SFuLjb6M1S4UkgsmpySIdvKTlLUZfrPXpfQEi+d3Zi5HImFeARlfxaw6ZbtP8r1S4ryYMT+9wxtRxyB3w9j4YBLNqF2fo+aN+8NjXnpc9f60FUBx7zHJkcg02yubgKZCNOPqb7a0Rt25ypMDhMnFft7mcoYiIsOCzkUobY1ArSYfCpYilOKauip3fpaWUA71XoEWLRfLYYDK9w8LPfJYH+wMjxKL49AYDijdiRUngiDwAeQHm4U/Mk2nm4C3W+45Jwya/+ODpDL2mdkm085UafGmml6CyzhHSUW+dpQbpdaCYtkMBb06Ws2Z7LlLEINqP0XAPmYOCESh1lNhK4aRYFtpxUnn9m87isSoEfbCdzlHYe31FB8IqXBIE8RA8H+yVj9LucjeROOGOtBEDInDsVVXBBpZGz7Ba7ky3CYT7+ZbyGl03P+Rnhihf3+QV1YAFrDt7itankMwg0CHqNksbCxov3/OCLvsa5eihosLTJxa46ddrgOFcqpWev1hqrkuSTdgxviMiQgZC8dXgNEsBEHsNbtaGRWamKKPRwK0CNRRioz1Os2q/GjsjeviqNSjV1K20Q+oxNsIvH5PZW6SOXVXjjadIvIuB8bPiLjHcT1iVxOQa0247dBZYoLHzEnbsGTUoQ31frUFkkjJ+9+ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(38100700002)(2906002)(316002)(110136005)(86362001)(6486002)(38350700002)(6506007)(6666004)(26005)(186003)(2616005)(6512007)(5660300002)(8676002)(4744005)(7406005)(508600001)(36756003)(4326008)(8936002)(83380400001)(107886003)(921005)(52116002)(66556008)(66476007)(7416002)(66946007)(21314003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: alyDAJC7lf3gI2MqaeNi7+CcCL2EWScLzyYu2wnwKVvQo03qe7/EUwYM17enGc6z682h5HDKYPbkSlQODtYI44Vgi5YWHz67E4l+dZmsBtDaGOhnIjIRXXunhVPDtUpo9203hsGVhRgo5YOCAeNEZvrOjHKiFgGIt2MGuu0W33nYCv6pnIo3j5jXpI1ug2i2n3PASlMneavxryupDcy5HpZfut0zMN6+vOuNqv9X29zVWeuRrU2vG9iLr9EmN4BH3IpYIRM44mVB8KXJK/jCUmndt9DWqJeRQHeTRXoD36RpNpJ3xoP4OgJ8hyRoPwbDowpsvBrmXiSX1onQ9zAoJpEfxlRTRxoXzatGCkul2fe+S/8BQZSB4JcTiVEhp8qMlgWQTwhJZ2zrvh5Ty355V1g7bQ2udQGSg1d4Mno7oqAaARd7PmTW1FelAX3ZX/5ip3smlhfkvH1rITbND1zU0b6xIASbEMtdm8pQ65+w5w7QpLZIQcnYT7htSgd8uh279+io8vrlfDq0yHikPv50LFGdsOzz7ViID/4szux+Im/ZAauAi3Pide47ITa3lLDHyqNR4kTS/mH4xJZnyocbMLnPkqkl7+kSNp4h/qGuN2ORtX9Bb94TT5vgtXNFS7ZhennKMFby7mAcPFBgkOEipPYbzLyR5TeIDUJiISn0TjxofHxf8zlIWEHP4EGFp0W5hVZhL3x6YIiGOupG+K/mFHYO45n00Ba272yTXaoHyApJZu+OCezgm1v65MH2Krw8zsHchyaMEOgsUoB1YJJ+OqSB0iLx9sD2z3mJIWvMNO1FDkzfBKrQzA2Rt/f1loLDO6HG/dGFJT/i2de4NxFmDrosyeRN+0zlHUAvxT7zEcYeRvu3FwHD9pXUGvpyRALwy9tTtv0dzyqMc3ULthWpjjmtYc8/LDnt5w5kbiPhpZuKHNbyN+Z8KtCXuiPPFDBWFKjdcnPjhhP+nEySXZ3NGLakJ18xKdzkucdUpY5AlwISoQPHG/d8KDp5tSrckqVpjEg6+Jqu45NnMbNIrcZ19P/LfPXUst9GaHdG5BAnMbHQ/SRtnuYszKXJzDxZi9i5RIEQe5bu5oJK9IFabkHZdr5Q3rLOnOoS6yQyxNqmFdU0ucMLvoDKgUZ8qQKtJ+bmSmHdUPnzf9yhZNCaHLwS4jv3y74QdB7xZOf3m95Ti9gZp7r4tfpEv3v9tj6rDEJAhvYtZT6ch2SEWH5ywjsp3S3s50eHyt7ALvNmv6gPDesIj+vWPdjIWsk7aJvLbtUNIYWgI2ffdIxqQbrcbO6XghZ7OCHOKN+FTSpUcGflgUkyze/iS6Df3gZ2eS+0SWv743Uc9TfuqRziT2HrT+p0O30pO/fh9ycpW46frN4YLck5HIPACTDc+gu4YceTaR2joqFh4bbiYZb44Gw4/pt0kpSRXkivGYDD5h8WC1zXoYlim8ffIkaFIxR7/skdHIz9zMn2CWZjLGmnmyeOlcg9MzMi/dPOjCVNrsthg69WhCkulWrHInks2951S9CEZkLN9M3wfd4hMrsEtvnU5drFK3Jfks7OIB5TD4/96E5EHhRR3pZPcv3JgR1/qPnVCFGCZRXLoLY7cnDX7gj/vRYfThFnBoM0acFG/fWtfEHAgMk= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f244d204-a61e-47eb-dbbd-08d9ed06a391 X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 02:31:42.2436 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: v+F6t0V4YzUrv/nbwcDfsGjFMf655h7dYH5QSRElM6mIVKFZKFoCJy+K4setluG0VnHQH0/whpKc8KVA7RVo2g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY2PR06MB2895 From: Wang Qing It is better to use time_xxx() directly instead of jiffies judgment for understanding. Signed-off-by: Wang Qing --- drivers/gpu/drm/radeon/radeon_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index c67b6dd..53d536a --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c @@ -25,6 +25,7 @@ #include #include #include +#include #include @@ -1899,7 +1900,7 @@ static void radeon_dynpm_idle_work_handler(struct work_struct *work) * to false since we want to wait for vbl to avoid flicker. */ if (rdev->pm.dynpm_planned_action != DYNPM_ACTION_NONE && - jiffies > rdev->pm.dynpm_action_timeout) { + time_is_before_jiffies(rdev->pm.dynpm_action_timeout)) { radeon_pm_get_dynpm_state(rdev); radeon_pm_set_clocks(rdev); } From patchwork Fri Feb 11 02:30:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12742713 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C89F2C43217 for ; Fri, 11 Feb 2022 02:32:10 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.270043.464246 (Exim 4.92) (envelope-from ) id 1nILj6-0006ea-Gr; Fri, 11 Feb 2022 02:32:00 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 270043.464246; Fri, 11 Feb 2022 02:32:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILj6-0006eR-DU; Fri, 11 Feb 2022 02:32:00 +0000 Received: by outflank-mailman (input) for mailman id 270043; Fri, 11 Feb 2022 02:31:59 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILj4-00046f-U4 for xen-devel@lists.xenproject.org; Fri, 11 Feb 2022 02:31:59 +0000 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2070b.outbound.protection.outlook.com [2a01:111:f400:feab::70b]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c7ddfa73-8ae2-11ec-8f75-fffcc8bd4f1a; Fri, 11 Feb 2022 03:31:58 +0100 (CET) Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by PS1PR0601MB3705.apcprd06.prod.outlook.com (2603:1096:300:80::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Fri, 11 Feb 2022 02:31:53 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb%4]) with mapi id 15.20.4975.014; Fri, 11 Feb 2022 02:31:53 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c7ddfa73-8ae2-11ec-8f75-fffcc8bd4f1a ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kyskZmsLwwe3yXU0vUC+lHOfL0dRzpC4TyCbqMmckF5KhF3EP9mS3F2ipzOMQBtTLghBbIV8oaluK7TmoKLAbNYvCvoyDDujMMeIrqnA5B1QKicPMk2FGOKWS1MuUgo2zR3buvo9L7tO7NAG0BZlnIcuOBWk0kPmJIDiQSBLumQJdnd/0Zfr0sdlm37SaVNwpqvB1xc3kWyrJn0EAiP7qeRODdykqTY5SNjrExCJcJn/x5Wc7lGiof8Il5pjS8U0HdgSfOt4xgiQkZ0EYhDDn9uxFzMdY9UD963ik114Zy/QIeNr+1yBvV+EFiQAAe+ebLJTIxzEl0aa4Bflw6ckgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1AyKPt1GvYb2+QH9UAVuYC9O8m2sX8En2sKfKVIJO08=; b=bsVLxekEN5UYBzvk9SC5nxWJ+NA4k+xfyOHMIlDov3O5kd3zgwdvAlvUrR3CDVuLC6mZC1YDeGjwy9S2SbCoxGXKzxmiCffG0toK1ZMcqUC18i+BGVKoEZc8T19lN91GKgErWSbr+LgArhNk3XKLzGcz6wggUYCr/TXH3DlXCPuHiiif1joa5kLwHWABVw6D8K6PIKgXVnqT4MdjDUvi9fHZdmNNMMiNtLaI7fFTKR+/hf+EZ0QuFJYHQ8ZUoMVepSqMS2VXXqkaEO7Y+kAQKTDHLWHN4VgZFo4DD1P7gBhM0GM2W0vi9Eg3c18Im1wAGH86Ie39LM/2Sx7ZVZBMQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1AyKPt1GvYb2+QH9UAVuYC9O8m2sX8En2sKfKVIJO08=; b=W8VxLlpcr6wKuJKowz6iapKBV/3h1SHoUp52BqZsBv1yvnuoCuiJ2ic3GDtH7E7IcniT/PXsd9IWCVoGIiBBE5M7cKIfU07EkAdhuNLJhNRWBBFyozjwhXr4+SJ4sHL3GKDW4aRnx/sXHlRe6Y99eEH4l8vFiWclTqYBJ06TI9g= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; From: Qing Wang To: Konrad Rzeszutek Wilk , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= , Jens Axboe , Michael Turquette , Stephen Boyd , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires , Dmitry Torokhov , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Mauro Carvalho Chehab , Hans Verkuil , xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-input@vger.kernel.org, linux-media@vger.kernel.org Cc: Wang Qing Subject: [PATCH V2 5/13] hid: use time_is_after_jiffies() instead of jiffies judgment Date: Thu, 10 Feb 2022 18:30:28 -0800 Message-Id: <1644546640-23283-6-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1644546640-23283-1-git-send-email-wangqing@vivo.com> References: <1644546640-23283-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0178.apcprd02.prod.outlook.com (2603:1096:201:21::14) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1d70cf59-bb08-44c9-d8b4-08d9ed06aa1d X-MS-TrafficTypeDiagnostic: PS1PR0601MB3705:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2201; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kfbibTSneam9oWVKH3DJ3QOmFnh1mxRPRDBXU5LWmu2QQPbyKOmkjNUUjHmIAV9oT+FH5R7EvNcx+TizTs0YPsdXg96FAf+MOM0q0XWfBFTqb0zMhLoqf+zH0Ulk7GqEFfxbhmPxPy06oS5nPVqv1VFFSrZ3TXJDYb/sMLZ94ev8c0c+G2/Bn7r8pzjjHr5LbeCTw21M8+fnytSNLajBvg7BpsMj/GMhL/MTyrqmtQ+H9+Om58JtZchdluGQ8PveT99QYc8D2BE5HnapXVgo7BUQYxDAm7tcmTe9M+1AassFREhfHKVOL5zi12RksfC29ozoSPf/hgFBDhiM7a/CMyB05W/U8tV+F+JnK9GBFHXvOImkabeBzWgZpVwm+P7AwTjPM24J/8Cdtfg4c4UBWbylIMjqzMJREciO8BV73AoM8folGHGIIXDe5CzWAbu0rhouhlltDpbkbezfUECpu7nQG5XGVu570OuqBGRlADPLib2pzOKzGJmH42lBSyPSqEcz8tpWDmg8pzXZNkLETWMR4dOj2aedfY6/LOT2IQr+knBwX26/Z7P2jyYHB3WqSpAfl8kXuw1cplmxseQRgj4Usv+EuKEY32jinmrVtUryMXjj/aiMeLu2DN5MgJwqCP6qhoIiKYR6R3hygd5Qe0NSTahaRaiqQT5DsEvMfBebkML+ADjUYtGKj5w7U6Zu5Jo+Eb7J/KzsLiZt/RESM0GoeKyXO5nOSYX7VgTCTg1l5eBX2YAyZkrE1XLl286L X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(186003)(2906002)(7416002)(66946007)(4744005)(316002)(36756003)(2616005)(107886003)(26005)(921005)(7406005)(110136005)(5660300002)(83380400001)(6486002)(6512007)(6506007)(66556008)(86362001)(6666004)(508600001)(4326008)(52116002)(8676002)(8936002)(66476007)(38100700002)(38350700002)(21314003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BBfZ+O1Kxqh21loJeQRlANfu0QekBm26HVPA7GyNiNYfAo4+Um03Vc3uJq2wJJgjUFV/xR3uMWvKcFI3tTiNy/upkQ090Zy8abBi0tIs7V6ScpzGgv2UR8sjYCtDKIX8nXAeGQBI191G5ARvLsxC4+Elfr3w19dfnnSZru82GZUeH3ySavehg4ZpeeVonCgHFm84185SCy+4C5pIAI7s8kLNZ4+4d/1E7ZxLt1dWtMqUu9AZfUvHd0nbVuQx3wG5XbxbFuDvtB5Uyp3riuzT29pfWHj9o++CxNUHtQj8wGnmfN7vgffFbifDbWNICqUrIYx2RRljjKB6aVtnpcsvUSFdk36xOeFDjcFkX4HgW0Tfa7wAKMkt37by333t3+cq9urgxkK3Z1yqgd0f8Oii/Q8C4NhE32rcA/o+IwspIUdC7W8RhDigWSnjrbbH1p7KwTVk1EZiuuB/k02l6WJI2+x6ZLYhLF+vxqwFg1ZSdvdTDGQnH7XnR3Ufati+nzTrp+SNgnJdrzK5DGjOQr1INoiSkiHF9qWVnKBwo3E7tOU4b5n42g2nOOzzeBJ/qapVobWALiWPzsmK9hnxzb2wq8vk+53gw83z0/2QGglEllV5UBWnP77rKVB8XnAORTGcwWAhr/9jdUw33WslorzQBNL/U5+2amc2hNL0V/4MhgGDrFcQzoCZSqB871xZFrSueByvP/15adpou0MWiuL+xx9xoYVHxW0CJdna2gsC8qSn+MrCQSTiV8wnDiyw379AS5u80+tnNDdcwUaz0xElVWdafxDXoBduBj9f2P1RQ5cb2EmrGYZeLP8x0DYsgbc/9EH+/sPotmyFrpjAQy2O8eQskqnOFdVmIvjmfzBiFa1tO6XTX5u49+NRItYisUu88z4emUMvimxuXxD8VgL9ZaI7xnwSXrk4eaHDai0h7BXG9wJaMZ5LhgFsjjYJqm+n11e6sxy0tWvxw0LYwm7xJx3lgh2jqishlwaklTMkt2EbWgn5jVgA8Qjok8SVGPmEIkLb3LEHnaAqhpzz0uwH88qCk8TUnU40rz0/pC0kagWiMGGUbEHZ5pm22RIniCO1iKMlmnilOuJE+8eRhLCZaJQl26sMTUikZdcbxovBOoohFbQV/MlOBJBV4mPOvBQnKyDE8kZ1t3GQ4dkohKclpgk7VlQKWnRwxV5jED6bdzjSfM5vZEX8A1xMZbbXIF/TrnoonkmQ+kfOvRUJue0PMCFoo9gCaSXN1USoaxgYPjmMTLYYB3UBE1ICle3hk9qB8IkDWyhrKdws7iw2yk7wjB9rLGjxTi4igzlad+b+2n4Q7ZW0d0VJ2Ztq+vQHKZCaCsxr7jEm0OiDBIxe0eqTt3Bv7m4FyMVmKWrtHsORE7URlTNn6yx/R8E/yaB97QPwS9Cvmmx6f7LYEqxh8dzkgSCy8O18+xXNnbdOHAhQK2vqtoTuzghVXMHztLsmHN+jvKq4WOyl0Qu9bcMYMsHmOvNNSpmfT0tMrhGgQVavp6BU3RU+VZQZou95lS3L6bPIrFLiG43CbdvDLQbMm5DtN+8xHCOzkPZyJsZYhuWU1gq/VtpU874+C3AAzhEvMUxqHQU0HFNNj9ksI3ISeftAOrZU3fHBQYef6Wd3ZzS7Srg= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1d70cf59-bb08-44c9-d8b4-08d9ed06aa1d X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 02:31:53.2742 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7TylgQ8NLxtwkXjCtK6xwJY9XXGkueBEZNf2tBbnWictxmcg+fs+mPezSy7kFaW8Y6nxMhs/TlXtqAL4sUD76g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PS1PR0601MB3705 From: Wang Qing It is better to use time_xxx() directly instead of jiffies judgment for understanding. Signed-off-by: Wang Qing Acked-by: Srinivas Pandruvada --- drivers/hid/intel-ish-hid/ipc/ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/intel-ish-hid/ipc/ipc.c b/drivers/hid/intel-ish-hid/ipc/ipc.c index 8ccb246..15e1423 --- a/drivers/hid/intel-ish-hid/ipc/ipc.c +++ b/drivers/hid/intel-ish-hid/ipc/ipc.c @@ -578,7 +578,7 @@ static void _ish_sync_fw_clock(struct ishtp_device *dev) static unsigned long prev_sync; uint64_t usec; - if (prev_sync && jiffies - prev_sync < 20 * HZ) + if (prev_sync && time_is_after_jiffies(prev_sync + 20 * HZ)) return; prev_sync = jiffies; From patchwork Fri Feb 11 02:30:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12742714 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 78DE5C433F5 for ; Fri, 11 Feb 2022 02:32:22 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.270057.464256 (Exim 4.92) (envelope-from ) id 1nILjI-0007EM-Py; Fri, 11 Feb 2022 02:32:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 270057.464256; Fri, 11 Feb 2022 02:32:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILjI-0007ED-Mi; Fri, 11 Feb 2022 02:32:12 +0000 Received: by outflank-mailman (input) for mailman id 270057; Fri, 11 Feb 2022 02:32:10 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILjG-00046f-Pd for xen-devel@lists.xenproject.org; Fri, 11 Feb 2022 02:32:10 +0000 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on20705.outbound.protection.outlook.com [2a01:111:f400:feae::705]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id ce5552cc-8ae2-11ec-8f75-fffcc8bd4f1a; Fri, 11 Feb 2022 03:32:10 +0100 (CET) Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by TY2PR06MB2895.apcprd06.prod.outlook.com (2603:1096:404:31::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.17; Fri, 11 Feb 2022 02:32:05 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb%4]) with mapi id 15.20.4975.014; Fri, 11 Feb 2022 02:32:05 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ce5552cc-8ae2-11ec-8f75-fffcc8bd4f1a ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hIfy3zPFMEbsGtSoSPPqbkeOZ/dLOYRhHpUAR5suGf0g13wWkXMBPST8Fhr6n/7cQw5DqX2AdL7hqO2geNXWARmpnRgvAaRXQ/b9VHLTMT8tFEIbPQnJ+qjBY0dhfBHqH/WEA3Jujet6Vqxhxo4ASGgUua+3W2YMZgdME8yLHeHNXszr8EkJZCsegRjL4m4Rrf2hzfQJXoKAzUn2Nziou+RKBQTUIjeWmLStwmtLIoriEyWVYLjFFz+JtfaJE6Yb1fvTU3haZeC0UzG/kJdWGiXtFbCnLk34hPB/ZaevsLKWne/VXoBsxKEaF19bgjwJNc1QD8CB/XAu1TEuuXdT8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AJmrL/wszRwZlM8YVbrQxGpNSgXK6M6vSTblQPIFMZk=; b=fZLtPnmelz9hHT+SBLwremtvuxlBf/i97duKgdlLicJMapgsGYxkM7ekYio7Pqs2xqalvaWb4a4PPyY6ePuE46T+6ECgZEg7AQPNZeiW410j8/dtomsvKjD3vfQIBxHdIFYI6CvJ0HDNZHApXCu+E8yxgvBJg4q5sNHXPw8HaXSTcCff7VQA/oPNpMgyeU0YW9nTl9KFgXwKNJOKiQU98yjlcsPcKdnafBe/Q+9lGFt45RQVyvI7yLjBrl3xGWLMxNeFahRxuyFQDtpEzF4Z/lTa4P0ARmevDbfyt9Wn2JwOJ0Ncn93UcBRzHU2abDTvZSvgJCmVDFnPL8kOP+Y64A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AJmrL/wszRwZlM8YVbrQxGpNSgXK6M6vSTblQPIFMZk=; b=LDllR3IILBHFO0J/aZBfYXz5fNvlV220gcDU3SWKf+HU7oHuWzU/dB0FR2LJfl/dYcSy8cqB31wWUe2Mb6FEIUq7uzbzVVCpg+g3myBOJgzqZwDq2/jtLrEXi7JxOgHSh2NqwPFlxkIDBzHxIi0wn+xWvRizEAh0w+V3IgMIFtU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; From: Qing Wang To: Konrad Rzeszutek Wilk , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= , Jens Axboe , Michael Turquette , Stephen Boyd , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires , Dmitry Torokhov , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Mauro Carvalho Chehab , Hans Verkuil , xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-input@vger.kernel.org, linux-media@vger.kernel.org Cc: Wang Qing Subject: [PATCH V2 6/13] input: serio: use time_is_before_jiffies() instead of jiffies judgment Date: Thu, 10 Feb 2022 18:30:29 -0800 Message-Id: <1644546640-23283-7-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1644546640-23283-1-git-send-email-wangqing@vivo.com> References: <1644546640-23283-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0178.apcprd02.prod.outlook.com (2603:1096:201:21::14) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d708849d-f73a-4f4d-cc35-08d9ed06b144 X-MS-TrafficTypeDiagnostic: TY2PR06MB2895:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3044; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Knvn+ZoyuwtwWjb9mcX7NX4jSd5sdfPjHKvVg0RXnl4B0HLfdv7nMLFc7oEB4uoAC7nhPliMSDWanEG6pMpbUMVchrTfRPtCpo+Y9i2hsRrc25VPJsQIlYgbOHynMgwohX+gOCxM98x/hcUkKTKy6Ryyhot4nSM/0df5459+EPX+x8NZu34ETQArWLJOO3DJoFyzdyDDJijXFnKF8StSK8SDk/KX6pxA24EhE4BsT7pE8nNubWPzCoKTJZ7vOov0foDGTTu6krh/sLcMo6L6nZ6nydKlrooia830KyO7n+KfO43/q8wgsu0A+JODt2HzqOlnx941h+brnfgGknRGrExAUXDCl8qIKFU0jeXg2oIM3raNNQXDgmZPJOmeMV9EhhTFBr5mgg1YOlGcDkX2Rx3CZfKwql7KkyvR7akXzIHPo3pC+7d2N4rU1kFHPBOq+rv1FrY2/QtW3a0t65ZNCOQDeECkSq5ewxwXJiYpN0ZKgFH1KLjT7ocJcx1ye2Mjkzh1io96S0XXVoxVwnFgltmxzN3tbxnfFLn3kP0Jnh9Sv4sKlzKr13KfQgEjlD66Y8FsDfp3Xp3FqQnn+hJ4WkYB0fL0fxaXSwDlsdL/R1zm5erAtH3JjL2OMueHjzOjBFj1hDM2oTVUQ3HXfriBYbSf4BBfNyfwfOv7LhlhMppZxHs0XurFN1SuOtP7wCSnfPcNMxU25l/4naC+SDZhkRhEnwSvc6XBS+HkJgo+XK7hZZGCTdgfdd8zaO/cYRS9 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(38100700002)(2906002)(316002)(110136005)(86362001)(6486002)(38350700002)(6506007)(6666004)(26005)(186003)(2616005)(6512007)(5660300002)(8676002)(7406005)(508600001)(36756003)(4326008)(8936002)(83380400001)(107886003)(921005)(52116002)(66556008)(66476007)(7416002)(66946007)(21314003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: j1JTYbUZFwE57rs9P/bZPsIXhEWUhUwZYslxJXmoBcB0DzYfbRs71yby+bz/vz75e/QAd9pa2P700yMpBDdgLxzW6+5gs4C2NReUwTJLVy/jkasgGvEJEAMoANyh3VAVxDLRWeKzNgfmUh59OQ0gG7J78o38VzqvB2TASGOVv9JmA04H3jizVATIIQjKFAWUEX2zZraRVTaLYF/Kn/KwzMw+jry1qtD4Pk3NcNq3a9h8UVqazDvMEWaV6dI+Ps0UjvurBJ0po1LIa12Dn1BruvzU4WmY8X/Q2Sur9NeUloSc8ccM0l5hQfo0YztFRCut2eaB6mWaG1NKEJ3KjWSsLKJU1ksTHAptEVL+jpRpQj7+D6zg0cYdt8RfQzBKDr/sxGlyKyCaHs1vK6+Z70aP5NdTA0vFxnluiB8Cp3N6bDN7BqbEpAAAMj+WVfPHTtIByNjhVb+oDGgc/O4OLFVaYNrrrVHz5Zi3tt5ZMkj7zIUURoHN7vpQHb3Y99X2LhgNrHZ8kbkuhPnXNZAU0Ysfw/jsRKosMzLH/vn9iS3+9Jk5h0q75TeX8s/kGubhwUfMgV/S2lLcpf0UpUsYHxxtYzonK0oCVegi+YetZ4v7+g+GSVsGmb+KPqjx4Mr695Kr/ltQ8+JgB8Ia+dmkVLpmdq1udpl1z/U8BjmWMAcnjNrypYQrJkBH0UESuwbjcCN/nGRl+164MP1mXYSCfsVevoaKz+vMKE14aCjXvtA03yJ/PZTteqsLnw66sOptNlHnVKIL9l0Fdcj+jDebUhmOIBpfoOIcioevcPPSiH9jWL1swvSekt6owINn4xveOlxIl0GOQ3j3Yo71yZzslNQDV5uF5+Ur/j7819SU+IkaojzQ1dJJ1+bO7f2XBNBmRiFtCytMviKz23TLEqe5WYTk+T5zePcV84QL1bJ2C+xqdrSkr8Yf6OoaeZBupFAwVm4xcTVHHVYUMWx2PPwExu9WPAKIM7Uh190sthnfabctRky2InIzIZAhV4Mku/KhSzHGHOKpVYOThcYCUVE8Hmk0yhWYjAf4LcHs9rDTRBw7GqMQh0dP3IL9OLY7BQ6HfAy+tZk9yltgjheKpwqhga1YZWgZQPYAlpDINa27srj1yAPpMJDC8MYdUo8qF+DflfHJJQHU/+hRlXiymTJBgXWKu12JEX7xCeknq1Hm2kyhmScKRHlU1vQpaDbZgMU04tH6zjPWq4ENhOO27Qv/3PHBcZXW7HhJQ7IlfO7QKTINUY8edr/J825MBIGDIxE1ZIW2/lJoP+5aYqcAj4Mn9uwCazYon5CmGekCEjPpKYzI/4U+1h5LnacScpbVRhSDZOhzC/nvAredJ67lub0o0a36TEg5zvNi9tugM5q0F30Zr1Xo/YHair/UowF6j/fWerUeIUQhadUX7HZz3tJuCFj3rjerGRWG6qPWq2OOJcB7iltVZ9HQI5GAo4/MsgPPdvQXOtXIVeT2fLFQeQwtp9m5ixLahLkTIevJsLNjsAxF07GN1agDblRVNjIofefahuoICwB6CS/Vxns6d/Yqw/ibLnrtVe0p0IZq4Hz8+TRwiysYCTaru+5OfIlnMukaKBQz5hUy12PLehFXl8E6uVFvuTbGOTOaM/sLAUWkpuhcXA0= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d708849d-f73a-4f4d-cc35-08d9ed06b144 X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 02:32:05.1954 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: AKip6f9iqiS3IpgYMeOPaufHSDL7O8bFVrZCqIKCGXNHOnl1Y+SvZVBj97LT3qYik6/RGDYwW2+DwZ8sR60wNw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY2PR06MB2895 From: Wang Qing It is better to use time_xxx() directly instead of jiffies judgment for understanding. Signed-off-by: Wang Qing --- drivers/input/serio/ps2-gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/serio/ps2-gpio.c b/drivers/input/serio/ps2-gpio.c index 8970b49..7834296 --- a/drivers/input/serio/ps2-gpio.c +++ b/drivers/input/serio/ps2-gpio.c @@ -136,7 +136,7 @@ static irqreturn_t ps2_gpio_irq_rx(struct ps2_gpio_data *drvdata) if (old_jiffies == 0) old_jiffies = jiffies; - if ((jiffies - old_jiffies) > usecs_to_jiffies(100)) { + if (time_is_before_jiffies(old_jiffies + usecs_to_jiffies(100))) { dev_err(drvdata->dev, "RX: timeout, probably we missed an interrupt\n"); goto err; @@ -237,7 +237,7 @@ static irqreturn_t ps2_gpio_irq_tx(struct ps2_gpio_data *drvdata) if (old_jiffies == 0) old_jiffies = jiffies; - if ((jiffies - old_jiffies) > usecs_to_jiffies(100)) { + if (time_is_before_jiffies(old_jiffies + usecs_to_jiffies(100))) { dev_err(drvdata->dev, "TX: timeout, probably we missed an interrupt\n"); goto err; From patchwork Fri Feb 11 02:30:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12742775 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ED059C433F5 for ; Fri, 11 Feb 2022 02:37:17 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.270081.464286 (Exim 4.92) (envelope-from ) id 1nILo2-0000Qc-H9; Fri, 11 Feb 2022 02:37:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 270081.464286; Fri, 11 Feb 2022 02:37:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILo2-0000PJ-B2; Fri, 11 Feb 2022 02:37:06 +0000 Received: by outflank-mailman (input) for mailman id 270081; Fri, 11 Feb 2022 02:37:04 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILjS-0005DN-00 for xen-devel@lists.xenproject.org; Fri, 11 Feb 2022 02:32:22 +0000 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on20715.outbound.protection.outlook.com [2a01:111:f400:feae::715]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d559148a-8ae2-11ec-8eb8-a37418f5ba1a; Fri, 11 Feb 2022 03:32:21 +0100 (CET) Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by TY2PR06MB2895.apcprd06.prod.outlook.com (2603:1096:404:31::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.17; Fri, 11 Feb 2022 02:32:16 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb%4]) with mapi id 15.20.4975.014; Fri, 11 Feb 2022 02:32:16 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d559148a-8ae2-11ec-8eb8-a37418f5ba1a ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WNn5PFnUlQRZMroeUdNK6hMvhNg013ALNzHFF4aCA6tIQjuE/IGUwNtsc9o9ocX0gBwgK2zyNWLXbng9z2RHrgCw4E6Ay5ptBCwA+b+G+DElYxUxSp9P7KssRuYYHiIcY771B3LYduPicahMc4sd42w7/INIFVh9tYpCH5nt6HzYGa0VTHorekxnKLfyr6BkeU08PknMDQU/SvWmhQW1VFhNR6Qt8z+oW+nach0t6fV1rn6Qc6olB/SPz5KH17u2xzb5Zb4m0S5bylzkiIgJra1Hiq3rPa/ekftDUhqRYOVlzFQpXfPmDBJ7fLQUzQDS0i+cvGH/lEm1lSxHMohQvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=g0n+5Y+UWhVVFn6fogkZFTZZCvYdUAj53FrLFaVjD6g=; b=di86ua/aim/Sa3gK6CBDkLJN+pJ0toIN9C3muFlOIThSpMmZIXe9/TRzGplUAvXdPO+awMomroG9nPL14bCyOmW/2tCpQO2edu8PO/mZJTI01FUz+b7AVFiEYwh5sp+LnEtbAeK5DwoON1y7/UkDGGo0d6k5TrmYr4DvY2hbHXdUNw/MMzPLF9vTo92NIvaleCtf34etFOtBgVlSgmToS9xL24VKexxA/hB6LDB9bcY2myWr90Ql33PbRZc6dNW4bSx2BFMPK0cTjl2dNQMsCbJLWMhAmw/pcF3w48R+//uzM/M7IBk0tViked0RujsCuMtM/l+cCmF4sF9d454SBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g0n+5Y+UWhVVFn6fogkZFTZZCvYdUAj53FrLFaVjD6g=; b=G8TvP9jD7K7K7nFUHLOqGimeJOBLUx0xSN+gIQI4a17bqYB4kRNr2zygEnh6Iy9iSoSjoN4iphrLW0xJFhZbU30GXgXS9U5xorHCWsJsI4RjN6Ce45Cy1iVsvH5UbHBUqvW/e9udYvd5/UM1dESjpPmDEU3rzmYGRFkF2xhdM3o= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; From: Qing Wang To: Konrad Rzeszutek Wilk , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= , Jens Axboe , Michael Turquette , Stephen Boyd , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires , Dmitry Torokhov , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Mauro Carvalho Chehab , Hans Verkuil , xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-input@vger.kernel.org, linux-media@vger.kernel.org Cc: Wang Qing Subject: [PATCH V2 7/13] md: use time_is_before_jiffies(() instead of jiffies judgment Date: Thu, 10 Feb 2022 18:30:30 -0800 Message-Id: <1644546640-23283-8-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1644546640-23283-1-git-send-email-wangqing@vivo.com> References: <1644546640-23283-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0178.apcprd02.prod.outlook.com (2603:1096:201:21::14) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c225f979-e148-4ff3-3fd8-08d9ed06b7c7 X-MS-TrafficTypeDiagnostic: TY2PR06MB2895:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2201; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: m+gLbLKDEUYtgg6JicjuPldNAEFxgWIHOT7l4DraoaJD6b+FautiuJXjyJSIJnH9mYKXvyu+2+URwZPVEfb6vN8+fn9tAy71Bc6uiykTfGDuBzTJ0l31SRC+FVmdiStKMGJYItgGxPmMwTWHdRigJlEQoVRSLJuD30YI6EKeosSlg41s5Kt5+03KD7jrPgSU3x7wAPsWx2YEd/ZdeGmDJ/OLPQLtxL8uga4F9oRJ7n3tpd//z6MSNbn23dygd7SK7z3LlOncANQB6BnnEUVhGionjOcYHC4Nhn8HHB+W6tbkLI4Q05+WXhY50Y0g7T5HuZXT1fyRKJntJX/D4xljmO/35XkBLb/WJBBPbxv7L3EZnoRv9+8E35V8fYjSclLpy6GSkmLgJ8ir76dIcz/sUwNkaMN9tpYehhuArKCh4gVArqP3Smg1izn6tNo5NTlWUYi/qAzjzgIFvMjPsJ3e7ZSGINZTq0N6+lCasmPqxtkC0vRYksTQ2uEcMAnIbZXmw7yYZN4HBTUF0uEnL0gsxQ4Tzd8JyQJ4FIbFYPxcMvQmyl2FuO1ptziccMi6fHR60ceVv0K8ymdF//fb6QGhDiy8jTmgesQpIpqHc4JTHlU/akv9pM+JhtXT19Z0WXfOZw9WpkAiVYMrdpno3VHXamMW1f69DbuTOQPcSiZ/3PgeoMJJMLuXbfdTShntVbvmMMa+xpVviUqPZhaWNt1eJEZBS0PqcJgxpQCriKRPTUI16z8JpnXpHbscDnhs/j+X X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(38100700002)(2906002)(316002)(110136005)(86362001)(6486002)(38350700002)(6506007)(6666004)(26005)(186003)(2616005)(6512007)(5660300002)(8676002)(4744005)(7406005)(508600001)(36756003)(4326008)(8936002)(83380400001)(107886003)(921005)(52116002)(66556008)(66476007)(7416002)(66946007)(21314003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9wJunXdafueXwS1HARm+UcDn9TyGyU9g1s76Lc6rMQJXbcwOgVcd4d8/HcxT/JVc9sR2wmCQDk7kOA/mKbLUkeUOddf5rVUcUlE81Fv0wxXIT/Foo0drXfj+okhp/LpdHRtg8IoqR4a+utA8A2LjYTwIuv7AbnnWNUrU8otcHM7DGUU9VSunOSybiJa3wl1QmPNWxBCuY2vE2cmkGuA0Q4Zf5+zvew3XxpH70pcN8epb8+0uImsWg9Oqzv2/l08hbRK/SmE7K1E24tWVo5yhjebtkN21zBsxvKLlMmB+C4ov9nUrCkwx9PIFlhzkbupJowU/DIOD8DxWCKA0/KETzZwpjNbyEjM6wg+YM7pTrdWeH00wh1eGD1QCe7DP62Zc/DJtjFbqK3ju6fnUqwQ1BnOxn1NkonkH6g+kKniDGW8HavDExlKV8oAaYwtrAw46pWP7CvGHKyYBpWTT5gJ9/RE29rHNGOd6B9AQ8MQjkKQERY/XYUlyh3yqxjkbRufTz7z91kZP0q86H8EWsTSsh4R+ZTuq+yHiaVNfLspSHxhR0EWCFKLGIYl4M2JplniPFyvSPEi3QTirWUWSqYYREEQELjiqcDoiNITz3jlQwQlmSPydYl7ccGl83oE6Z0Eirrz6B/ATOyWW94XFPNsVVgWX4dJGhPeO/JQk6pnp555xDOGPQrD0uY08eAhh6Ju5Z8WqooBsJjgT4oqN5RZhZSvX25ug7mnGiUxQL2KyoqbhaQebsti/5bLobYl+OcTL9sqiwDjw6iuyP6BUxvccPC0iGVdT3jw3PE9gRhPTa6KnGY6yfOlxsxxe9PygYsDF9e6rtm49so87P6FdbsNze0VvxckqfXEWA+Km1EVuau5FEM8VKuYSVLQTAaM5SqcT1+d7rFt94cSWAzina+8dneb4FTT0XXac6ZRpPNt0U0TiYMmFOKXHj/qK5WaajsgW9HEdcqH3ohQuClPT9k3pyKXFclQKUl+agejOMUufnLU/JTyZSEwqu6GZE4xMjV9Xwi0mzMxE638PMfIjXZ4G+e1ppd+XgjsE+xFzydGg0/izIekIrmw/3lkg2f2wddwU+aNCmewhKVuem5MZXhJ58qlw/+/KSHUkYxX+hcbndPj8RwjEpCxH3zNGYha5VItjAxNc3GpULxjllMJGsUBTwU09b5y3Cp7XMo5yLQLGGhEQaIvvUSJjyQwZpKIAdJJvMHTd2bIqXVXmZM0YCWI7QDNXmoUmkKLGAedlMXGRFXvj6k0uhycKg8Jw7bFZIaSdmnspMP7eNc4aicCu5clLStuHtyXzADfNCCWPEG3bRtKH3AlvaqAQ8s7IWGl3GBBNbWJZlS5hWSi4S/biIU6SmytICG0QmyNIMJSWs7bwcIpGqdyqvqgPOsbMxYzIBO1nLzXz1p02X9262Ika9zVbdLuvjsMNM5K3jVEuF1JfIpMDN+gtBk236EAU4YWC4VY7bSUXWp2CElVRoET4QKsQhYhZn7jnD5YjklnY7XuekOlL9KeVHQz41Mmjvry8JHCbPYuu4iovExU+MBp07l6cqIgcdSvYJ/x6mvC111Frfk+SyjIJWYQpkZbOABnMpwjOyNUN+M5/hW3N1tvWHEGOejej4/MAyunSQ9wmcy2LGEE= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c225f979-e148-4ff3-3fd8-08d9ed06b7c7 X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 02:32:16.0854 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: I4YxRg1ecI7HlnxWT425FXY4UjVoKm196uJwuFAtIX1YYiOd8+uoj7+n6d7o5Qgax39lGdeRzbAoVI+SjmIuNQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY2PR06MB2895 From: Wang Qing It is better to use time_xxx() directly instead of jiffies judgment for understanding. Signed-off-by: Wang Qing --- drivers/md/dm-thin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index f4234d6..dced764 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -161,7 +161,7 @@ static void throttle_work_start(struct throttle *t) static void throttle_work_update(struct throttle *t) { - if (!t->throttle_applied && jiffies > t->threshold) { + if (!t->throttle_applied && time_is_before_jiffies(t->threshold)) { down_write(&t->lock); t->throttle_applied = true; } From patchwork Fri Feb 11 02:30:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12742772 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 14CECC433EF for ; Fri, 11 Feb 2022 02:37:15 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.270075.464268 (Exim 4.92) (envelope-from ) id 1nILnx-0008TE-LN; Fri, 11 Feb 2022 02:37:01 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 270075.464268; Fri, 11 Feb 2022 02:37:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILnx-0008T7-FZ; Fri, 11 Feb 2022 02:37:01 +0000 Received: by outflank-mailman (input) for mailman id 270075; Fri, 11 Feb 2022 02:37:00 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILjh-00046f-KO for xen-devel@lists.xenproject.org; Fri, 11 Feb 2022 02:32:37 +0000 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2071b.outbound.protection.outlook.com [2a01:111:f400:feae::71b]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id def0af5e-8ae2-11ec-8f75-fffcc8bd4f1a; Fri, 11 Feb 2022 03:32:36 +0100 (CET) Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by TY2PR06MB2895.apcprd06.prod.outlook.com (2603:1096:404:31::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.17; Fri, 11 Feb 2022 02:32:33 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb%4]) with mapi id 15.20.4975.014; Fri, 11 Feb 2022 02:32:33 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: def0af5e-8ae2-11ec-8f75-fffcc8bd4f1a ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KMY85Oezy39t4/iipe61T3TiK9LC97hCT6SulGzMiNhdI1xnMCb8giG/3xYFXvzz0xviCnVmOHs2AasWvWXuOpoBp56LyJdGlJv8LUTuDKjcQ+vXJD07SbKoNRaI+ixoamBnHSPC/nrcRgO5nKq+wL5zAJEOuZB+ocrbW2WVpGRYd3KWmhC851a0jOBxGbJj7vBjtZ1o463I3VwCZtVv+45GG3bxwyRElcLmjywZadja8L3tO5oHmAmyjoEJpKl7/nUMt0SvojuqoNXT/TvKuUbAJg0yuO/iSkF/SUmxFmUSPFPtpyoGtDUtF1TgIkqgS4c+rJ+K+nhRyIsa936KkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=t7/9rdhQphdB3bx+s6LccgI1BFHodYWqZAZuQWlnsMM=; b=aI3PMlZO2JTzDQS2h/nbkoY6k2NAGLwnWrDxAG7YKHkxmMwj8l1VKbSWnpV+55dToGn8okRz2iEYJzaYzDT309yaFzBMwn2v/MCyQ7q2JK+NNPso5ocExEkI8Rh6DELzSJ3yJzmQxkMOhm0lM2k9AOqq+kSFxfygQKbm4jwAP1wZevt98v5SYAX2bwhP42t+llMqC2TJ3WMUykrcL3U6yfOq5gZrSvOh3Y0HCaSE68bj1+qi5nIwDOiWlN0H2BZNn6wsaIqkiD8t6eY3EF5/SRg0boR/O/Z7yelLQ6krmaWZCr5BWLjf+xgJyFrMTv3TQgJ8MwCMD2W65bVewMGW2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t7/9rdhQphdB3bx+s6LccgI1BFHodYWqZAZuQWlnsMM=; b=IX4h9oioCVX3TIXpAL1XitiNuweRJMuWvRcukNNzPA8mrPCDoVEmi6VRkDjxG3Sk3a5zsOZnTOOMnxROEzj/cvKdjvBM39+/c8gxKXP7ncqKD2XCFoHEDnS1X4KZbIg5tuATlyxs7PyyHMhPiX0VaXYFI87ew3dXgrmhOD5ZxLY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; From: Qing Wang To: Konrad Rzeszutek Wilk , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= , Jens Axboe , Michael Turquette , Stephen Boyd , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires , Dmitry Torokhov , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Mauro Carvalho Chehab , Hans Verkuil , xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-input@vger.kernel.org, linux-media@vger.kernel.org Cc: Wang Qing Subject: [PATCH V2 9/13] media: si21xx: use time_is_before_jiffies() instead of jiffies judgment Date: Thu, 10 Feb 2022 18:30:32 -0800 Message-Id: <1644546640-23283-10-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1644546640-23283-1-git-send-email-wangqing@vivo.com> References: <1644546640-23283-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0178.apcprd02.prod.outlook.com (2603:1096:201:21::14) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 35545403-9cfb-4fdc-3fc0-08d9ed06c1f0 X-MS-TrafficTypeDiagnostic: TY2PR06MB2895:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:231; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /syyc21+a3wCMBduHjjEZXphPVqYJ5p1/XojM3IKXP2n2wOF88FCk+axsSaSjzQu5euDJ/910sMON3XxFgzdvGNFSzJmvVNaVyxCFH87g2Zx3g7fZzKolbIa2Qf4v+NnaAhstPPGxNeKx+oCcqDLr1EmEWVZHSjAZxDn2j+zYE2VThN45BuJ11BOD3SI5DfavEJ8mO/wqzSIHeONhxZsXwKT5N2EeKjejdLpqmH39b+4msBOxJRWmpWQfmj168630vLfpPwWl1IcP87OWfhJlOJ9nF/2WjiZ9useg6hjRoXnDuFXY2QJHx5W/hnJnkBo1KR/YoLspn8ycO3L6E07598prptEnsZGU2J4ROEhdfJlRCNqNNrHwZCPu3+msPYi78QGIn/qroKsB9v2ZGSZipgjR2u2lVNyL9jpKVYH/h81s1OJWYtzwJQt078AZy+KG81QnwPqQKZzpJ2X/lNWtMklGIRCIvmjkW1cI1N3lADH2FByTsZBYssmEFJhIRPuNcFrOkSypFVC/srlQvi9q4o/n8aieWP4CdrHkGLroz37ZL0/2NQbkMm0wZQA3s7NoJcCElfSQg5NdmyQ/O/Nz5rwba8gjUJhjnMaa0/UI4sWTzp4RckpqFQiodDUVD/QM87bMwJvwFvlh2WyXdPq2b3a+tDN0IGXBAed0+tal1a5ypZxjJX0/84wP7kdj2KCQk1apHZyVnLcBSIzOcp6h1eJJshDQTLeOyjWQAS8Wa7gy/+g8F9f7ifgNPQ3kCte X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(38100700002)(2906002)(316002)(110136005)(86362001)(6486002)(38350700002)(6506007)(26005)(186003)(2616005)(6512007)(5660300002)(8676002)(4744005)(7406005)(508600001)(36756003)(4326008)(8936002)(83380400001)(107886003)(921005)(52116002)(66556008)(66476007)(7416002)(66946007)(21314003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6LZ5k4ZdbVAaRXz3OQZIHKFg/WeYI3JTBc0emq7qjkfMJK3D7aE3ya+Z6tnfhYyHNf9imAKQBo6+yaVfZ6vGQdMqT5dVB15ayZ0IqGbO+/D9CfPG5Z0lQotTz/58+OXEhhohl4bzdo5zlTGFltOUGGhHnx86p+T773hnHW/arhP5m6U4GDbZltsUkIBFjP1yAVYrDokULtmdaQEiuQ1F+okHG4dtENf+9uCwhm/o0uipxBb4bHpoWgfpNI1GyCa527LuxoVruNTtT6739CTA0Z7++GpyqN+E/B3aL+WXZrGhCp7ViC/18kuakFZdAZfF3RFg/EOwWkQZjJtBRGYqkbZtIeJJwqEjivQWX3ZpCLmmC9upyaiU9MaLBfPjAZOKsqW92iTKX7cWvPBxwcLrtlPw0GAjV8ZBvqAmAzYMu275Aig7wWaPUKSi4pgOiebj+w2ac/K2CGS1oqTEd++3EX1BeuXkLsHt/UQeoRRZuMSqNl8DikxVGmnG2hdC9oWj18rAiPKWt/UYT1BM6b5ptEKCf9Ne4vIwru9a4iofqsCvtbJmaQw2fF30mlABfCNCOq29ZN2CFnm2a5qcCSG0FBeqtPPdUhDG/MGdmUboYhnZjWNf2rHypUcnmdRIZ35nz23IUvzEecgz2rrDC/V0rAY+UFIqIlzB23gFCgj43CoW/91w8PZmb6D8AC+qd2pMfi1mYU4yLyoV3KGL3AwlTgXplrTrOIfrhbSreBuZY2/TAGJ478mTbEQQ0ybzgQi/eJUc2xuOjmzMOsOSGGvDuilFoJwrG8/tJgPOGIW2ebAGYgG+0+1X5I0sOTDdy+2QMYUu+uGCTYFQCoHZAuBQB68Q6eCqHX4KIPWy+loVQFlVOaxaV3naJv3XcLy/OY+m92LkDzxSUwz6EEtcUYIMn35KeqA4uOnppXxzGVj9Cdci/bl8T0fAJHC8XFfecI04pX+L3YGSMA2w0cdw8CShirsHbc+fGGs0/0KwACjfa0HrZlaIeziGqPUV74miWJlnXtsM4EFYMiVELBl17c/xm1aPuOrG/pvNyQvcAcG9V8vINCwe8S/ePjziKzicIiC4AYdS9eliedPxsb9io9V4SFETUL9nR/M93iEVGawZ7aezA+MmrUnMuMWM4eEDMijHvfEKEuL32NCMz7qAm8+1m5LHLIDwALA35S5Yy+jRQo/YEY7osc/1RTRz0CDjs8D78RfJCqq0Ah+9xHfGfW70IwOJrEBWJHkQojskFc+NAc9rwvr4bETYhnjjd2kpVA0jy+4t66TbQlAetCv8pDrljjwxAEDDBdjJgOHM7x/rjvhwYJ43P/MVkCQ7jokjV+cvcuQDZcYnMCCx9qt9SP+Q/jXL7IJzFvLS0MLXnusiAg+AuGVTP5PtL9SYJOriYFv2AAs/rEJnCtiyxWJUdnaCvU4kCAS2jgDqAWZX2sGc75lZ9Y+l1nmCANRMQrSg6X7dBlBC+5id80Yf/UQIGjd+LkKHiwEQqpacT7w77TjoL4//eT3Nkkk8lXX7yRt5a0JgN1LOnp1hrayYfP9sCRn0OvCJ/gRVV3aK+lrqRcgJwW2hFhSQucmLGX47pW2IahbtLp8oDQ5C0DY/GY1nGl2wqlheW/aQz1YbuqyBGwCHDZE= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 35545403-9cfb-4fdc-3fc0-08d9ed06c1f0 X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 02:32:33.1470 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MVEDRXjkHcVBveXA8LcBcEgx0EK2+lRNap1RgZbICtzB7qCPM4wfM0+HMyKZlgP2NMC4+l4/JaD/4qaIh19kOg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY2PR06MB2895 From: Wang Qing It is better to use time_xxx() directly instead of jiffies judgment for understanding. Signed-off-by: Wang Qing --- drivers/media/dvb-frontends/si21xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/si21xx.c b/drivers/media/dvb-frontends/si21xx.c index 001b235..1c6cf76 --- a/drivers/media/dvb-frontends/si21xx.c +++ b/drivers/media/dvb-frontends/si21xx.c @@ -336,7 +336,7 @@ static int si21xx_wait_diseqc_idle(struct si21xx_state *state, int timeout) dprintk("%s\n", __func__); while ((si21_readreg(state, LNB_CTRL_REG_1) & 0x8) == 8) { - if (jiffies - start > timeout) { + if (time_is_before_jiffies(start + timeout)) { dprintk("%s: timeout!!\n", __func__); return -ETIMEDOUT; } From patchwork Fri Feb 11 02:30:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12742776 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BB3BDC4332F for ; Fri, 11 Feb 2022 02:37:18 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.270090.464321 (Exim 4.92) (envelope-from ) id 1nILo5-0001G0-Gl; Fri, 11 Feb 2022 02:37:09 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 270090.464321; Fri, 11 Feb 2022 02:37:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILo5-0001DN-70; Fri, 11 Feb 2022 02:37:09 +0000 Received: by outflank-mailman (input) for mailman id 270090; Fri, 11 Feb 2022 02:37:07 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILjX-0005DN-Ix for xen-devel@lists.xenproject.org; Fri, 11 Feb 2022 02:32:27 +0000 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2072d.outbound.protection.outlook.com [2a01:111:f400:feae::72d]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d91027d2-8ae2-11ec-8eb8-a37418f5ba1a; Fri, 11 Feb 2022 03:32:26 +0100 (CET) Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by TY2PR06MB2895.apcprd06.prod.outlook.com (2603:1096:404:31::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.17; Fri, 11 Feb 2022 02:32:23 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb%4]) with mapi id 15.20.4975.014; Fri, 11 Feb 2022 02:32:23 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d91027d2-8ae2-11ec-8eb8-a37418f5ba1a ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GUyznWgZuzDBHHk8bhhKsOaQrI8+HfR4UD2AeWIqP2UBi6gGUTmvgzXGONB8c5xm+tpHE+cvnpdD5M2er7CDpItRSPpKtXanQfJghe8kqXP5MRG5vlOFjp7CgxXC3EWV0OYnO0hE6IWCkZbUWbm2NWtBIXL1GAvqWH3/h5iCdH8m1N+WeZU6db27z3w+F3RqSis2QE4e6Xg4c4DtXDNGzRJRKrpeTDL/eJ6hPWYJvpkJO0r5YnBbLqniNUFesFtWIwCqoCzmMrN6Cr32xYeCcEpJFeyfeuouH9nkgiSVfyk/07crTNlmH59H/qvq54YO70Kb9sDRYhyYyyFTTTeTyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GX+nOYxisljzrKTgPKcHNVXPHiBaBNm1rCGL/Hfu0io=; b=kSAropA30K0hq1WglqOOhRRxLrcNu9TsVIIDwPM1SPWUWsM7XKAAnoPyM4z0PjBSf6LxY/fCMmSUY6uGr1/QGD8lawlpdCk6PrY00mHlzx+ZP7Vsyo9XDr1vGwnXYlQqoGvmyaSyj3L/3PjZ5bI942KRpbcf+4D2VoLGCGGTEQ0g2yUtvglFFA1bk9P139RDTBLzydNY7G2VXkfQlQQeSszHEb/C735n/y5ntIia360JC7f8hNTrpDYhrichejbGtbFAz2zcdnMwRGpyczic0tNlWAuM41W6rGCskmzpg0jgyMY5/FIj32R6bN1G4VhQIvZAzTyL72t+VYsQHgJK6g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GX+nOYxisljzrKTgPKcHNVXPHiBaBNm1rCGL/Hfu0io=; b=MrEOAevPxCNjl2YjyKrIEp32HF6lZG543aFtZHJQVfoFKWs9D6p7tBil8ZzyVbssPfuQJLGGK8NV9jAATBffofMh6jBu/zNdbevav+z1S9iTHGUYlp96wSRQYu9vyKzjohjU8VHV0FuZ1NaUIaI2Yf7Ix6SGdHqwnLwhrZK4rx0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; From: Qing Wang To: Konrad Rzeszutek Wilk , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= , Jens Axboe , Michael Turquette , Stephen Boyd , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires , Dmitry Torokhov , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Mauro Carvalho Chehab , Hans Verkuil , xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-input@vger.kernel.org, linux-media@vger.kernel.org Cc: Wang Qing Subject: [PATCH V2 10/13] md: use time_is_before_eq_jiffies() instead of jiffies judgment Date: Thu, 10 Feb 2022 18:30:31 -0800 Message-Id: <1644546640-23283-9-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1644546640-23283-1-git-send-email-wangqing@vivo.com> References: <1644546640-23283-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0178.apcprd02.prod.outlook.com (2603:1096:201:21::14) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5fda17dd-7627-4ed7-980b-08d9ed06bc3f X-MS-TrafficTypeDiagnostic: TY2PR06MB2895:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2201; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vCcORnvvTaCSGSUv6FaIVzz5fCHZQ39cob3rnZpeEfCgUnbOK6Ew3NujI4eQj4E6oemaWr6sQuTR4A+q1KW18wwDu5rbt7uw9pJToWNslEEhlHV0id4DO7YP3t3NBlDMWwk0M2ZXpl8F4Th41pQMyhoDztMo8QFRjQraRlRMbOV0EPCsMIo/NkoKXXpupiBsTyN/P7/T0ytRY5MFfRGEqx0BtqPZP8o9TEXlYDrOkScovmHB85LxDA++EuFd/41ONgLFun5G1fnn9C5CoUVs44dSu3qtyWKjQklGYWE+OM0pZAmru4SjPLBGbCGsnGKWasxK5bUhg1IwDDnOjwEjjUcN1ofLzSbxO1vgAYLb44uYy/nD9V8RwXdNYJdmpIhtPbdXidXC8VFSS+EUh4OnqcOhL+uFVXQml/bWG/IZhOXmFXXbo/qb1EWeE7wfL9yJgXCpiCYqEwBEXPf9GwLRkT6zUQ6pgNH361lC3KflPMABa9Pg5UUyRBNuHEzGTmY7kuDxMFHuSZhHVoOSGeV7o8YpxAoBgYyONdV6B9DroPET5JQ0OqUXM8tmof2wrr4F7B1/x4fg14kMobLWHPQlmjzX0CkpYGPrBQm+PkFHBlWxbjBmoo+vo9NVX5+IiIoUXRtmXTuDXAK0YcRLfElMlyiLA2SUTBIYe736SE2WmKAUzPs3tr+6xT8M9z99sFbvox3OimyVqhj5XsGnb8qfSKKUuyD0aj35hxDZW5fM4bnizguaPFCSoJ7trriVtW0w X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(38100700002)(2906002)(316002)(110136005)(86362001)(6486002)(38350700002)(6506007)(6666004)(26005)(186003)(2616005)(6512007)(5660300002)(8676002)(7406005)(508600001)(36756003)(4326008)(8936002)(83380400001)(107886003)(921005)(52116002)(66556008)(66476007)(7416002)(66946007)(21314003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5RLiO7j5eiRGWiybTSbw3O5WAF60yB9HB5/fjAxP4Yq0I6DWM/DVOs4m4+yOoWTzpWXkZsIMleQXe1Q9OQbxEO2c3Yk8DzMvc8J78zY0HlCy35rlHbHQCgpx9XQnRLIWXblEAAvckGpikNanBded8bjlA3FDpRX+jShHcFT2cRyDy8P1Flp+hNnhCvVNvDN8ootk4WKUe276uSIBohcDJK/nwsUtBFP87fodZC5XYPdEOMZz5GbV5WZbinCC0i5eDvxowd5t+5fdnjAvfTr+HMu7HH16JPwQDJsryJy/jRLMD2aoFtXuE2CyURZ9sV2yoo672NKu0B8+C7YldGKfWJptMf2SAVV5a0+D8BvC8zMypXSeoGxjnvw8Qel/DE2ctYSeeXvY8iNpeTIBZQSuC5zOHmYYBAfJjle4EBWqsIrT+SJxIh7Tsri34OvuvQ+qo42aALsuCkx3FQbMJf8ZofESmYR6fPI+ASrPeAuZOebLFsOZL4+OhUUiWlLQPpotil8EWtY+57/kqrhdO0KMq8HRI8Ru4mZvt92T966UjrKkFRb0/5AZHuF8wa1spXxT+DEUnGVqz8UM21idUGhfY07H7z9LZ2IhHWWcf6dvU/v0gnYkOg/prTqwapL3ARZtlvbEX7V+0n1oJm8mJDzHj9oXju/0ax9vMtQFLmT3/vqK3JF1IDXTFWwC1BhaI/EvwubO9Skp4fBZXZVuEhWhnaWxg03WWv0kg8DW8DU0MhQvhdGDYZA/SqaAvcTOnQGlQD8ajN2sT7IwbFPomPh7eWZDHy8IZlxT6/Usc6oYJoWW9Se2V9Btk9ldiDIvmndUjBBdq/v4v7/BAOqakLZmxMsb3bMDsshP99xGAe4xa4seGrhkwDgGH+ehbVhC4Axu3xqY2mOSUDJCeIj5248dR3xklP5CDZodjieTaUN7cBZOCJP2AeWsdYgepP0hX4JW+YaV5iYqo0LOfHhqY3pDFafu1PQZmXj3y7jRb6n3QpNmEKdN6dSc9aUQwNUVLwY46BcW1X65EfU2TxyPvuinkSSdxZRn49DGM4FwtsS1bhccE3ILMlKT6VnmVtM1T4QrGP+KxkJvZ1UnUGUKWu+rkKtVdlmMiHkwLID2K0kMTKOXwh4b5zpho+XrjKZqC//xVTnH7MCjPV0do1fQEH0BPIdEcNn7hm+ptLW6+JI3bAHfWVSZqeGKZLSgJDVo9QwYz4wNMQ5+u8E4xzUrbwzkad4qLwROApJrECCD43rqvS6qNgzpT3cteNQkYfBMUVidlx3QHcb9Cs6BVbMuzf6hweS0JbJ00jzYXXnRCy8emsLla6q7vSVTR4FXZ84UHO7RnMrQw4J4jGhtMTBU667TDFJqKa7PxsxYtvhyB2c163F/H93oCjmCS5ufoL4YMrsn3Ts8KeQ6w1nCbDsiuQ+8H8fKZEr+e9g2uZ9gWcL4DEEsQz5KJ2QLYKRAj7znDtEeZL9Rhig787sK8XEdTsAZHJxKBwGkSiNSg03r32GCvAvE8kPmkYxPW7UrgWb/tmXIZaIMPM6yMughmIgO1OQSjVi2Cr3E+iz+S+VxQ7S18KV68uAywtwOyTpreCAAusTYEIt+N2oOcW2qNL8L0X5j1gX9kV7UWJmmNJH5WaVJGeI= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5fda17dd-7627-4ed7-980b-08d9ed06bc3f X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 02:32:23.5381 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Vi3vLXcRyS7gacphLwGgMPrALLyerptZ8f1fPbKHYXREiSfPa/Gb70a2fmKlyVurJ2uQiP6vzh+L4l9Bsyj0ew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY2PR06MB2895 From: Wang Qing It is better to use time_xxx() directly instead of jiffies judgment for understanding. Signed-off-by: Wang Qing --- drivers/md/dm-writecache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c index 5630b47..125bb5d --- a/drivers/md/dm-writecache.c +++ b/drivers/md/dm-writecache.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "dm-io-tracker.h" #define DM_MSG_PREFIX "writecache" @@ -1971,8 +1972,8 @@ static void writecache_writeback(struct work_struct *work) while (!list_empty(&wc->lru) && (wc->writeback_all || wc->freelist_size + wc->writeback_size <= wc->freelist_low_watermark || - (jiffies - container_of(wc->lru.prev, struct wc_entry, lru)->age >= - wc->max_age - wc->max_age / MAX_AGE_DIV))) { + time_is_before_eq_jiffies(container_of(wc->lru.prev, struct wc_entry, lru)->age + + wc->max_age - wc->max_age / MAX_AGE_DIV)) { n_walked++; if (unlikely(n_walked > WRITEBACK_LATENCY) && From patchwork Fri Feb 11 02:30:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12742774 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ACF02C433FE for ; Fri, 11 Feb 2022 02:37:17 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.270085.464299 (Exim 4.92) (envelope-from ) id 1nILo3-0000ht-Jm; Fri, 11 Feb 2022 02:37:07 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 270085.464299; Fri, 11 Feb 2022 02:37:07 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILo3-0000fE-6P; Fri, 11 Feb 2022 02:37:07 +0000 Received: by outflank-mailman (input) for mailman id 270085; Fri, 11 Feb 2022 02:37:05 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILjz-0005DN-GR for xen-devel@lists.xenproject.org; Fri, 11 Feb 2022 02:32:55 +0000 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20713.outbound.protection.outlook.com [2a01:111:f400:feab::713]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id e98dc67c-8ae2-11ec-8eb8-a37418f5ba1a; Fri, 11 Feb 2022 03:32:54 +0100 (CET) Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by PS1PR0601MB3705.apcprd06.prod.outlook.com (2603:1096:300:80::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Fri, 11 Feb 2022 02:32:51 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb%4]) with mapi id 15.20.4975.014; Fri, 11 Feb 2022 02:32:51 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: e98dc67c-8ae2-11ec-8eb8-a37418f5ba1a ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UiQJFTEih73bBALf1QoZYNGQZxJYPwuTMlBHnrxtrv5yt/xNU/2LFRfWOEKHWfXCwiyw5P+O9U2JHHxSJQMc9sisSnt9BdwOiKiv/0SMZOJDHWK8YKEg+WD8TrMt9Hi/RlKL2RlOx8cpoLimvxH0vJe3JLHIOkWpUl6AuIRdr0fsT9brcay5C5xKS7Bdfrx3YJ/ZwUwQW1F6hwWUefkMjwshlri4k3gLtohnKsDmdfPh8+Jf6bMtCB/rJ+wqnyWwchKhAuQrll7eKxc624ohexL53U7JYIVY0dYhY7bNL2VJb96zKYgcIB1LSWoZBu+9jwTEl+tN+Gu0in66AqRDmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+UreqemZWhtM2swqJ+H17H399YlhMiGbGC0zkfmGrrc=; b=FbK5GvEtTCAJ0klEeE5j/lafBCC7jMN2X5OA+3J+kP1lyJgJTyxyBkgOA5aLBZT0yjqxB146ibxH4ZZuqQf7zpzsc4FvwUUdQFgbZuIBrh7tg4bTfUiVmW5XYXiAluqAn9/Zg5ThGk0VHs9m7U/5RMaZi1beDPXN1l4mAgThREW9DOWDqGAnPM6+Y88mM67NpIrXvaFiOWpLGfxXBJyPSW6T0f9t/2ROGNwK3tvTA3L5+N25Ha4qV1vbaeRYKkMF+Ij0lR4nmMDSNq4WVFsEobnN2t1gf/IE1dUlU60xq7zfB5+JAVYSmdoHtj3lklt/8+SfrHgHMgmcxa5uYog+Tw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+UreqemZWhtM2swqJ+H17H399YlhMiGbGC0zkfmGrrc=; b=ep4/6Byvp6rmc1SWOOXXbvra047BBmWb/rK+CWh3V2GHkhNJsRqncB0kn8KolGU/VweyBYhtXm4596m6gxVgWzs2RByboAqmk8aLsgFS0EVqxOOTwxUESvCFN8laKFmkruLPA0SYcZdU1a/gGSUXxnC7spA63ob1ujffM8wsRdc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; From: Qing Wang To: Konrad Rzeszutek Wilk , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= , Jens Axboe , Michael Turquette , Stephen Boyd , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires , Dmitry Torokhov , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Mauro Carvalho Chehab , Hans Verkuil , xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-input@vger.kernel.org, linux-media@vger.kernel.org Cc: Wang Qing Subject: [PATCH V2 11/13] media: tda8083: use time_is_after_jiffies() instead of jiffies judgment Date: Thu, 10 Feb 2022 18:30:34 -0800 Message-Id: <1644546640-23283-12-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1644546640-23283-1-git-send-email-wangqing@vivo.com> References: <1644546640-23283-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0178.apcprd02.prod.outlook.com (2603:1096:201:21::14) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cd8769e6-d363-4ee5-4a94-08d9ed06cca8 X-MS-TrafficTypeDiagnostic: PS1PR0601MB3705:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1751; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ap7cwPaUAtNcN60g89R7HvJFIlY8DkMtY273D4LMkoqQfd0JkwOfeTniOqvhhDmdcgQDoqcPA+4JIUnqYVEvpMY3Dxu5BQDVnVr29loaChOH8HquGgiN1QPnQIDczyyXWE+CPfDW7TkI7i128MAOkSuUSSqTCXm+nek7xImLdHJ1WlMuRK3ZPGskZkhIPdWvW7rIj9hRhyc/4ogsBY02mA7uayw9Ze1gS0Y0YGohY6F56oj7+4rht1taKTFtkFIlyhMFvkPYKUBiSRTveuXc5oIkoDQb38aVSRX1xcLekMs/78YNm2G4OjKFBSOjIlxtBzWkFMELHPNddvn6u65fz/cIsOFhAbPX/QXrBV2KkyczwiR/nvSOLhN+DdFDO1iW7QndGPyE3OMKrRgz6QwvRo3hjL68myq0ILZl3t2QfovI7mikeVch4tNe+YdyuwxuwA/aJTmB+UpBrZVSVjUCQutrMZZP9ZXNBd+57npHdia7GeKv55Yc9y1mTjgeOSnfTd+Ep9SIGtS+Q7Y5Pi1CtTMuTHmF0RL6vIOC9Qm5jY8Gexnsm0e1N4feg9BhxixDxt5E4F1FNiZdlTVA/giIVU8zoBYOM0XTQ+1b8p3CYvzx2wD3W48B3GiuMjwoD6kWJgwYyLgkfqIKArNTlIYdxQRbS9ctwuFMRoxVoyPee0ztOPefN5M1kF/IBa4pwCrMKtlEmRs2DhWxgQQhI0obSfd/E2yhZVh++W0NA9LKTgUqz2Fpe/rDcgwfQDzGpg6j X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(186003)(2906002)(7416002)(66946007)(4744005)(316002)(36756003)(2616005)(107886003)(26005)(921005)(7406005)(110136005)(5660300002)(83380400001)(6486002)(6512007)(6506007)(66556008)(86362001)(6666004)(508600001)(4326008)(52116002)(8676002)(8936002)(66476007)(38100700002)(38350700002)(21314003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XvPcCmrYkA7Du7Opc3xsGLAaIokoQ7W1OShKVIydnA+J7YAcXUPMplhB79adBS1jV2QoRFBmYSqZQgElNmIAUjkiAxOKdm/qa4lVPqW2DdOZvKVWQ0cGw9xY0CAMD2rtEg4e9h8GgWiOH02JP69rahWcYtbq/ikqxOtMql0i1T7GazuXXFjKHABeZfp4WEdy6FhduNh60ZJMfd3ynm2QnV7BJSBWsyeriCUJZ7ZLwAZFn89Iny1flmH1D0EUlGAXmDdIdFcf+okHQKWXY70+Kfkw5n1d9uE0pYXcNSalyEYJKY4ZxjEaWZANn9DfPu07IcKp+x/ycvKGA5WkYsr6G3zeE4yT8gCyusBQXEmYkR2HnTHczSgnWg5GV+NOToEuJ/x2HkqvWNn6PLjRprHjacRyGHVWPQ+1UClM6ADzqlB0gLDiaedxuLYKler9/eozVLtqOBDW48G2Usp1ZDAmCCl8RUjsSnv6Pq8PapRcBTAuRnGEQVBKmV+8V3yyl25Obo9lT/q044qh+5DrS1HZEq5PNPb5i4sfY5LZGhvDZoGyJTmvPssqm4JzfBsdZGgrYunCMdi1oPCnQ7mJuaAl9FWIpPkn/3DqYYVt+MQ4Z1ZkNXMJreHXOHpxILcCKOjfiBUKsr2QWyQPGd6lafpVYpAPACIvar7lNhGei3TkMwYX8nIfonqCyU++KJVxYnBiavQgpB82cqpPEGID10fzmPpFAXyw0/o+sYDe6Hd7vhNpGaBQ35pyWyprLZoE4gDfCOHX2S3SF9/r/jYsy0Wz4r4p89rH2aliKggG5OzOyBb3JEKB9JkJTJDMZYzfQM5ffQ9tJkbC1YrB7xfaf5QO2LDsra6rhgkfPvUJ8+YYf3FadrvifDHGZ2ChrAUUckkWTqgbd1yPZayI6nq2LTy70KM7y0II7Ah/f+sF/MpfD7KOonHNKT7HDuYSD/TMI77Cx1uftmRAxkEZ/S7oKeZh6kUeYA/Enw/exb4hFxz/9PNrBpL+DcYgLFTSIXwncCG8oj+0rv87jJsNnjdGzx8neujGdRtM+WPFdWsYcQfRYBzBzLjxu/jsLEIBmmdyfXhh79+bLkmtL/suJKl7O6by4z6r/yGen3lxMxX2rhneaeX9SFdAh8aSpAxvQJW3zTGlEAXkSnZJWy5tzgWb4gEiCtJR59EMPl1GjZVlwX061IKIDjewdpXoTnIZncRRuZjeuNoga5f/8bVBcOJuYckD33D5dYsky8erptryBYosZcjf4DzxdHpPOxqErz8MILaTs4zqqjAM1YSrq+5lIKktfVOaEOmH9o0D9GohmtWrHUK9REILIRNJlnIRS0X/VNO8hO4fn88pnY5DQKLCr/L11xTyhxLot/gGGWqP75R/t9t6s6bqCxdyCdzGoJJaxs+qOY9pc4KF7YbKAoj67h0XLyO4NLQThd66hq2NWJVXU7senmUKbKsKi68dyNG2oh1+XuKBYSE77hdLG27BFnWSEVAI4PmZDASJsafXRxMJrG/rEXeTS8s23Y5aMjwrvGfgwz1EgAXNGxzdmc3BI26eI8FTIEjVHGUQQVrlePgOMkzaCSDEcT0x17+/68J6deTXkvrOUs5rmIao4MTx5mBrNOr2LJNZoFcItflcG2P7krg= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd8769e6-d363-4ee5-4a94-08d9ed06cca8 X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 02:32:51.1459 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FIOV+VJxkJuy36z1KAD455OyGjtcPWPNha6WYplMGJurR2u+NV8i5/TONQWOZGXQcVf1YatOzY/HvVtoXP9poQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PS1PR0601MB3705 From: Wang Qing It is better to use time_xxx() directly instead of jiffies judgment for understanding. Signed-off-by: Wang Qing --- drivers/media/dvb-frontends/tda8083.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/tda8083.c b/drivers/media/dvb-frontends/tda8083.c index 5be11fd..49c4fe1 --- a/drivers/media/dvb-frontends/tda8083.c +++ b/drivers/media/dvb-frontends/tda8083.c @@ -162,7 +162,7 @@ static void tda8083_wait_diseqc_fifo (struct tda8083_state* state, int timeout) { unsigned long start = jiffies; - while (jiffies - start < timeout && + while (time_is_after_jiffies(start + timeout) && !(tda8083_readreg(state, 0x02) & 0x80)) { msleep(50); From patchwork Fri Feb 11 02:30:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12742773 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 26F08C433EF for ; Fri, 11 Feb 2022 02:37:17 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.270080.464284 (Exim 4.92) (envelope-from ) id 1nILo2-0000N4-B3; Fri, 11 Feb 2022 02:37:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 270080.464284; Fri, 11 Feb 2022 02:37:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILo2-0000Lr-1G; Fri, 11 Feb 2022 02:37:06 +0000 Received: by outflank-mailman (input) for mailman id 270080; Fri, 11 Feb 2022 02:37:04 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILkB-00046f-6v for xen-devel@lists.xenproject.org; Fri, 11 Feb 2022 02:33:07 +0000 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20709.outbound.protection.outlook.com [2a01:111:f400:feab::709]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id f0ba3666-8ae2-11ec-8f75-fffcc8bd4f1a; Fri, 11 Feb 2022 03:33:06 +0100 (CET) Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by PS1PR0601MB3705.apcprd06.prod.outlook.com (2603:1096:300:80::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Fri, 11 Feb 2022 02:33:02 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb%4]) with mapi id 15.20.4975.014; Fri, 11 Feb 2022 02:33:01 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: f0ba3666-8ae2-11ec-8f75-fffcc8bd4f1a ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mYcls2hYgTRkgRmLNYq+PpwVIWJryFOwxZNyueE26a3tnCn6NO7ctkIsPPwe6D00MxSJ4nBypq+NL9zLZs70r5i+aC86rlvau8xIqaopkvfC0KFZJCBWOSpylLCt3MiVBK4WPNMARQKjWtphsSwPWpa+Tf2nmtyfsu/aykmtjvefwPJdYbFF2gZ/u8mCC5xLeTirYR4HCMqt57p0+OpLShvt13urdeGBmVeiERdpZ0XETvdNFvXEjeKHKu4R7kmIPDamA6ueWCEkCoBHE85FmXn/Ek7O0wM8uCNrxMCQ/ydjPr1AKH9by6o/rJInotFRSWSwSFh6m1Rf+lBvL8uJ9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pTRNaeTNqvizWhskx53RuBoI6rnoc/OaONHjRSZtZb4=; b=laobJddwq3euwBKa5idoNzIY/7GQA2ReT4wkGY1t/IuwriDfjUWCgXneQBVKvJZbjQMEwoL2XoSepmVxUvm4oj1eS9W8kwTplcbQ7ZfYQeKDkfl/90x+zYYhHCzrezi38qdD5Kb+x8JVTSIVEnsmq9+mFydaSulJhUpxWb6V5qKXJ4v6wiDcfL8r0LLKE5vFifVM8+rF1YNx5K6Oqjdovwz+jjX98zHg4fce6+ybX38hCoKnuRd7OKqXeDzEx9iqtpZsD4TPa7KFOVPb5igkNIUlycp2VdASGx3oQvKqFTns31bbtEIwZ0BCH9ZmgJGUelczm8McgpQKhDvgDzp8QA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pTRNaeTNqvizWhskx53RuBoI6rnoc/OaONHjRSZtZb4=; b=LuaQiHhLoMWk0Q6lAgXzFEOIF6E/Tvssv1qtqGP5p02RQG8Mvb2Dz7NV+nXvvOaHeq3gxceKD6D9jOypqntrMeIhxRWvSnVV77vTNmiVa20z3dTY4XqQWxjMbfgk3YwlPk3stSSsFVrkIniZKlundxfpguDw8QV/1s6+Co3ewWA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; From: Qing Wang To: Konrad Rzeszutek Wilk , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= , Jens Axboe , Michael Turquette , Stephen Boyd , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires , Dmitry Torokhov , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Mauro Carvalho Chehab , Hans Verkuil , xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-input@vger.kernel.org, linux-media@vger.kernel.org Cc: Wang Qing Subject: [PATCH V2 12/13] media: wl128x: use time_is_before_jiffies() instead of jiffies judgment Date: Thu, 10 Feb 2022 18:30:35 -0800 Message-Id: <1644546640-23283-13-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1644546640-23283-1-git-send-email-wangqing@vivo.com> References: <1644546640-23283-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0178.apcprd02.prod.outlook.com (2603:1096:201:21::14) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a0c82371-8017-4197-5f91-08d9ed06d2ea X-MS-TrafficTypeDiagnostic: PS1PR0601MB3705:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3631; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 11djht2qCnSHMekgjn3yfBRNtKoR0UKGRdDeekosS2A4AcFGfSf+QKEcjVSnzr3ieJMEzCCnbyUD7zK7fd2IcVdw0r4yjmIqyF2yGbTm+2HU4IlFNRVNlCKKDzRlZ/6cCVK37j2tZ0Mw55gBsf2CFgFEpdmKeIS+UijpaMSkOLATA7oqL0OIuuQVDg+p4PfEZaN8rqN1A2VQH7ttB9uBIX1QuI7bQLdAdVou+oIweYykJdmldP2YkkYJJxj8P9cFqoqSruo+mu2cJaEx0HEeAHnMIiO2tAhoUJQM5465VSFPX8O0eoMKKQuNpCyjC5sIljeXf0enq7aKAT6lbhSVB1nreAIimblP2EiIuFzqnnsURNqftyYJxzUPDBLAM5kenQUdKj5zUvGSpqhgiqLrHx0MtWB28l6sbzxD52d6iHp3EM1j3KM6T98sYHvMbFX0oOZRroNIYvYKkVQ41UTrURd+fIF69cftcJiBCa2U4TxXtre2edAL7Xf3Dmr5zRlq2lbuFtffgfkBkv4YbzE+Nqlwg36WM7ihe6PospLDzLIrL25Z3iXeEQz10a3Ko6R89PJzcS7JGG0eOGV1u+wijPYeha6073Gp7Mecq2MK1wX4vfIblPMSue9oHRzEojZpvmBbZx2B/+DhzfB+rH1xuC5F63LNPO4aD5udzwWf2fz6s/XwP8QuzB/cxV7XJrrd/BRaTaXaCA5ozq8eLq5y1gtQUD2ZTAdcWp005htUYf8JtG4kn7FB4qp40LfQrBdB X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(186003)(2906002)(7416002)(66946007)(316002)(36756003)(2616005)(107886003)(26005)(921005)(7406005)(110136005)(5660300002)(83380400001)(6486002)(6512007)(6506007)(66556008)(86362001)(6666004)(508600001)(4326008)(52116002)(8676002)(8936002)(66476007)(38100700002)(38350700002)(21314003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: j9fyLt2pN3iVlwuQgYSDuidhHBuXIqGYNxxdAxZxiLqMohOtaeQ4vcG95cj48tk23Bxd/fSNFy190paiTPbZL3vhMrekLNGVOImi/gPBk1Nmv9rA5EhMuCUPje1dnQHm49etj4mp/Q/gankTIjbTVaB62MwksFHWLaiLP/pNgQUEJYyr5WoCOMjBLuNNTc/mwvq11hwxOagLktLUfBsWIWzyh5eGr+/IobCHbnsPjJejsNRYxZbJUywMZtmYConMfnjZ+w0HCd+Uft3dek8DObgX88vbFk1wnhyvfwk1AQ0xuYuIbot6Bkxx33EGOf8p83qlCg8m0YznvJsThw3o3CGJHmiM7vv+uNLaMtlwusupnjPdxbrdZXbzikVs312ML/TVP6s8qMU8b7DtjE4EqVhixvtN+ZGxIVJK0KzoC8C8bktQol0RNWc818k8cAcO6wruT8ZEgZ5R8Zk+qy7bmpcdGi2FCbsWs9je5QH/Yn6UCHJ1c5oG9uCwsy+NTWu5Iw/UyZUrFlveovYFyzZXsXIA3K0alxExdE3NfIXWcMgetjHAtg6j5PT2NZFgeIC/RUQaNnV4o6HVpSewEuPC0pwrVgHexVgfvMw/FLOaoG/R+lKAproLn+ODDh3D1pBjq0e/gCJuBSWILxeHKahWq5Jna0NBrGCp5GZ3+qrGLpGy0UCXiQUqxoi+EHYPhuY3AxYxPhR2nUlPIuXb5yFuSIUekF7EchRUNEHzaK1T0eBkIkvdkOvtJRFx2/1YcA2uasFAjbzVvBHVMSxF+3SACPq6sNMNgm0Cu/UH7JxUz0TCBh/SZUBT49E+7Yes8YWgFBDj205NMp+TOTxnEq/Sf/nEQPhey2gV08XSH5+37sUQo71qI16kkeOSHoUiZxZ92IR9glj+z7pMxkcYjul7sFNTksL8yoKrvPERGBvpUgaRElg5qmlK2bUKO5diNCLjHaewpMmmXkY5Xf7TmEQOZhAwT9/T8KrKjxzBmUpDkyo6N8Z1iijvF6S1rU5X6doyYzqhqNcMQnhkv2bK27LTFrUXktrhC0ABsnJ2xZiRnWgbrFzsoblnlebDrKoVD9/mufSXio0kFwHGCy8kihdYplrZdv8XCNgYMdqVkTbSILPM7+QT3feElAeO4y6o3g4K8R1jUgNrg7f0pe8o2xN5oqw+wTJXj75JdqPzbeufTeyw0YPikDFmcPQZ1YQ7aAOv9e8x37tsOHwwDeqz/N9s/rpyqto+GyGqVjh3w1KMwrgKNEt2SLFP5Eb6KdYskenPL0wzNkd0yLDMz0yCNIPoDpJ44z4P2APDeA5Xzgh4s7Db7ETALugxj5MA9fTSin7gcOkwlJDzxeravTfwq7laIXqNF+Mt4IEi94RsRGtman4w0dQhnGfzetD8P4kt0GstkLSxXwmeezCGkmK2tBRHEqN5Olrimr/Pjb5MSFNcL+dHhWKg0Cibf6vl5j1o3ZmE4CzOI6/xz2kBgG/W9YnAIg4sBXREjmYw42Kp2ugl7V2ivgeqwjtyl43EwCq3BBYSKg9FL55TxqFMyCAs/U+7bVtm/7PCgwOqunni2VGWvO06JdDBSksstiVDmNMy9W3uYmtPM6SGbTApPcjW+bemUq3uRUmeM0yZNeBmyxrTv8k= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a0c82371-8017-4197-5f91-08d9ed06d2ea X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 02:33:01.6141 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HDxsZ8OVzzcn3EziFmxkt3V6wB/ovplKbr+7kX4+3TE38TD3TwdWdWogUoybm0UyyF1ke3SnrbndMi04Mm7HgQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PS1PR0601MB3705 From: Wang Qing It is better to use time_xxx() directly instead of jiffies judgment for understanding. Signed-off-by: Wang Qing --- drivers/media/radio/wl128x/fmdrv_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/radio/wl128x/fmdrv_common.c b/drivers/media/radio/wl128x/fmdrv_common.c index 6142484d..a599d08 --- a/drivers/media/radio/wl128x/fmdrv_common.c +++ b/drivers/media/radio/wl128x/fmdrv_common.c @@ -23,6 +23,7 @@ #include #include #include +#include #include "fmdrv.h" #include "fmdrv_v4l2.h" @@ -342,7 +343,7 @@ static void send_tasklet(struct tasklet_struct *t) return; /* Check, is there any timeout happened to last transmitted packet */ - if ((jiffies - fmdev->last_tx_jiffies) > FM_DRV_TX_TIMEOUT) { + if (time_is_before_jiffies(fmdev->last_tx_jiffies + FM_DRV_TX_TIMEOUT)) { fmerr("TX timeout occurred\n"); atomic_set(&fmdev->tx_cnt, 1); } From patchwork Fri Feb 11 02:30:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?546L5pOO?= X-Patchwork-Id: 12742778 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E9E20C433EF for ; Fri, 11 Feb 2022 02:37:19 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.270089.464314 (Exim 4.92) (envelope-from ) id 1nILo4-00017v-TT; Fri, 11 Feb 2022 02:37:08 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 270089.464314; Fri, 11 Feb 2022 02:37:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILo4-00016l-Ka; Fri, 11 Feb 2022 02:37:08 +0000 Received: by outflank-mailman (input) for mailman id 270089; Fri, 11 Feb 2022 02:37:06 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nILkJ-00046f-6T for xen-devel@lists.xenproject.org; Fri, 11 Feb 2022 02:33:15 +0000 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2072b.outbound.protection.outlook.com [2a01:111:f400:feab::72b]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id f57e3d0c-8ae2-11ec-8f75-fffcc8bd4f1a; Fri, 11 Feb 2022 03:33:14 +0100 (CET) Received: from SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) by PS1PR0601MB3705.apcprd06.prod.outlook.com (2603:1096:300:80::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Fri, 11 Feb 2022 02:33:11 +0000 Received: from SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb]) by SL2PR06MB3082.apcprd06.prod.outlook.com ([fe80::80b4:e787:47a9:41bb%4]) with mapi id 15.20.4975.014; Fri, 11 Feb 2022 02:33:10 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: f57e3d0c-8ae2-11ec-8f75-fffcc8bd4f1a ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EzfWLT+EzT+znwPSOPxqYdnBY7QKPKT6xxh7031m/bF047AkYSygyMImdSlJl7Xk1sxpnvkh6zhz7seT2CW96QhxMJVhCqD5LV9WGERMvsE0Gna7L5M2WzS0yXlAPR7duJYN4jTiwVUSsJRlWarXn6MDRZvsxk+C9MBlJdH7vBkECxUkfAgU9ypBlSnYDUa2Swk62MZLXf1oK9+yXkxAJTP2LzqepyjlwULEKvvJFTItqrGP8TVa3Bycl+1ArBaczrzGr2vNhVM+ku2hIYZJFZ/Vg65twefXMjvVUo+OErYjB24sIvIjv4GlqtmlF5scHx/AhB1fV43+Mgfe4EMbsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZCGsYVl1Rk2DP391pMDtEyG1sAbTFMqpUMsjQddFGaQ=; b=OqMFox67bITNfWyykhjVy4MY+GlnCKsJQHprufDn+2ft5A0WfXVSxd0miXUo+2hqaWTv1OyjH3Yc9wCeTS4evaUftK7N1P2ytElqJHNqBPMzjo/rs9FcBL7XUFpvQoAPYytVsBHlBY/YzqtAX3j3Zfexkin7PIHh+bx4yV0dqfywBE8bBNTZVjcbSl0eIauXfGeP06P6Cj6oyySWn1iiHMbsBLngH5GdjevH+7ZUiF4qfx19fHmbNom3z0efZ5JtUHudRakEKABRCXelIUpeBbU6g48AjqhrrqreAMPceSd9/BsmryGKiH/bGcUJJ8jE5rmT67dyAoq6OeIqzoQ3mQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZCGsYVl1Rk2DP391pMDtEyG1sAbTFMqpUMsjQddFGaQ=; b=DqJJpqg7B6IBOs5Ucw6n44AN6YSysS3ZJS7oPEefh9yBrmUMJsgFMHhtxGGK/+tJRaE4cZBJVBz+RnUZf9pyt39no9qp39jdOhQXTJHvLEwh/SUQt/bMDEIcTE1zmQOFE0fVDdaTF7YddltOn0vCidp4vW/EEAeXfvTrSAEwJsk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; From: Qing Wang To: Konrad Rzeszutek Wilk , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= , Jens Axboe , Michael Turquette , Stephen Boyd , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires , Dmitry Torokhov , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com, Mauro Carvalho Chehab , Hans Verkuil , xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-input@vger.kernel.org, linux-media@vger.kernel.org Cc: Wang Qing Subject: [PATCH V2 13/13] media: vivid: use time_is_after_jiffies() instead of jiffies judgment Date: Thu, 10 Feb 2022 18:30:36 -0800 Message-Id: <1644546640-23283-14-git-send-email-wangqing@vivo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1644546640-23283-1-git-send-email-wangqing@vivo.com> References: <1644546640-23283-1-git-send-email-wangqing@vivo.com> X-ClientProxiedBy: HK2PR02CA0178.apcprd02.prod.outlook.com (2603:1096:201:21::14) To SL2PR06MB3082.apcprd06.prod.outlook.com (2603:1096:100:37::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6ecfda2a-ef55-44e3-464c-08d9ed06d858 X-MS-TrafficTypeDiagnostic: PS1PR0601MB3705:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1107; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gET8Awy8O3rfEJ2KEFZxWC/slmqXyDgtNj99XlkJW1GWzk84hR/TRK5gKO+GMjL72JwFI6j44TQUDhyT7fJawFzngVXOjZNW+FCCe3vSeBoo9xJOKgQxhSWjwsNyPnsN5QtAphPEQowiinJNUfJGXO4YlIGTyoyPK47tqB7e1ELN/au+VZg2KiVmmdlujxOKh/svgY0Btkt3E1EU9XAaEB/fDl1iFeRBWsyOehLabAOAzB+QTpaJiwz7tTdFl1zm2hEOus6Fm0fQfZvqk7e0K3FB0ES4SOOasvK/MidWtWFzOusgZm2g8OODEW2qChgbIg2e82TJhCANYnYxOzi8e9bEKklSRDc45QifSPZODJHCPBiccXPEwJBMtlg27FzB4C/7N9kSCGDwpu8iJx+Azt+wOrawMWlEco+uFtBmgGZCXWpereILX4Rc2jc7V2AGuLNNTs+gOjMB0zGeJEI9X4q4Qq2u181f0/uja1Bfc4bWCt2sagAz/YMuFQU0PyrnOEIrjC+Dip5zndrETRa7qjBq9QY0yRNQrCZX/j8PyOMfxzDS+WLZNHCFxbFearaLwLx0F0UZUycs9wkTmVmTzZPKD3zwVN6eFYLH3eo+zHNWxp5IEa8sxVkNxTP5j1EaArvagxtVMxLVnAleAObs8ibPNXRtibSSfBbfbrNrXK+43VI5q+1mUQsllCh8Oyviqwm46moiYKGuo49/PM7F2RgyY1Echn1GhCN32kJi9/4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SL2PR06MB3082.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(186003)(2906002)(7416002)(66946007)(316002)(36756003)(2616005)(107886003)(26005)(921005)(7406005)(110136005)(5660300002)(83380400001)(6486002)(6512007)(6506007)(66556008)(86362001)(6666004)(508600001)(4326008)(52116002)(8676002)(8936002)(66476007)(38100700002)(38350700002)(21314003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: anxVmQzQteJnVybznqZkGfIiz7nVC4C/C1I0BoUPZOiTIogrlkXJQfPjamKToJ/GBiaYBt42qmKppqJRYlI6K8e8oDSseJKFoNBR04iv6/fm+Lx7GWQvRPd2oa1twpXDMI4qvuvmPwZAkhoKDxF0B174B/eCGvcrZb7MuG3t4wRSryhy++4ex1neH6Wqoj90ulCVvy5lZyrMXkQgTs3QUhg3tOd5nh+d/+3M0Ry0g23wvfNpXjL+GSbFdHDYkdh8FY8WD+0jdtn5kt+zr6DoklFBlihTRmOPDsmAV5lF7ysL7Ot3qkCxkgN6pm8DFreYAQqEpBVcHa9nG/CgeRF7kuwCG4Qp5zSCWpkvAilj+BRyPmamsXHVBCD8KgKSCNvrjxsPNqNfqIOuYlhdCcma00ieIvNk0ZZrkVhg1i6VM7n+qZA599hn/GshE8jQdY3SQ476lJakG6ATJeBo8ph1RCyYfr5vtgx+DuYyutc5Cl7ZbdkYiK0/YjkgOrS6Q91fRSA9ffUTob6enZ3DAwORawFIBL5tCEOPBiHPL4rCujB6wstavCGEUdUniEda70+r8aqtK5YaTkpMa3f/VGGjqYhORqXiFumiP4zSdqZJULVM5uUUXbVs3ezbCsUaJioSKn0ebUP3bUDyGqPscVKs6SPTJAgp3JhddiZzHFnHbyYlEKO+tPqeIOtQpu/N+JJP+mSJK2CfocrN5A9CH7W35Ydlo5Y7iBCSUa+YM5eGX2PovUV/g5+TJbrVyS1O1VS11FZgsI1ooqiNeY5fqBMZ3IgzHqvBoueLUSCZpUWkoulRF40IN9THC9O2FL4yTz7kJmH6u8DBp4ueZ8ZPfFfUfaser2NE4V2AvtLieom2/4HHb/esIgPzqSNcHy1SMH6Yqu9Tij/kDCVsMQa5ahFGZJicU5qFtwtSDpUMyNkPvUbdMMZkzihwrke1FXD0O1CLLYKOaHRAOc6DGdNZYRTpoNLq047VAMxzRkOHIUUoE5Jq3J9kmtbV+Kk4CVcR/3gPFKfERJ7n2uREHPAqYxq3sjDcxmdPW44xPZKbTq3uE4N4/Z49lO1lzrOEv2a8odAA5+otNk+qAlk0ccQsoMkk3BcwFDNFk7QlIT1UoIrbNhOG3VtEm7hlzI39hCe8/Ebnw4vX6HLRt3KMgLqyCGknQn29QpQgZ/ARx6BCJ19zTEqGeH1F5ocRmCkZMyI8Ke+F6qMylorIcRz6b7721btXextPwLRRMozloFGWmLc5aIb+tMEY/1vMG+D9DmH+eZtYThlQbHn4BQKkZma7/miULWcqc63kQT+hLwhUnj7jv6zcGFy4bbaInAjgb6eoy+3rBMdrA2zJ4VFYdL0zd3z3WxD2sJLfKF35kjEq7wHXFUNq+jRihuVEe2vuTsqTtBwuCDKQW7XklkcaKQ9CZSWh9mt3h7a/jtOuKg3nYMr0455m7f3VUWVteWlS9A0gtaublibFTjEYc3sGv+xoITeJoQ7Uw+Kw2lWQAREqiQ9wixIO7ywDetYMx7LpB1JoZnJb4gGVHx2QqQPp3bPkXezFKtUqx8GzjbGPH9PpYHBeIIpgbkb8mAtjfKBVfNE8KrxHotMy2YXr+er6qy9SCFw8zXNvEoji+nBbytiph8ID4VM= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6ecfda2a-ef55-44e3-464c-08d9ed06d858 X-MS-Exchange-CrossTenant-AuthSource: SL2PR06MB3082.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 02:33:10.8323 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +8mJtO29nBoysTeez6egaCcwz1EVAAOfzUIKKBW62z5C2FaTL3wFUrZi2JsNpYWrBJ5be6JEHEfDI/DMXA3DLw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PS1PR0601MB3705 From: Wang Qing It is better to use time_xxx() directly instead of jiffies judgment for understanding. Signed-off-by: Wang Qing --- drivers/media/test-drivers/vivid/vivid-kthread-cap.c | 3 ++- drivers/media/test-drivers/vivid/vivid-kthread-out.c | 3 ++- drivers/media/test-drivers/vivid/vivid-kthread-touch.c | 3 ++- drivers/media/test-drivers/vivid/vivid-sdr-cap.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/media/test-drivers/vivid/vivid-kthread-cap.c b/drivers/media/test-drivers/vivid/vivid-kthread-cap.c index 6baa046..295f4a3 --- a/drivers/media/test-drivers/vivid/vivid-kthread-cap.c +++ b/drivers/media/test-drivers/vivid/vivid-kthread-cap.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -893,7 +894,7 @@ static int vivid_thread_vid_cap(void *data) next_jiffies_since_start = jiffies_since_start; wait_jiffies = next_jiffies_since_start - jiffies_since_start; - while (jiffies - cur_jiffies < wait_jiffies && + while (time_is_after_jiffies(cur_jiffies + wait_jiffies) && !kthread_should_stop()) schedule(); } diff --git a/drivers/media/test-drivers/vivid/vivid-kthread-out.c b/drivers/media/test-drivers/vivid/vivid-kthread-out.c index b6d4316..13f737e --- a/drivers/media/test-drivers/vivid/vivid-kthread-out.c +++ b/drivers/media/test-drivers/vivid/vivid-kthread-out.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -234,7 +235,7 @@ static int vivid_thread_vid_out(void *data) next_jiffies_since_start = jiffies_since_start; wait_jiffies = next_jiffies_since_start - jiffies_since_start; - while (jiffies - cur_jiffies < wait_jiffies && + while (time_is_after_jiffies(cur_jiffies + wait_jiffies) && !kthread_should_stop()) schedule(); } diff --git a/drivers/media/test-drivers/vivid/vivid-kthread-touch.c b/drivers/media/test-drivers/vivid/vivid-kthread-touch.c index f065faae..8828243 --- a/drivers/media/test-drivers/vivid/vivid-kthread-touch.c +++ b/drivers/media/test-drivers/vivid/vivid-kthread-touch.c @@ -5,6 +5,7 @@ */ #include +#include #include "vivid-core.h" #include "vivid-kthread-touch.h" #include "vivid-touch-cap.h" @@ -134,7 +135,7 @@ static int vivid_thread_touch_cap(void *data) next_jiffies_since_start = jiffies_since_start; wait_jiffies = next_jiffies_since_start - jiffies_since_start; - while (jiffies - cur_jiffies < wait_jiffies && + while (time_is_after_jiffies(cur_jiffies + wait_jiffies) && !kthread_should_stop()) schedule(); } diff --git a/drivers/media/test-drivers/vivid/vivid-sdr-cap.c b/drivers/media/test-drivers/vivid/vivid-sdr-cap.c index 59fd508..f82856b --- a/drivers/media/test-drivers/vivid/vivid-sdr-cap.c +++ b/drivers/media/test-drivers/vivid/vivid-sdr-cap.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "vivid-core.h" #include "vivid-ctrls.h" @@ -205,7 +206,7 @@ static int vivid_thread_sdr_cap(void *data) next_jiffies_since_start = jiffies_since_start; wait_jiffies = next_jiffies_since_start - jiffies_since_start; - while (jiffies - cur_jiffies < wait_jiffies && + while (time_is_after_jiffies(cur_jiffies + wait_jiffies) && !kthread_should_stop()) schedule(); }