Thread (21 messages) 21 messages, 3 authors, 2022-08-20

Re: [PATCH 01/11] mm/ioremap: change the return value of io[re|un]map_allowed

From: Baoquan He <hidden>
Date: 2022-08-07 01:51:55
Also in: linux-mm, lkml

On 08/06/22 at 10:29am, Kefeng Wang wrote:
...snip...
quoted
quoted
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.


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help