Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp393359rwd; Wed, 17 May 2023 20:57:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Yje8fMXsRIUP7JAAYQIbrgN/rFShoGumWClwSp2kZm8qQRuYy6P62fw3BKq32i5Q9mVHh X-Received: by 2002:a17:902:ebd2:b0:1a6:dd9a:62c5 with SMTP id p18-20020a170902ebd200b001a6dd9a62c5mr1015411plg.10.1684382226804; Wed, 17 May 2023 20:57:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684382226; cv=none; d=google.com; s=arc-20160816; b=HwuoIP6Rdt6uWNT1XLDEBVV2t1hJVUwzETkZb7PMPLBc7+0aim8bR2cUFw5cjMVN6W DHHC3cKCLzfkj78Xme4ot+QA7ricpVvJQipOfu/aUFas85r5j5zn7Soe+2wvGqz3zCss 3kzjYDqdvwMf5syZHw6xbSz+ygmn4Hki5pVWAFXeHcSV2Z3OS8SOqkZY91VbI6h18WNL 4einbyPSdrgLGtiwMNUOgcy+h/88G91nzy98JLwyAcUqOKDK0+p2B11R0eRlYKPjxwLH 59n995XVV3cZ2xvB6wpAW69iyTNVz8ur8GtA0UiTP0WVhHaDahwxaPoTLYcxH75k8Jdr Rg9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RMQr1Z/SNdz396grr248udQlctmR65Q9JOFTWlK+K04=; b=kL30p7iyvEonxqi3RXWsw1Eou+b9V7qnBjiG8hg2eRFY4DU/5wTDn/Q+VFwgHbVXDE eyzG4YbL3Vv8inzp31eylKCqLXN+AXEunsGCKj69wHQnczkPPvkHZYh410zeSvAGjn/r dgA6gHDXva+SyTkK0M0Zv2p6lXl5bfbDzH41VbCLy1ihSAIStKIl4fDtnFLbPVrHxj/e +dkGjz5I1jL4/Tm1G4fnQ4r9EPTNQ1se2M2VbbtsqUuHryy+ZHEWbc+QInVsJKjZvoGT 9OhdbOLFPwopIST/SZajte3sxgXmDeeggJ8dcitrtiUkmLxM8fmJo/XcYhAxc6iDzg9+ EebQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DoYz2mdV; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jj18-20020a170903049200b001a994803b1csi395232plb.19.2023.05.17.20.56.52; Wed, 17 May 2023 20:57:06 -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=@redhat.com header.s=mimecast20190719 header.b=DoYz2mdV; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229529AbjERDjZ (ORCPT + 99 others); Wed, 17 May 2023 23:39:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbjERDjX (ORCPT ); Wed, 17 May 2023 23:39:23 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E38B630E6 for ; Wed, 17 May 2023 20:38:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684381116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RMQr1Z/SNdz396grr248udQlctmR65Q9JOFTWlK+K04=; b=DoYz2mdVpNE1nVdrYb6fuYhuAJ9NlF7cbqHi6m9pVE5/NDeEjTh/z7GNxpMMo42f6Mb6Em HMS45TBpDAWU/CoM1YblLCyPVbVRLwsJGggaOg+zNeQyM5RvWv8QXo5D05fLnjq5C3lMaV 8Z3NacO4fNw4pITi5Cqbf+SAczfD5/4= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-187-WDmYr80jMCKJl0ULvIoExg-1; Wed, 17 May 2023 23:38:34 -0400 X-MC-Unique: WDmYr80jMCKJl0ULvIoExg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0D0623C01E0B; Thu, 18 May 2023 03:38:34 +0000 (UTC) Received: from localhost (ovpn-12-79.pek2.redhat.com [10.72.12.79]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 30F6040C6EC4; Thu, 18 May 2023 03:38:31 +0000 (UTC) Date: Thu, 18 May 2023 11:38:28 +0800 From: Baoquan He To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, arnd@arndb.de, christophe.leroy@csgroup.eu, agordeev@linux.ibm.com, wangkefeng.wang@huawei.com, schnelle@linux.ibm.com, David.Laight@aculab.com, shorne@gmail.com, willy@infradead.org, deller@gmx.de Subject: Re: [PATCH v5 RESEND 04/17] mm/ioremap: Define generic_ioremap_prot() and generic_iounmap() Message-ID: References: <20230515090848.833045-1-bhe@redhat.com> <20230515090848.833045-5-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 On 05/16/23 at 11:29pm, Christoph Hellwig wrote: > On Mon, May 15, 2023 at 05:08:35PM +0800, Baoquan He wrote: > > From: Christophe Leroy > > > > Define a generic version of ioremap_prot() and iounmap() that > > architectures can call after they have performed the necessary > > alteration to parameters and/or necessary verifications. > > > > Signed-off-by: Christophe Leroy > > Signed-off-by: Baoquan He > > --- > > include/asm-generic/io.h | 4 ++++ > > mm/ioremap.c | 22 ++++++++++++++++------ > > 2 files changed, 20 insertions(+), 6 deletions(-) > > > > diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h > > index 587e7e9b9a37..a7ca2099ba19 100644 > > --- a/include/asm-generic/io.h > > +++ b/include/asm-generic/io.h > > @@ -1073,9 +1073,13 @@ static inline bool iounmap_allowed(void *addr) > > } > > #endif > > > > +void __iomem *generic_ioremap_prot(phys_addr_t phys_addr, size_t size, > > + pgprot_t prot); > > + > > Formatting looks a bit weird here. The normal styles are either to > indent with two tabs (my preference) or after the opening brace. Thanks a lot for careful reviewing on this series. I check this place again, strange it looks good in code with identing after the opening brace, while in patch it looks messy. Will try again to see if I can fix it in patch too.