@@ -617,7 +617,9 @@ static struct resource * __insert_resource(struct resource *parent, struct resou
* happens. If a conflict happens, and the conflicting resources
* entirely fit within the range of the new resource, then the new
* resource is inserted and the conflicting resources become children of
- * the new resource.
+ * the new resource. Also, if the new resource entirely fits within the range
+ * of a conflicting resource without overlapping the latter's children, then
+ * the new resource is inserted too and becomes a child of the conflicting one.
*/
struct resource *insert_resource_conflict(struct resource *parent, struct resource *new)
{
It helps people better understand how this function works. Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@gmail.com> --- kernel/resource.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)