[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1911201901270.29534@nanos.tec.linutronix.de>
Date: Wed, 20 Nov 2019 19:05:52 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Davidlohr Bueso <dave@...olabs.net>
cc: mingo@...nel.org, peterz@...radead.org, bp@...en8.de,
x86@...nel.org, linux-kernel@...r.kernel.org,
Davidlohr Bueso <dbueso@...e.de>
Subject: Re: [PATCH 1/4] x86/mm, pat: Convert pat tree to generic interval
tree
On Mon, 21 Oct 2019, Davidlohr Bueso wrote:
> int rbt_memtype_check_insert(struct memtype *new,
> enum page_cache_mode *ret_type)
> {
> int err = 0;
>
> err = memtype_rb_check_conflict(&memtype_rbroot, new->start, new->end,
> - new->type, ret_type);
> -
> - if (!err) {
> - if (ret_type)
> - new->type = *ret_type;
> -
> - new->subtree_max_end = new->end;
> - memtype_rb_insert(&memtype_rbroot, new);
> - }
> + new->type, ret_type);
> + if (err)
> + goto done;
Please return err here. That goto is pointless.
> +
> + if (ret_type)
> + new->type = *ret_type;
> + memtype_interval_insert(new, &memtype_rbroot);
> +done:
> return err;
> }
Other than that.
Reviewed-by: Thomas Gleixner <tglx@...utronix.de>
Powered by blists - more mailing lists