[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a1DbNY6NzcwzjVFvd9yw6L3YBHQos_hmE=nG=6cuv1DAg@mail.gmail.com>
Date: Tue, 24 May 2022 14:37:40 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Kefeng Wang <wangkefeng.wang@...wei.com>
Cc: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>,
Christoph Hellwig <hch@...radead.org>,
Arnd Bergmann <arnd@...db.de>,
Anshuman Khandual <anshuman.khandual@....com>
Subject: Re: [PATCH v3 4/6] mm: ioremap: Add arch_ioremap/iounmap()
On Thu, May 19, 2022 at 10:25 AM Kefeng Wang <wangkefeng.wang@...wei.com> wrote:
>
> Add special hook for architecture to verify or setup addr, size
> or prot when ioremap() or iounmap(), which will make the generic
> ioremap more useful.
>
> arch_ioremap() return a pointer,
> - IS_ERR means return an error
> - NULL means continue to remap
> - a non-NULL, non-IS_ERR pointer is directly returned
> arch_iounmap() return a int value,
> - 0 means continue to vunmap
> - error code means skip vunmap and return directly
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
I don't really like interfaces that mix error pointers and NULL pointer
returns.
Would it be possible to have a special error code other than NULL
for the fallback case?
arnd
Powered by blists - more mailing lists