Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6485454rwp; Tue, 18 Jul 2023 00:42:21 -0700 (PDT) X-Google-Smtp-Source: APBJJlGj/tsNWXzIgNJmAUqqGSOXpKzUlXXFuPWN1egrV1anDKpcGqP2R6xHySJ7znd7IfEnr8DZ X-Received: by 2002:a17:902:db11:b0:1b8:a812:7bc2 with SMTP id m17-20020a170902db1100b001b8a8127bc2mr14926466plx.8.1689666141388; Tue, 18 Jul 2023 00:42:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689666141; cv=none; d=google.com; s=arc-20160816; b=Zy6KSOwtroTPW3HvTy7I/EnrbyqyDrurb1OhN0HPmzSDKIo7YfgAoMHnMb3wvvQhnk 6ijv6anxhXL6aleXjmxJxiSYosl4k5ZqOGCR4/TsSHymS4L6wFmZHpYwXvUFuqL/XAd8 2W3RxxpKp5mquVu3rCU/OG8i/FN/BeAEWs6LJhkBvAJNyE1V0XX6qFznTIg1ZsTIdvhW JFI1LyhJPfHSDYRKGg5bavbrdMkESLfyfWgGY4bKqSRgJGmG833refj+EYMUfcJdgeVj 6+vcT8EpwFM1nGJoZIi4ku0LiqZOhpSEBrAWhCLPrhxJeF4ojlSaMJGtVtD05a1ScFv/ OANQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=sErK/zzfvdIFYhPMJ9aozjY0f/ReKhUONXFMjb3/TYM=; fh=3xzi+BqZKTBk5MkTiR3QT2Acm3hto8LBzlKFP1afWsA=; b=vkAL/3a4Z5Pw/Mw1ym+zfs8Eoe5OhPbI0hdwthpjgc8mvfTbyqmcyMnDgqbL2Dgcuh JpYrIBtO6YJJGeYrXcTwjt7NeityfqeNLLzXagKhML8mEDYMmenTf2mc1imkfHKgvo1p AYcQm106w/w4/ihvxb5FifIofeJKVt0X2wWox2daz//0sGCX0NpQD+qyyHeW2KgiznDu wWD4+SSleF90wtGNLCuAT+c6gHN8l6mFicIgsF6ubQdE0Y86lVSt52gtVua3gxNFU5D8 Rm2+CAzKcU3ZcKJUZbsLgyiqeiQNHlVEyUBFgcG3OqOrG60o0I5+kkg3F+YvwQ0zQTfT PE8w== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u5-20020a170903124500b001b8010ad924si1310693plh.103.2023.07.18.00.42.08; Tue, 18 Jul 2023 00:42:21 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230197AbjGRHP4 (ORCPT + 99 others); Tue, 18 Jul 2023 03:15:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbjGRHPz (ORCPT ); Tue, 18 Jul 2023 03:15:55 -0400 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F83010C for ; Tue, 18 Jul 2023 00:15:54 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4R4qWz23nSz4f3mLB for ; Tue, 18 Jul 2023 14:57:35 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP2 (Coremail) with SMTP id Syh0CgB3a+nfN7Zk36ikOA--.34217S4; Tue, 18 Jul 2023 14:57:37 +0800 (CST) From: Kemeng Shi To: akpm@linux-foundation.org, pasha.tatashin@soleen.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: shikemeng@huaweicloud.com Subject: [PATCH 2/3] mm/page_ext: use page_ext_data helper in page_table_check Date: Tue, 18 Jul 2023 22:58:11 +0800 Message-Id: <20230718145812.1991717-3-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230718145812.1991717-1-shikemeng@huaweicloud.com> References: <20230718145812.1991717-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: Syh0CgB3a+nfN7Zk36ikOA--.34217S4 X-Coremail-Antispam: 1UD129KBjvdXoWrtr13Cr17KF4UZr13XFy3twb_yoW3Jrb_t3 42qwn8Xr9YqFyYyrnrC3s7JrWUK3409F45Xr18Kr90vr4rWr4kZa48X3ZI9rWkXryjqFyk urZ5XFnxCr47ZjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb6AFF20E14v26ryj6rWUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M280x2IEY4vEnII2IxkI6r1a6r45M28IrcIa0xkI8V A2jI8067AKxVWUXwA2048vs2IY020Ec7CjxVAFwI0_JFI_Gr1l8cAvFVAK0II2c7xJM28C jxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI 8IcVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E 87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64 kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm 72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYx C7MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_ Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x 0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8 JVWxJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIx AIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7sREO6pDUUUUU= = X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, KHOP_HELO_FCRDNS,MAY_BE_FORGED,SPF_HELO_NONE,SPF_NONE, 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 page_ext_data helper in page_table_check to avoid access offset directly. Signed-off-by: Kemeng Shi --- mm/page_table_check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_table_check.c b/mm/page_table_check.c index 84c8163984e5..46e77c12c81e 100644 --- a/mm/page_table_check.c +++ b/mm/page_table_check.c @@ -51,7 +51,7 @@ struct page_ext_operations page_table_check_ops = { static struct page_table_check *get_page_table_check(struct page_ext *page_ext) { BUG_ON(!page_ext); - return (void *)(page_ext) + page_table_check_ops.offset; + return page_ext_data(page_ext, &page_table_check_ops); } /* -- 2.30.0