Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp3357766rwb; Sat, 6 Aug 2022 19:47:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR7Dct17dCXrIm3O8Hf7vAZn7sPo/VIDMKY3UkV4ddXGRfylCI7AZrOk3men97s9M9jvDUP/ X-Received: by 2002:a17:907:1c19:b0:730:9e1f:7204 with SMTP id nc25-20020a1709071c1900b007309e1f7204mr9588997ejc.244.1659840468700; Sat, 06 Aug 2022 19:47:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659840468; cv=none; d=google.com; s=arc-20160816; b=dAts2OAeRc6aIa+bUEyaOPB01EfmOVANcMiCJyoPVKDoOKEP1i+4cgnb/BY0IGrGUl 5q0m58lAX+Dk1JSDBlLGhHcozG7an94UYUsDas25agU+WD3LpbX44WwtyUY5CZ8wZ5NT EYLWBQEeyEo4I1+Ehw/6XzfYMYUQT9YnmoM4CWPzOmCtkWqRNj60D7Eq+3e+Zbjl2EXr ittM007Ds6yZz4prf0EhjNap2Kfs+P53FHNjkrIpRczkX1tQZnKOedlbKSVioPjcu2vg f6UTlXfKn8i/LPyWzdiNPgUhgPLx0HdQ9UGxyASC4c1DQhCDvrxFyjgl1nNl/ULuZmtk uaWg== 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=iSbJjMZU6xQdgnfP8jyChOBFjaT2MZzAgj08eMIJw8M=; b=hoUnlEnlmTZDN5xau3/iBFzcHeHrs1KynclcrBl8FDAIOwFThR1VuOnV8zKpz+3T7R WNjrLqt1TDWO36X0Zwfeu0ma3wUPhK2brloCsyJD7P3R4uh8v0r0MV4ERgKlpG+0+ROj 6V/HrvH5F5CrUWCapOXwByYVNqPtGkrAGyZNxDaVYlHS1jvi5GYaVAs/RyM6aQ1IxJv4 sUhR0TUk3uyCkRkowG78QnB0U+j0ujoxQ1nYzhzQztf8Wf/sqSDsM/GAwPNBeYf+xbD9 gDpP18q3VZfw3lcQWwzK6P5/Jn+2tUDrK4mwmMC4c0RIQblJZUM2XiNaxCSJRByQCgnw BdYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=T9yVSsMq; 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 r10-20020a05640251ca00b0043d3f9c358bsi3143449edd.49.2022.08.06.19.47.11; Sat, 06 Aug 2022 19:47:48 -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=T9yVSsMq; 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 S234064AbiHGBvw (ORCPT + 99 others); Sat, 6 Aug 2022 21:51:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233371AbiHGBvu (ORCPT ); Sat, 6 Aug 2022 21:51:50 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E10649FFF for ; Sat, 6 Aug 2022 18:51:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659837108; 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=iSbJjMZU6xQdgnfP8jyChOBFjaT2MZzAgj08eMIJw8M=; b=T9yVSsMqFgL6yLz22AA96P5NbZUkEZjKpuBPURroG6SlE80MYmgoT0lHiFDsD+p+CXj/Bx itM60auQg11pbWq21o2mlmwqsRM8pUuN63PnZDKcuF2vkwj8Zh0OQY8ryNFJ+uQV4LR7B9 oe6lIDHEDe45RG6jR2agJSAuYCH/ExE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-116-DiusD6ewNVul5VZbr8FxMA-1; Sat, 06 Aug 2022 21:51:45 -0400 X-MC-Unique: DiusD6ewNVul5VZbr8FxMA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 17A0E801755; Sun, 7 Aug 2022 01:51:45 +0000 (UTC) Received: from localhost (ovpn-12-55.pek2.redhat.com [10.72.12.55]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6AFA9492C3B; Sun, 7 Aug 2022 01:51:44 +0000 (UTC) Date: Sun, 7 Aug 2022 09:51:41 +0800 From: Baoquan He To: Kefeng Wang , Alexander Gordeev Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, hch@infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 01/11] mm/ioremap: change the return value of io[re|un]map_allowed Message-ID: <20220807015141.GB416711@MiWiFi-R3L-srv> References: <20220801144029.57829-1-bhe@redhat.com> <20220801144029.57829-2-bhe@redhat.com> <832b38ca-064e-0ab8-cd62-337d0d83d471@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <832b38ca-064e-0ab8-cd62-337d0d83d471@huawei.com> X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-Spam-Status: No, score=-2.7 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 08/06/22 at 10:29am, Kefeng Wang wrote: ...snip... > > > diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h > > > index 72974cb81343..d72eb310fb3c 100644 > > > --- a/include/asm-generic/io.h > > > +++ b/include/asm-generic/io.h > > > @@ -967,26 +967,27 @@ static inline void iounmap(volatile void __iomem *addr) > > > /* > > > * Arch code can implement the following two hooks when using GENERIC_IOREMAP > > > * ioremap_allowed() return a bool, > > > - * - true means continue to remap > > > - * - false means skip remap and return directly > > > + * - IS_ERR means return an error > > > + * - NULL means continue to remap > > > + * - a non-NULL, non-IS_ERR pointer is returned directly > > If ioremap_allowed() returns a valid pointer, then the function name > > is not as precise anymore. > > Maybe use arch_ioremap/unmap as before, or some better name. Looks good to me. Or ioremap_check() which is a generic name, and usually xxx_check() can hanlde many things.