From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9C4BC47404 for ; Fri, 4 Oct 2019 19:42:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BAD35222C2 for ; Fri, 4 Oct 2019 19:42:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BAD35222C2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=stgolabs.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 698158E0005; Fri, 4 Oct 2019 15:42:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 622248E0003; Fri, 4 Oct 2019 15:42:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 510BA8E0005; Fri, 4 Oct 2019 15:42:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0149.hostedemail.com [216.40.44.149]) by kanga.kvack.org (Postfix) with ESMTP id 2CC0D8E0003 for ; Fri, 4 Oct 2019 15:42:23 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id CB77140D7 for ; Fri, 4 Oct 2019 19:42:22 +0000 (UTC) X-FDA: 76007123724.01.grain29_14bbf5911c70a X-HE-Tag: grain29_14bbf5911c70a X-Filterd-Recvd-Size: 3408 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Fri, 4 Oct 2019 19:42:22 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id AF892AD4F; Fri, 4 Oct 2019 19:42:20 +0000 (UTC) Date: Fri, 4 Oct 2019 12:41:11 -0700 From: Davidlohr Bueso To: Michel Lespinasse Cc: akpm@linux-foundation.org, peterz@infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org, Mike Marciniszyn , Dennis Dalessandro , Doug Ledford , Davidlohr Bueso Subject: Re: [PATCH 05/11] IB/hfi1: convert __mmu_int_rb to half closed intervals Message-ID: <20191004194111.2ntsr5kus5dgnnt4@linux-p48b> Mail-Followup-To: Michel Lespinasse , akpm@linux-foundation.org, peterz@infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org, Mike Marciniszyn , Dennis Dalessandro , Doug Ledford , Davidlohr Bueso References: <20191003201858.11666-1-dave@stgolabs.net> <20191003201858.11666-6-dave@stgolabs.net> <20191004115057.GA2371@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20191004115057.GA2371@google.com> User-Agent: NeoMutt/20180716 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, 04 Oct 2019, Michel Lespinasse wrote: >On Thu, Oct 03, 2019 at 01:18:52PM -0700, Davidlohr Bueso wrote: >> diff --git a/drivers/infiniband/hw/hfi1/mmu_rb.c b/drivers/infiniband/hw/hfi1/mmu_rb.c >> index 14d2a90964c3..fb6382b2d44e 100644 >> --- a/drivers/infiniband/hw/hfi1/mmu_rb.c >> +++ b/drivers/infiniband/hw/hfi1/mmu_rb.c >> @@ -47,7 +47,7 @@ >> #include >> #include >> #include >> -#include >> +#include >> >> #include "mmu_rb.h" >> #include "trace.h" >> @@ -89,7 +89,7 @@ static unsigned long mmu_node_start(struct mmu_rb_node *node) >> >> static unsigned long mmu_node_last(struct mmu_rb_node *node) >> { >> - return PAGE_ALIGN(node->addr + node->len) - 1; >> + return PAGE_ALIGN(node->addr + node->len); >> } > >May as well rename the function mmu_node_end(). I was worried if it >was used anywhere else, but it turned out it's only used when defining >the interval tree. Right. In general I tried not to rename everything to end because I wanted to avoid bloating the diffstat, albeit having naming discrepancies within the code (which isn't new either fwiw). > >I would also suggest moving this function (as well as mmu_node_first) >right before its use, rather than just after, which would allow you to >also remove the function prototype a few lines earlier. Indeed, but again I don't want to unnecessarily grow the patch. I have several notes to come back to once/if this series is settled. > >Looks good to me otherwise. > >Reviewed-by: Michel Lespinasse Thanks, Davidlohr