From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A652AC4361B for ; Mon, 7 Dec 2020 12:11:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 64EE4233EA for ; Mon, 7 Dec 2020 12:11:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727247AbgLGMKv (ORCPT ); Mon, 7 Dec 2020 07:10:51 -0500 Received: from szxga08-in.huawei.com ([45.249.212.255]:2331 "EHLO szxga08-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727018AbgLGMKv (ORCPT ); Mon, 7 Dec 2020 07:10:51 -0500 Received: from DGGEMM402-HUB.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4CqMYR1xCjz13RDD; Mon, 7 Dec 2020 20:09:15 +0800 (CST) Received: from dggema765-chm.china.huawei.com (10.1.198.207) by DGGEMM402-HUB.china.huawei.com (10.3.20.210) with Microsoft SMTP Server (TLS) id 14.3.487.0; Mon, 7 Dec 2020 20:10:06 +0800 Received: from [10.174.185.137] (10.174.185.137) by dggema765-chm.china.huawei.com (10.1.198.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1913.5; Mon, 7 Dec 2020 20:10:05 +0800 Subject: Re: [PATCH] iommu/io-pgtalbe-arm: Remove "iopte_type(pte, l)" extra parameter "l" To: Will Deacon CC: Robin Murphy , Joerg Roedel , "moderated list:ARM SMMU DRIVERS" , "open list:IOMMU DRIVERS" , open list , , Keqian Zhu References: <20201207081404.1699-1-jiangkunkun@huawei.com> <20201207102458.GB3825@willie-the-truck> From: Kunkun Jiang Message-ID: <83f3f9f5-43d8-e02b-39e2-70edd42799a8@huawei.com> Date: Mon, 7 Dec 2020 20:09:54 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201207102458.GB3825@willie-the-truck> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [10.174.185.137] X-ClientProxiedBy: dggeme705-chm.china.huawei.com (10.1.199.101) To dggema765-chm.china.huawei.com (10.1.198.207) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Will, On 2020/12/7 18:24, Will Deacon wrote: > On Mon, Dec 07, 2020 at 04:14:04PM +0800, Kunkun Jiang wrote: >> Knowing from the code, the macro "iopte_type(pte, l)" doesn't use the >> parameter "l" (level). So we'd better to remove it. >> >> Fixes: e1d3c0fd701df(iommu: add ARM LPAE page table allocator) >> Signed-off-by: Kunkun Jiang >> --- >> drivers/iommu/io-pgtable-arm.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/iommu/io-pgtable-arm.c b/drivers/iommu/io-pgtable-arm.c >> index a7a9bc08dcd1..925ae2b713d6 100644 >> --- a/drivers/iommu/io-pgtable-arm.c >> +++ b/drivers/iommu/io-pgtable-arm.c >> @@ -130,7 +130,7 @@ >> /* IOPTE accessors */ >> #define iopte_deref(pte,d) __va(iopte_to_paddr(pte, d)) >> >> -#define iopte_type(pte,l) \ >> +#define iopte_type(pte) \ >> (((pte) >> ARM_LPAE_PTE_TYPE_SHIFT) & ARM_LPAE_PTE_TYPE_MASK) > Shouldn't we update all the users of the macro too? > > Will > . Sorry for my carelessness.  :( I have resent it. Thanks, Kunkun Jiang