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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D30AC19F2D for ; Sun, 7 Aug 2022 01:51:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A9BB08E0002; Sat, 6 Aug 2022 21:51:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A4A218E0001; Sat, 6 Aug 2022 21:51:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8EA7B8E0002; Sat, 6 Aug 2022 21:51:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 7D3D18E0001 for ; Sat, 6 Aug 2022 21:51:48 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 52D5AC0344 for ; Sun, 7 Aug 2022 01:51:48 +0000 (UTC) X-FDA: 79771120296.12.42BB884 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf06.hostedemail.com (Postfix) with ESMTP id C97B418012C for ; Sun, 7 Aug 2022 01:51:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659837106; 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=TYIe0zcWeWsDVs0irJz1ONjMhDVmOeJA4esoQy7p0tQknrudmHUjwqq1Vz6SidxHKLnqVr /Obh8/3DDq9U43J3onq94jIZqtFFC96i2DxRW5FlKky7kY7rCzykf27p733bpPSaQglJu3 toZurKQG8JCLF09fZMFcZHzP3KJKl7U= 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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1659837108; a=rsa-sha256; cv=none; b=5LqaVnXhbnFMInsqz36erQd6eio8g378jpvEWvhHQiWc25T9CtmvlBeKt2SEhwPUi2YMPb pB5HlCqpOsomBMh03UuS9e6gF86RftRvvI8EgjthAj1g19pxwlawz9Q+6WxZ7j1mvWHKfQ 1AFa7HULwLh6juSypipEh9MYnuJcdVE= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=TYIe0zcW; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf06.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1659837108; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=iSbJjMZU6xQdgnfP8jyChOBFjaT2MZzAgj08eMIJw8M=; b=EA4tW4NJ+wNntIEmoeOlxHa/u/rMHk+OYhLIQ4A+bmb360euFyG0dOMZOxQoxqHjdxcBSH XvfBUNjiCSJdABw149O902Qe/9HnRiw8js/I2lp4EKoH5YjWnDgUCcWB5UOK8SGxKskza4 Q95dXPyf7DQ/VZn0fwuKvQdr5+SY98k= X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: C97B418012C Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=TYIe0zcW; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf06.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com X-Rspam-User: X-Stat-Signature: ocessje5y1qsfqsihkffjgxwyrrn49p9 X-HE-Tag: 1659837107-925237 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.