lkml.org 
[lkml]   [2022]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v3 4/6] mm: ioremap: Add arch_ioremap/iounmap()
    On Thu, May 19, 2022 at 10:25 AM Kefeng Wang <wangkefeng.wang@huawei.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@huawei.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

    \
     
     \ /
      Last update: 2022-05-24 14:39    [W:5.136 / U:0.076 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site