Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30110496rwd; Thu, 6 Jul 2023 00:41:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlG3gOb0A+jjB9XHYLrteFCDodzGMlfDO2UljzF7XjBb0E8Z+iaMqPDDoedwqpbGTj/1uXma X-Received: by 2002:a05:6a20:1590:b0:122:20c:fbb2 with SMTP id h16-20020a056a20159000b00122020cfbb2mr826616pzj.39.1688629316132; Thu, 06 Jul 2023 00:41:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688629316; cv=pass; d=google.com; s=arc-20160816; b=0YP0jcVkJOEPE8/AQObZC3JWnEpVjllwoHVdll/wKgIb+lRDlbc1yOveUZOz7qWcHi aDJZEmO73HX3L6fgSW0w6D+3jVsCNY5EoSnFK73aOs2jNmuNndp7Hg5lJAL6MB1WAsOf QU1ap2VNTVkSmWw0RW0T2ZTbgCmsMvM64UGj0HWdiR9iDzn2ezZijaPIDik7Rci9dF7E BustSexMKPU6WyVNCnkxAIIOUA4gpUVrY3Ge50xx6oc1laYKaIayFiLomaKSR/6BVxJ0 aAZWfA0FHoEmSmN5LkO4PO3KfyyQOcIvNM/ejZLmrHdpIRi5ZoOhPFgvm5PCabXcAPp+ Nolg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=pkEieuObEcdF7JwrsqM1GI+VytgKbTEom9/HS8tWEvA=; fh=LHyM0Ofe/Xi73aLSY7Cr/2ho5ou73oFEUsk0qtUQfrQ=; b=coPO15uRVuQIcxJzB/ebiCL99lNyxXXYisr7mgk6tJjTzA7fb0x1S7oqRv6CMpBQsC E6vaB1URk/irs2rUrp7pzVFLNxIHCRCRuvCaxo6VRYEMHNs288pAjqyHnS6wOc2N3MRe NqkXNYfbbqc3G2QqdGnBjTf56MfPdXgaSeF1kfQn8HHc/fe6CPx/l1kSkGu5WVIJzVn3 0IFOylkiqq+7Z0MER9SpKnFhSVzD1I2w8Ulbvmt3+r7siKDCEYoSyQl/vSv/klt3CM7H bK7kD0gL1zfDjKpEW6M/+d71nOA6rgf3G4OtHul+UTIfhZxUc4eIn8qFyMtMO2fmhFzw WesQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Zak6UE2d; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l17-20020a170903121100b001a64fa4eb27si896758plh.230.2023.07.06.00.41.41; Thu, 06 Jul 2023 00:41:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Zak6UE2d; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233223AbjGFH3t (ORCPT + 99 others); Thu, 6 Jul 2023 03:29:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233797AbjGFH3p (ORCPT ); Thu, 6 Jul 2023 03:29:45 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2113.outbound.protection.outlook.com [40.107.117.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EEF91990 for ; Thu, 6 Jul 2023 00:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=foaKSCNzd8AMVD1Lj84p5x/sjOQMxU9jWsIEMP+ayiBzA65LIk9US6pkO8vFRUKedBsKkBm9V8wTznsvMIM4cWE+Ws4CrWg19uUO8isvXiA6+z4B1YG+eDPPPZ7NldZsLAFDOPdUWlh8ufRt+d0Ny5vpV1ocd4xkyf/K8eL5efqhFvK7fKGyY5LSXvlrOfUSdNH5pLgP1SMRogWYmtkD8pbHmRhNvEBtRhogJQ3kyHGv5ImuwLP6onXjIasq1F/k5980DAK6kRb0dQ54m29vDPT/UaJBioUXWt49BVrRSmG2zb/bdRWcZIjfWQcTjOlg9PESnM7/pZ9JK0l5IIIilw== 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=pkEieuObEcdF7JwrsqM1GI+VytgKbTEom9/HS8tWEvA=; b=Gd2rxcfNkJh44dRp3v68+ImptP/isWUor7vLswagx+0hNM8qwSThSJRo/vxzVvr595aupeNwOzY/c3N7NzUUTHcWLtb37TagTJFrcjv4iNyTUvPpoIEkitApQscfDuAtkypfd51piuEm97Tdqc85WOslrY2YvaKhrRT5Pecr6IshvDrxVyX2bYE1IKVarJ+KIx5wWf4roMXyTmuxvM/7Y4WVph3VoYyrEZwzmg2Fep2qIG79S1tFLOUwlDkoO0H6caON2Mp08/8/VjohE2c+PjGLBGZBJoGZqP0gQEDWaSwUEAvuZod4LnUec8br93J5VMRarhjEMY4LBeCuy+6jKA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pkEieuObEcdF7JwrsqM1GI+VytgKbTEom9/HS8tWEvA=; b=Zak6UE2dJXO4U8IB8cU+kRxoUGJnNjfKIYt0cY+CFcbq8sGdAu1LT51spinoYDcREoe+wII3wUTTCtnGRZmXtFeInEP2OJZG8Rq5NpuifsQLN/vM3rXlLwLwkq5cLURsam6OUZsXdS105aoS88frP3LrrM8o/USn/fwQqduJRbvIW7LYBKVzcfkegHRlgSIL8uRa5WNlW3XmWGKt6FOWVXCjpB8dk3J/SUYcubpBGmNWKk9ozzF9sL2V+esBTkn8nf7giDtdebLmm4KHybMYWFvrHpCg4cLHy2gktx38qctMYu1nXscO+UJcZdTWX99oPiiVnGT2JvkZLPrO+lzwgg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TY0PR06MB5706.apcprd06.prod.outlook.com (2603:1096:400:272::6) by TYUPR06MB5948.apcprd06.prod.outlook.com (2603:1096:400:353::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Thu, 6 Jul 2023 07:29:38 +0000 Received: from TY0PR06MB5706.apcprd06.prod.outlook.com ([fe80::d6ff:1295:38d7:a019]) by TY0PR06MB5706.apcprd06.prod.outlook.com ([fe80::d6ff:1295:38d7:a019%7]) with mapi id 15.20.6565.016; Thu, 6 Jul 2023 07:29:38 +0000 From: Zehao Zhang To: jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, tvrtko.ursulin@linux.intel.com, airlied@gmail.com, daniel@ffwll.ch, zhangzehao@vivo.com, luciano.coelho@intel.com Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] drm/i915/gt: Convert to use time_before macro Date: Thu, 6 Jul 2023 15:29:24 +0800 Message-Id: <20230706072924.2562-1-zhangzehao@vivo.com> X-Mailer: git-send-email 2.32.0.windows.2 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR02CA0028.apcprd02.prod.outlook.com (2603:1096:4:195::8) To TY0PR06MB5706.apcprd06.prod.outlook.com (2603:1096:400:272::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TY0PR06MB5706:EE_|TYUPR06MB5948:EE_ X-MS-Office365-Filtering-Correlation-Id: 20f4cc27-653b-4a78-ebd8-08db7df2c148 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W/iD42L3WutYgYE/1OTp5Lzk6SYF8mzHsuHxOFWVpPojeiq94ZEHu8sCavfUu2fqoNz2AUyqO2Mz/VxbyiOxb3i67yw2QLjp6pU4TLQ48ut5l85PHeV3Ac+0QAISgb9dCqqUgqATTKwOrrtcn16Uw4aKdVdlqC2qjx4k/aUO3Ld1xrzFTH3pHidRW+1yvbBFQW2OxmZ6kAnhvINp2ColP6ubwhcJS9UXwQMqvgaSl6Ux29QU4KaS5AR0u2LeNELFpznh2G7jogcuPfxbiZ80qrQo79i1FaIcODt8e4rBFYs0rY4ebnYiSpX0mnIIhZ2y9qXV0MkFWbRkq7V1TZRQijbIyp0x8GE3ikIRssIqvvakHPegTiOJ+fsRQ65juhC0UbipVUzrhA7fD4e9iKWk5cBmRHmZ8EbfvZgTodt7IzpgQ3LAMrT/eVxMTd1qzw/8gKHdTTmvUeoyR92fBV1uBAAGsGhS5d6QwA+MuFTwg4ssizBr7zm9ql8ODtng5I8IZTp19pziBMRarhY4fMn1lPyhd62nrIWNuhSMPMSH/+w2in6rvPFQACa6tkJES0yl7g0lzm/fECUA3JB7pjVrjZZoY6X7M9kZNvAx4ZP6tfOzzT/UykemqO4vXqUrADPo X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TY0PR06MB5706.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(396003)(366004)(346002)(39860400002)(376002)(451199021)(7416002)(316002)(66946007)(4326008)(66476007)(36756003)(478600001)(66556008)(2906002)(8676002)(8936002)(5660300002)(83380400001)(41300700001)(86362001)(6512007)(6666004)(38350700002)(52116002)(4744005)(6486002)(38100700002)(186003)(26005)(1076003)(6506007)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?75Zuy3I9JKP2HUAakHYk8X3xnJr8r3wATtMYBaM7+o+Z37JtsCrfGzzdRnWu?= =?us-ascii?Q?WNBJ58lEK5DNxoNd1ZlFtQF58xwy1gbIpdEs55w1OJdAto5Q5cIMnun47nnV?= =?us-ascii?Q?NqCwdRMedWmnZv8K/1729w32uY3jS1p6QiHpntwYZ1gN5v+K771AFl6Oo5w1?= =?us-ascii?Q?FE9/rFxOY8ElrYgsWxzBYAj2RKz1PlPDZC20MdI9rVCzWtUdOFimO5MPZr05?= =?us-ascii?Q?yQvn5LGSF9yOn0zQS3goSjHZ7crAcnw6tLgq9UAo4C3LdQdrAB6aFh6Jo5pB?= =?us-ascii?Q?VVx3CvKK3s1RLi0q3GPD0oOs7UHA8H6JG6Pt+3Kd0TTZ7JfxV9oFjkGp3pik?= =?us-ascii?Q?CVa2tkNxKIiOPlkycxqkpDEqtAqXfA0cxN+oIiIVzgy2KDwjfxOkdyNQYsgE?= =?us-ascii?Q?oKLJouTSGtN1c+aH2wz8v+UfQVeQjoK8NLa2ri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gpZ8tcRt2ttSVSxTEN8/Ks8Kbba5PL/ORb/xJPOg+Xrn?= =?us-ascii?Q?7NKRWPQY5DdEfYAtNPia+M/PO1TlSyzOY5U/l6p3We6eGaduLRBe/96iphv3?= =?us-ascii?Q?p8M8y7QNTglrGcwZYAQ78ImwrnVls7FwB5kInkAGZUAwoI2PDK0lnJOx1Wd2?= =?us-ascii?Q?06bTvGRqezCj2zk5c0hexST0I2157HNOB+2VWAXu4A1t2PratjpJ//U+my4d?= =?us-ascii?Q?lpoNLxYVhrf5VpBP5Vf/SZtB/WUHMQmF3jnfln8r?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 20f4cc27-653b-4a78-ebd8-08db7df2c148 X-MS-Exchange-CrossTenant-AuthSource: TY0PR06MB5706.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2023 07:29:38.3205 (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: TOoG2GOyflToXB/GSv5r51X7kcKXv8KA3eYN0FtGFXDL4UMd29T1FUjeWqj/lzrM3wGrr1Y2oFN6X0bhEaHa/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB5948 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use time_before macro instead of open it for readability. Signed-off-by: Zehao Zhang --- v2: -update subject 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 86b5a9ba323d..9145f9e22860 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c +++ b/drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c @@ -57,7 +57,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_before(jiffies, age + keep)) break; /* Check we are the first to claim this node */ -- 2.35.3