Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30083208rwd; Thu, 6 Jul 2023 00:10:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlFkas7OsnDUHoGc2TklbiFfZl11c/XHiS9hVdf9wv1izqCIjM/9HzTzwOVSWuJ8mPY0vVb9 X-Received: by 2002:a05:6808:3010:b0:3a0:567f:8e9c with SMTP id ay16-20020a056808301000b003a0567f8e9cmr875776oib.43.1688627445573; Thu, 06 Jul 2023 00:10:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688627445; cv=pass; d=google.com; s=arc-20160816; b=jKgETUtssWc0ARPpSq6bLFrmD0buZYKQ3BcPlPR1jCSzVxYv1rEUBFSkh2lKAuKpI/ vdc2GS6ygIWrcHJj/f8Syavfx3CCJvV6aERqGXNHCifc+d5BkNrMs5mTURb30nhEYZwj 5HsaUuKGMTDmZNf7KulwUksIhpADVjkb6Eo0IV1apPus/mDVHRBpwST+v8qfMF8q/6z/ 5YVZC3nZk9aobZ0mV+S1fVP0DExes5mx1U10FlUxUbi/wdKTThWpDkgKd4DFEV8ffTtv bFit9ox+vX3MLAx04+NU0g3fHUV0lWntZOgHuF4DeR8Vm+xExFUcSjDQz+tmEymOR4lL iXmA== 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=YWH3isqpK2z1sqNAB0zxDQ1hmqaqS80cxXeh+3zhlLk=; fh=LHyM0Ofe/Xi73aLSY7Cr/2ho5ou73oFEUsk0qtUQfrQ=; b=YGPIraMYcunfL9eOO3ITfoDrTi7LOKdPKZctHZJR7F4hKHEOSOcezG1SwXxuRP7Mvr 1+TaiyJlHBCaEcvmrGJp9T805IIDsN36gb/qDpOAKa4DA9NVqsPLyo4lxGYOvt2RK3xh SSzp4WvL5Z/SbOlob6R/gbRE53HJJcLRVVENMmtgZGRW8AigWMt8NEP/T/m9viiZKuNh SemsI37FSQxcClmsBS64t4JZLlYhQopnvIuccGzaTD+QFqQOFLgyc3WFCxSpTxSlPGcO wOtw9Ad6HTO138pmNuCxaVfyYygFN+JxGUJyNb7Tr4J/oGOoCvqpoOvNZamdVH+5KBys bR1Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=h5EYFxY9; 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 j64-20020a638b43000000b0055bbb6fb4fasi895513pge.6.2023.07.06.00.10.33; Thu, 06 Jul 2023 00:10:45 -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=h5EYFxY9; 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 S231278AbjGFGrA (ORCPT + 99 others); Thu, 6 Jul 2023 02:47:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbjGFGq7 (ORCPT ); Thu, 6 Jul 2023 02:46:59 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2132.outbound.protection.outlook.com [40.107.215.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B097E10E for ; Wed, 5 Jul 2023 23:46:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XtrlTwe8Nx0eN/69QU15GgyW5Ig7zB/LxadIGABkqTTlVrhjornnXVXDuzXhVyxceRY1T5XE/hAGKqKvX0KGCv/E5JZGyqkdjWuDAepPWYBHuhEqSF7jSj09JlufW6W7BD/cTvedd6fq4cU2HPfrAGL1J3GfuZwlw+i5zKqgJ1vo8RkO4fWHGUT1W9m3hUEKOirjmo/NrquUHGxlDMZaqnT9t+Jrznbry0mfHLADUbPw+u+A7BgTDEkRKoM4DFcrOBFpZuXdfIJKNlS4zHtcdgPV10zuVvV9bUpS++MIy0eiepqEyomYphw6k9zaNqfph/jGJ3psjjTOo+5vcA8H2A== 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=YWH3isqpK2z1sqNAB0zxDQ1hmqaqS80cxXeh+3zhlLk=; b=ZjAj4OnHtp/wWccoh4AclSQQopTW5s46qW1MAEFVglGyext0sjsmcBlVPryAHJoWgR/nuxMVfTkrvvFez/tIk8Ji1bICOlmtI/4wYF7XYDIdCChr9GvVhdCkKTtSRUEKUZ8UpqlZHMwL6RsGChMkxVyHy/KsHJ2z64zNosDfog86C09Sa0rFlZxvaPyrtPOVCeCmZYMjXx1yT+mU4LHOT7wFN+g4aYBciTCbjwHsCOk6FjbuLAPEgm5sIAbRmPZMz0HFOltHKH1nsFRDAGbPahBtcV3JxpBx9cFVcsY9MXPTW8S11AL9EqHidQsqzIUoZRhtUVOxJ3sKfbhkXTN7sw== 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=YWH3isqpK2z1sqNAB0zxDQ1hmqaqS80cxXeh+3zhlLk=; b=h5EYFxY99GSzBqT7CZx7OIZIwprK8iMnrC9fxXQnocEbH49reE+azIUypMnd9BCWK/A3Ri/0+Sas2pjQhCOWpE7+a65cUcNZQn8iPs3+Xd6XSZyDlUN7eCC/Z0tHr9EVGFUz1pGBUbp6GW9ZeBL8S46PRoSAcDAV9dx4FK5I84OOW4Yr6fPT7rpXqLKL4frPfiMGzb0YjhxK9TH1cWmt4aUDKoqNZGo6owLBWY6AgezbMz9bHB16yRhaABsAEFNcGN9EgCBESHBTA2qbDHj6904PrL5ofi/UX4hHcmrgZeGyWYPE7N58isH1wFy6WmpBp7Ae/l57Amy/SLmd9b5p6A== 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 TYZPR06MB6237.apcprd06.prod.outlook.com (2603:1096:400:33f::9) 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 06:46:54 +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 06:46:54 +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] Covert to use time_before macro Date: Thu, 6 Jul 2023 14:46:41 +0800 Message-Id: <20230706064641.2296-1-zhangzehao@vivo.com> X-Mailer: git-send-email 2.32.0.windows.2 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2P153CA0004.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::23) To TY0PR06MB5706.apcprd06.prod.outlook.com (2603:1096:400:272::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TY0PR06MB5706:EE_|TYZPR06MB6237:EE_ X-MS-Office365-Filtering-Correlation-Id: 91bb20bf-7b04-4e18-a89b-08db7decc931 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cn/BDU1S1MeoH4EdlRG3G+MSagDnTlhix5jXNmN55M06oIRsTfjjkiuM6FIBV8IyRZFxT6npIVo78ubO+WjgU14m5g3v5yzbOiGyCdFUO6vScV4uUQ2PyPGd3zVR+DZVoblbdCZCe9XUSEXOecqiP6psovstVvhQYgV2UWVEPDvkvTE45VfP+ggJlNgqfRwDZX1E8XFYu6Yax4lVu13Er4zcOcrmI1BroPJfX1G+Q35TaKTSN4ZASsP3w7Ne4e5efO5KVyKCSa+5U5pTmXaGt8AxuRvi9LPKoNb2k/RF8wZ8cS+aw4RdSpGJCXBRiAtNTIdqZCF1ZxzjPg1k3sewoqosQ0oZoLIlIKULyS9yaa2HC2PA5eVGnwCKQeYbU0q4twgQ6iIgiB2K01SX1+h9/hungFckQJFWVupD0yCzwRM7BkXXzRRZAwrKVfICG9Hy0DcQRIFADccA2vJddzUmpkURg1wAePbzh1eUGVQwiR+rfK8fEHD86YV0WdOuaFXtfOJHqXSY1HSyGBgZwx7s7vq4EG91qbDUSh1FwX+tQVxH5TLFfXffMoC+I7qpWBhElqy63ZvhhwhvSz5TNmxXY5IIaJThjEF7uPsDnBpwvHmUQ95coqkwUrmI8+3nZjvI 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)(376002)(39860400002)(346002)(366004)(396003)(136003)(451199021)(26005)(41300700001)(38100700002)(4744005)(6486002)(52116002)(38350700002)(2616005)(83380400001)(1076003)(6506007)(6512007)(6666004)(316002)(36756003)(66476007)(2906002)(4326008)(66556008)(8936002)(8676002)(186003)(86362001)(66946007)(7416002)(478600001)(5660300002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?shMPVmUdfudC9avnPpUXzao3QMg+2/Qd/NwHXQUIwvIYrOGvum6oBRtWIpT8?= =?us-ascii?Q?VqrE1c9sKBbMHALh3Ud/3LBRZoz+kVvz/Ax9yKd9UNY8EWx3nl8REflgubK4?= =?us-ascii?Q?MxNQCsTzHSQsBY7IwNuS12n9cRvwhCik2hacIt78DjX75Jh5NKkKfUaqk7ZF?= =?us-ascii?Q?lvVcodcM4fI1eMxJkmpxypjdF0Acjnle0nQOopCXRkgW481FopYD0MApFL7T?= =?us-ascii?Q?bWohcBt2EUFHXEJVBLeL2/Ir3jOvFIUE8SHbeJa7FPe5a6W4+B2ozo/ke4Pd?= =?us-ascii?Q?J0yu5TT1/55PvCXpiTlTaDw1+u8gqIAjD/Vlk4sUksyTAS8PkVslN82GfXZ/?= =?us-ascii?Q?oFBimuiY+5JEZFol+uifAPDAPr0TBptpRiugrOxCBmTKjtpab2arP0WjKtA7?= =?us-ascii?Q?H9md3P4DtcmT6sxFoKuTTOPsv6+hAq1i0YkWYP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pLeVla08WAWlVOZsN4QxDlvxEZP+NdHoP8EVsQv4wTx2PGhpyJL12i3rEEUo?= =?us-ascii?Q?Vyz9TwQEl0EqYQDhNTZnGZAZXPnFgCzTQKsaV1HFws5lQ/z40KGVHj6O2xkI?= =?us-ascii?Q?YNeQuaKh0w5NnhTtBvBN49/ssuNqYEzElFnGOpXS7/v+cEan2OYlRlLtq/1l?= =?us-ascii?Q?oK0FcFKsUv8u63rtFMStH401/k7vTgXI/p0HJTBEhKwBkl3FDr6/6aTXRrg+?= =?us-ascii?Q?JJRc5t+kOzaHWn8MlFC80gC7Z6OY3w1FN3H/BD4p?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 91bb20bf-7b04-4e18-a89b-08db7decc931 X-MS-Exchange-CrossTenant-AuthSource: TY0PR06MB5706.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2023 06:46:54.6092 (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: lMArdJS9jaxfPfpz+TiATIBBHFMDobAWolRsk8iSYTrFayM+38I0PQkWQJuzYKxy/e7wz5B/C0QId1DV8EFlEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6237 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 --- 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