Received: by 10.223.185.116 with SMTP id b49csp5846703wrg; Wed, 7 Mar 2018 20:03:31 -0800 (PST) X-Google-Smtp-Source: AG47ELu5pjDaZ1A8/NbKVrpm+wkEajy5lOuDqCEPKTW1MPCyMGAeB0qZctRJQcSBj5jkTkmJS79A X-Received: by 10.99.103.195 with SMTP id b186mr19917208pgc.446.1520481811035; Wed, 07 Mar 2018 20:03:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520481811; cv=none; d=google.com; s=arc-20160816; b=t5FCzKoj8vZHpLAqQR5T1KF5z+2P/OIPRkH1eo7rXrqIR91uoh/SScksU/+UYkY84/ Q4SKe77LwZC9gbTA6TYBpUkJD5Gx2GA2OCeuboe9dY7cDr2M7nW7O2VgpmUvCuYXPJaT Y9kDzSXg3dL81NKrBTb/4Dz8h1pAed9lXjv/AGrf0zGLzw2XhLsC0gRpZa5oRfOsGYW2 Cfp/gu5aYHHn6TV2IYEzhRZrtmrQ0CTcmmfMTiaiGkNLUsDKj+UsyzvKg/JxqDQh4791 l76PxeUMNtj6D0OC0jY6jk7prlHU19qfFuFmcI7GxFcbjElVdqZbOD79ZNHC+D+5cQaV I4Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=VDsVtZRiJPajl4NgKDBubPJwJBu8dd6WwbYEQNHAKOs=; b=xPEW5dM0kQytPn4CKeaF35sdR7EQ3F/iTeRYxNbu5sC6TxabkcphlTKmiBAej7qzut NS/35J6jSRGPE7+TVy1b51BiofwwZjuQcixSaqzxE5Oj8HxacGDuIvzBv+Y5Mg6U5jn+ ++dy+uuT4Sz8HbrjPIouPfV4c6IDkSNbuJGY86ioW1LCKs4P63Hmk4IW38JD9EsxqjT6 b8XykLBg8egCOc/xIWq6wxMBFEcrhjSQlpNzfj/fMgE2+J27dwTEzT0si7R01ySNFuUR VxVeFyEuEPEDnXJx9ir7lhARSzDuGBj0O4SRNx/PLa5hhfjiYIxkFK3wYgU4qxm91IL9 NBvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=d2v9lEpV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d12-v6si13150914plr.264.2018.03.07.20.03.16; Wed, 07 Mar 2018 20:03:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=d2v9lEpV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755006AbeCHEAw (ORCPT + 99 others); Wed, 7 Mar 2018 23:00:52 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:55056 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761AbeCHEAw (ORCPT ); Wed, 7 Mar 2018 23:00:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=VDsVtZRiJPajl4NgKDBubPJwJBu8dd6WwbYEQNHAKOs=; b=d2v9lEpVC4OyI4GrZwLMXOZZ7 bh01NwiX4nC1pP4GoxiwYRISs2i59gokernobmoHjqueDI6QIHmTqJNSjHVvc4SxoBCAbahOkZX9W FUYHM1KWNYpKnsu25eeURndbkraSQ1f6Eo6zXvh1syjLmAr68RgzPOX6syDZYIvJ04v1gjmJ2QbSn sy51Zzqb3kBWthI61qzrQwwqqGNwvogWl4woUrALjAX8Eyc3QH/lRTK8GHdEaroqxAtVXX5AK2SwI wdvMDCvxRsdxDYxaRxu5pYjfE5Q06irvgrONfTXVbxsrFEvwnGquBQU1XTSvt9p43aVllgQoII0Zk SIWF/Wj1g==; Received: from willy by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1etmj2-0002tX-6o; Thu, 08 Mar 2018 04:00:16 +0000 Date: Wed, 7 Mar 2018 20:00:16 -0800 From: Matthew Wilcox To: Toshi Kani Cc: mhocko@suse.com, akpm@linux-foundation.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, bp@suse.de, catalin.marinas@arm.com, guohanjun@huawei.com, will.deacon@arm.com, wxf.wang@hisilicon.com, linux-mm@kvack.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] mm/vmalloc: Add interfaces to free unused page table Message-ID: <20180308040016.GB9082@bombadil.infradead.org> References: <20180307183227.17983-1-toshi.kani@hpe.com> <20180307183227.17983-2-toshi.kani@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180307183227.17983-2-toshi.kani@hpe.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 07, 2018 at 11:32:26AM -0700, Toshi Kani wrote: > +/** > + * pud_free_pmd_page - clear pud entry and free pmd page > + * > + * Returns 1 on success and 0 on failure (pud not cleared). > + */ > +int pud_free_pmd_page(pud_t *pud) > +{ > + return pud_none(*pud); > +} Wouldn't it be clearer if you returned 'bool' instead of 'int' here? Also you didn't document the pud parameter, nor use the approved form for documenting the return type, nor the calling context. So I would have written it out like this: /** * pud_free_pmd_page - Clear pud entry and free pmd page. * @pud: Pointer to a PUD. * * Context: Caller should hold mmap_sem write-locked. * Return: %true if clearing the entry succeeded. */